Changes
Jump to navigation
Jump to search
← Older edit
Modding:Modder Guide/APIs/Input
(view source)
Revision as of 18:19, 10 July 2023
31 bytes added
,
18:19, 10 July 2023
ZH link
Line 48:
Line 48:
===Check cursor position===
===Check cursor position===
−
The <samp>GetCursorPosition()</samp> method provides the [[#ICursorPosition|cursor position in three coordinate systems
|ICursorPosition
]].
+
The <samp>GetCursorPosition()</samp> method provides the [[#ICursorPosition|cursor position in three coordinate systems]].
For example:
For example:
Line 143:
Line 143:
class ModConfig
class ModConfig
{
{
−
public KeybindList ToggleKey { get; set; } = KeybindList.Parse("
Shift
+ F2");
+
public KeybindList ToggleKey { get; set; } = KeybindList.Parse("
LeftShift
+ F2");
}
}
</syntaxhighlight>
</syntaxhighlight>
Line 149:
Line 149:
| <syntaxhighlight lang="json">
| <syntaxhighlight lang="json">
{
{
−
"ToggleKey": "
Shift
+ F2"
+
"ToggleKey": "
LeftShift
+ F2"
}
}
</syntaxhighlight>
</syntaxhighlight>
Line 215:
Line 215:
* [[../Events#Input|Input events]]
* [[../Events#Input|Input events]]
* [[Modding:Player Guide/Key Bindings]] for a list of valid <samp>SButton</samp> values
* [[Modding:Player Guide/Key Bindings]] for a list of valid <samp>SButton</samp> values
+
+
[[zh:模组:制作指南/APIs/Input]]
Margotbean
Interface administrators
, patroller,
Suppressors
,
Administrators
, translators
106,342
edits
Navigation menu
Personal tools
Create account
Log in
Namespaces
Modding
Discussion
Variants
Views
Read
View source
View history
More
Search
Navigation
Main page
Recent changes
Admin noticeboard
Help Editing
Random page
Official Links
Official Site
Official Forums
Official Merchandise
Discord
Reddit
Tools
Upload file
Special pages
Printable version