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

From Spesoft/GameEx Wiki
Jump to navigation Jump to search
Line 8: Line 8:


=== <span style="color:#003300;">VB.NET</span> ===
=== <span style="color:#003300;">VB.NET</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 15:


=== <span style="color:#003300;">C#</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)

Revision as of 06:41, 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;
}