Open main menu
Home
Random
Log in
Settings
About Stardew Valley Wiki
Disclaimers
Stardew Valley Wiki
Search
Changes
← Older edit
Newer edit →
Modding:Modder Guide/APIs
(view source)
Revision as of 18:46, 5 July 2017
765 bytes added
,
18:46, 5 July 2017
→Events
:
+ InputEvents in SMAPI 2.0
Line 175:
Line 175:
| Resize || Raised after the game window is resized.
| Resize || Raised after the game window is resized.
|}
|}
+
+
===Input events===
+
{{SMAPI upcoming
+
|version = 2.0
+
|content =
+
<tt>InputEvents</tt> are raised when the player uses a controller, keyboard, or mouse.
+
<table class="wikitable">
+
<tr>
+
<th>event</th>
+
<th>summary</th>
+
</tr>
+
<tr>
+
<td>ButtonPressed<br />ButtonReleased</td>
+
<td>Raised after the player pressed/released a keyboard, mouse, or controller button. The event arguments specify:
+
* whether the input counts as a 'click' (including the controller equivalent);
+
* the cursor position on the screen;
+
* the tile under the cursor;
+
* the 'grab tile' (i.e. the tile the game considers to be clicked).
+
+
You can prevent the game (but not other mods) from handling the input using the <tt>SuppressButton()</tt> method on the event arguments object.</td>
+
</tr>
+
</table>
+
}}
===Location events===
===Location events===
Pathoschild
translators
8,404
edits