Difference between revisions of "PlugIn Development:GameEx Input Joystick Function"
Jump to navigation
Jump to search
(4 intermediate revisions by the same user not shown) | |||
Line 3: | Line 3: | ||
<div class="note_block_red"><b>PLEASE NOTE:</b> ''This function only fires when the GameEx UI is visible.''</div> | <div class="note_block_red"><b>PLEASE NOTE:</b> ''This function only fires when the GameEx UI is visible.''</div> | ||
<br /> | <br /> | ||
== <span class="plugin_headline_text"> | == <span class="plugin_headline_text">Parameters</span> == | ||
<span class="plugin_return_text">Buttons() [boolean]</span>: An array of buttons that denote the state of the buttons on the joystick. | <span class="plugin_return_text">Buttons() [boolean]</span>: An array of buttons that denote the state of the buttons on the joystick. | ||
<br /> | <br /> | ||
=== <span class="plugin_text_fx"> | === <span class="plugin_text_fx">Parameter Values</span> === | ||
For each item in the <span class="plugin_return_text">array</span>, a parameter of <span class="plugin_return_text">true</span> means that the position button is currently pressed in that instance of the <span class="plugin_return_text">array</span>.<br /> | For each item in the <span class="plugin_return_text">array</span>, a parameter of <span class="plugin_return_text">true</span> means that the position button is currently pressed in that instance of the <span class="plugin_return_text">array</span>.<br /> | ||
So, if <span class="plugin_return_text">Array[0] = true</span> then <span class="plugin_return_text">Joystick Button 0</span> is pressed, and so on. | So, if <span class="plugin_return_text">Array[0] = true</span> then <span class="plugin_return_text">Joystick Button 0</span> is pressed, and so on. | ||
<br /> | <br /> | ||
== <span class="plugin_headline_text">Returns</span> == | == <span class="plugin_headline_text">Returns</span> == | ||
This function returns a <span class="plugin_return_text">boolean</span> value. | This function returns a <span class="plugin_return_text">boolean</span> value. | ||
Line 21: | Line 20: | ||
=== <span class="plugin_text_fx">VB.NET</span> === | === <span class="plugin_text_fx">VB.NET</span> === | ||
<pre class="code_vb"> | |||
<pre class=" | |||
Public Function Input_Joystick(ByVal Buttons() As Boolean) As Boolean | Public Function Input_Joystick(ByVal Buttons() As Boolean) As Boolean | ||
Return True | Return True | ||
Line 28: | Line 26: | ||
=== <span class="plugin_text_fx">C#</span> === | === <span class="plugin_text_fx">C#</span> === | ||
<pre class="code_cs"> | |||
<pre class=" | |||
public bool Input_Joystick(bool[] Buttons) | public bool Input_Joystick(bool[] Buttons) | ||
{ | { |
Latest revision as of 07:11, 28 April 2014
This function is called when you press a button on the joystick.
PLEASE NOTE: This function only fires when the GameEx UI is visible.
Parameters
Buttons() [boolean]: An array of buttons that denote the state of the buttons on the joystick.
Parameter Values
For each item in the array, a parameter of true means that the position button is currently pressed in that instance of the array.
So, if Array[0] = true then Joystick Button 0 is pressed, and so on.
Returns
This function returns a boolean value.
Return Values
Return true and GameEx will process the joystick button press.
Return false and GameEx will not process the joystick button press.
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; }