Difference between revisions of "PlugIn Development:GameEx Input Joystick Function"

From Spesoft/GameEx Wiki
Jump to navigation Jump to search
Line 1: Line 1:
==<span style="font-size:125%; color:darkblue;">GameEx: Input Joystick Function Overview</span>==
This function is called when you press a button on the joystick.
This function is called when you press a button on the joystick.
You can return <span style="color:red;">'''TRUE'''</span> to continue processing the event or return <span style="color:red;">'''FALSE'''</span> and GameEx will not initialize the event.
You can return <span style="color:red;">'''TRUE'''</span> to continue processing the event or return <span style="color:red;">'''FALSE'''</span> and GameEx will not initialize the event.
Line 5: Line 4:


<span style="color:darkred;"><b>PLEASE NOTE:</b> ''This function only fires when the GameEx UI is visible.''</span>
<span style="color:darkred;"><b>PLEASE NOTE:</b> ''This function only fires when the GameEx UI is visible.''</span>
<br />
== <span style="color:darkblue;">Code Examples</span> ==


==Code Examples==
=== <span style="color:#003300;">VB.NET</span> ===
 
<span style="font-size:125%; color:#003300;"><b>VB.NET syntax:</b></span>
<pre style="font-family:'Lucida Console', Monaco, monospace; border-color:#003300; background-color:#E0EEE0; border-style:solid;">
<pre style="font-family:'Lucida Console', Monaco, monospace; border-color:#003300; background-color:#E0EEE0; border-style:solid;">
Public Function Input_Joystick(ByVal Buttons() As Boolean) As Boolean
Public Function Input_Joystick(ByVal Buttons() As Boolean) As Boolean
Line 14: Line 13:
End Function</pre>
End Function</pre>


<span style="font-size:125%; color:#003300;"><b>C# syntax:</b></span>
=== <span style="color:#003300;">C#</span> ===
<pre style="font-family:'Lucida Console', Monaco, monospace; border-color:#003300; background-color:#E0EEE0; border-style:solid;">
<pre style="font-family:'Lucida Console', Monaco, monospace; border-color:#003300; background-color:#E0EEE0; border-style:solid;">
public bool Input_Joystick(bool[] Buttons)
public bool Input_Joystick(bool[] Buttons)
Line 20: Line 19:
     return true;
     return true;
}</pre>
}</pre>
 
<br />
[[Category:PlugIn Development]]
[[Category:PlugIn Development]]

Revision as of 06:17, 27 April 2014

This function is called when you press a button on the joystick. You can return TRUE to continue processing the event or return FALSE and GameEx will not initialize the event. The Buttons parameter is passed as the user presses a joystick key.

PLEASE NOTE: This function only fires when the GameEx UI is visible.

Code Examples

VB.NET

Public Function Input_Joystick(ByVal Buttons() As Boolean) As Boolean
     Return True
End Function

C#

public bool Input_Joystick(bool[] Buttons)
{
     return true;
}