Files
CodenameEngine/pages/funkin/system/Controls.html
T
2022-10-11 13:47:52 +02:00

16 lines
19 KiB
HTML

<!DOCTYPE html>
<html lang="en"><!-- use theme color or fallback -->
<!--use textcolor from settings, otherwise create a contrasting color to theme color-->
<head><meta charset="utf-8"/><link href="../../bootstrap/css/bootstrap.min.css" rel="stylesheet"/><link href="../../bootstrap/css/bootstrap-responsive.min.css" rel="stylesheet"/><link href="../../bootstrap/css/bootstrap-select.min.css" rel="stylesheet"/><link href="https://fonts.googleapis.com/css?family=Open+Sans:400,700,700italic,400italic" rel="stylesheet" type="text/css"/><link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:200,600,600italic,400" rel="stylesheet" type="text/css"/><link href="https://netdna.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.css" rel="stylesheet" type="text/css"/><script src="../../jquery-1.9.1.min.js"></script><script src="../../bootstrap/js/bootstrap.min.js"></script><script src="../../bootstrap/js/bootstrap-select.min.js"></script><link href="../../styles.css" rel="stylesheet"/><link href="../../extra-styles.css" rel="stylesheet"/><link href="../../haxe-nav.css" rel="stylesheet"/><link href="../../dark-mode.css" rel="stylesheet"/><script>var dox = {rootPath: "../../",platforms: ["doc"]};</script><script src="../../nav.js"></script><script src="../../index.js"></script><link rel="icon" href="../../favicon.ico" type="image/x-icon"/><title>funkin.system.Controls</title><meta name="description" content="A list of actions that a player would invoke via some input device.
Uses FlxActions to funnel various inputs to a single action."/></head><body><script>/* Here to prevent flash of unstyled content */let systemDarkMode = window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches;if ((!localStorage.theme && systemDarkMode) || localStorage.theme == "dark") {document.body.style.backgroundColor = "#111";document.body.style.opacity = "0";document.addEventListener("DOMContentLoaded", function(event) {toggleTheme();document.body.style.backgroundColor = "";document.body.style.opacity = "";});}</script><style>
.navbar .brand {
display: inline-block;
float: none;
text-shadow: 0 0 0 transparent;
}
</style><nav class="nav"><div class="navbar"><div class="navbar-inner" style="background:#FAFAFA; border-bottom:1px solid rgba(0,0,0,.09)"><div class="container"><a class="brand" style="color:#000000" href="../../">API Documentation</a><a href="#" id="theme-toggle" class="brand" style="color:#000000" onclick="toggleTheme()" title="Toggle Dark Mode"><i class="fa fa-moon-o"></i></a></div></div></div></nav><div class="container main-content"><div class="row-fluid"><div class="span3"><div class="well sidebar-nav"><form class="form-search" id="searchForm"><div class="input-prepend input-block-level"><span class="add-on"><i class="fa fa-search"></i></span><input id="search" type="text" placeholder="Filter (Ctrl+P)" autocomplete="off"/></div></form></div><div class="well sidebar-nav" id="explorer"><div id="nav"></div></div></div><div class="span9"><div class="page-header"><h1><small>class</small> Controls</h1><h4><small>package <a href="../../funkin/system/index.html">funkin.system</a></small></h4><h4><small>extends <span class="type">FlxActionSet</span></small></h4> <span class="label label-meta label-meta-directlyUsed" title="Marks types that are directly referenced by non-extern code.">@:directlyUsed</span></div><div class="body"><div class="doc doc-main"><p>A list of actions that a player would invoke via some input device.
Uses FlxActions to funnel various inputs to a single action.</p></div><h3 class="section">Constructor</h3><div class="fields"><div class="field "><a name="new"></a><h3 class="anchor"><code><span class="label label-meta label-meta-value" title="Used to store default values for fields and function arguments.">@:value({ scheme : None })</span><a href="#new"><span class="identifier">new</span></a>(<span style="white-space:nowrap">name:<span class="type">String</span>,</span> <span style="white-space:nowrap">scheme:<a class="type" title="funkin.system.KeyboardScheme" href="../../funkin/system/KeyboardScheme.html">KeyboardScheme</a> = None</span>)</code></h3><div class="doc"><p></p></div></div></div><h3 class="section">Variables</h3><div class="fields"><div class="field "><a name="ACCEPT"></a><h3 class="anchor"><code><span class="label">read only</span><a href="#ACCEPT"><span class="identifier">ACCEPT</span></a>:<span class="type">Bool</span></code></h3><div class="doc"><p></p></div></div><div class="field "><a name="BACK"></a><h3 class="anchor"><code><span class="label">read only</span><a href="#BACK"><span class="identifier">BACK</span></a>:<span class="type">Bool</span></code></h3><div class="doc"><p></p></div></div><div class="field "><a name="CHEAT"></a><h3 class="anchor"><code><span class="label">read only</span><a href="#CHEAT"><span class="identifier">CHEAT</span></a>:<span class="type">Bool</span></code></h3><div class="doc"><p></p></div></div><div class="field "><a name="DOWN"></a><h3 class="anchor"><code><span class="label">read only</span><a href="#DOWN"><span class="identifier">DOWN</span></a>:<span class="type">Bool</span></code></h3><div class="doc"><p></p></div></div><div class="field "><a name="DOWN_P"></a><h3 class="anchor"><code><span class="label">read only</span><a href="#DOWN_P"><span class="identifier">DOWN_P</span></a>:<span class="type">Bool</span></code></h3><div class="doc"><p></p></div></div><div class="field "><a name="DOWN_R"></a><h3 class="anchor"><code><span class="label">read only</span><a href="#DOWN_R"><span class="identifier">DOWN_R</span></a>:<span class="type">Bool</span></code></h3><div class="doc"><p></p></div></div><div class="field "><a name="LEFT"></a><h3 class="anchor"><code><span class="label">read only</span><a href="#LEFT"><span class="identifier">LEFT</span></a>:<span class="type">Bool</span></code></h3><div class="doc"><p></p></div></div><div class="field "><a name="LEFT_P"></a><h3 class="anchor"><code><span class="label">read only</span><a href="#LEFT_P"><span class="identifier">LEFT_P</span></a>:<span class="type">Bool</span></code></h3><div class="doc"><p></p></div></div><div class="field "><a name="LEFT_R"></a><h3 class="anchor"><code><span class="label">read only</span><a href="#LEFT_R"><span class="identifier">LEFT_R</span></a>:<span class="type">Bool</span></code></h3><div class="doc"><p></p></div></div><div class="field "><a name="PAUSE"></a><h3 class="anchor"><code><span class="label">read only</span><a href="#PAUSE"><span class="identifier">PAUSE</span></a>:<span class="type">Bool</span></code></h3><div class="doc"><p></p></div></div><div class="field "><a name="RESET"></a><h3 class="anchor"><code><span class="label">read only</span><a href="#RESET"><span class="identifier">RESET</span></a>:<span class="type">Bool</span></code></h3><div class="doc"><p></p></div></div><div class="field "><a name="RIGHT"></a><h3 class="anchor"><code><span class="label">read only</span><a href="#RIGHT"><span class="identifier">RIGHT</span></a>:<span class="type">Bool</span></code></h3><div class="doc"><p></p></div></div><div class="field "><a name="RIGHT_P"></a><h3 class="anchor"><code><span class="label">read only</span><a href="#RIGHT_P"><span class="identifier">RIGHT_P</span></a>:<span class="type">Bool</span></code></h3><div class="doc"><p></p></div></div><div class="field "><a name="RIGHT_R"></a><h3 class="anchor"><code><span class="label">read only</span><a href="#RIGHT_R"><span class="identifier">RIGHT_R</span></a>:<span class="type">Bool</span></code></h3><div class="doc"><p></p></div></div><div class="field "><a name="UP"></a><h3 class="anchor"><code><span class="label">read only</span><a href="#UP"><span class="identifier">UP</span></a>:<span class="type">Bool</span></code></h3><div class="doc"><p></p></div></div><div class="field "><a name="UP_P"></a><h3 class="anchor"><code><span class="label">read only</span><a href="#UP_P"><span class="identifier">UP_P</span></a>:<span class="type">Bool</span></code></h3><div class="doc"><p></p></div></div><div class="field "><a name="UP_R"></a><h3 class="anchor"><code><span class="label">read only</span><a href="#UP_R"><span class="identifier">UP_R</span></a>:<span class="type">Bool</span></code></h3><div class="doc"><p></p></div></div><div class="field "><a name="gamepadsAdded"></a><h3 class="anchor"><code><span class="label label-meta label-meta-value" title="Used to store default values for fields and function arguments.">@:value([])</span><a href="#gamepadsAdded"><span class="identifier">gamepadsAdded</span></a>:<span class="type">Array</span>&lt;<span class="type">Int</span>&gt;<span> = []</span></code></h3><div class="doc"><p></p></div></div><div class="field "><a name="keyboardScheme"></a><h3 class="anchor"><code><span class="label label-meta label-meta-value" title="Used to store default values for fields and function arguments.">@:value(KeyboardScheme.None)</span><a href="#keyboardScheme"><span class="identifier">keyboardScheme</span></a>:<a class="type" title="funkin.system.KeyboardScheme" href="../../funkin/system/KeyboardScheme.html">KeyboardScheme</a><span> = KeyboardScheme.None</span></code></h3><div class="doc"><p></p></div></div></div><h3 class="section">Methods</h3><div class="fields"><div class="field "><a name="addDefaultGamepad"></a><h3 class="anchor"><code><a href="#addDefaultGamepad"><span class="identifier">addDefaultGamepad</span></a>(<span style="white-space:nowrap">id:<span class="type">Int</span></span>):<span class="type">Void</span></code></h3><div class="doc"><p></p></div></div><div class="field "><a name="addGamepad"></a><h3 class="anchor"><code><a href="#addGamepad"><span class="identifier">addGamepad</span></a>(<span style="white-space:nowrap">id:<span class="type">Int</span>,</span> <span style="white-space:nowrap">?buttonMap:<span class="type">Map</span>&lt;<a class="type" title="funkin.system.Control - Since, in many cases multiple actions should use similar keys, we don&#039;t want the rebinding UI to list every action." href="../../funkin/system/Control.html">Control</a>, <span class="type">Array</span>&lt;<span class="type">FlxGamepadInputID</span>&gt;&gt;</span>):<span class="type">Void</span></code></h3><div class="doc"><p></p></div></div><div class="field "><a name="bindButtons"></a><h3 class="anchor"><code><a href="#bindButtons"><span class="identifier">bindButtons</span></a>(<span style="white-space:nowrap">control:<a class="type" title="funkin.system.Control - Since, in many cases multiple actions should use similar keys, we don&#039;t want the rebinding UI to list every action." href="../../funkin/system/Control.html">Control</a>,</span> <span style="white-space:nowrap">id:<span class="type">Int</span>,</span> <span style="white-space:nowrap">buttons:<span class="type">Array</span>&lt;<span class="type">FlxGamepadInputID</span>&gt;</span>):<span class="type">Void</span></code></h3><div class="doc"><p>Sets all actions that pertain to the binder to trigger when the supplied keys are used.
If binder is a literal you can inline this</p></div></div><div class="field "><a name="bindKeys"></a><h3 class="anchor"><code><a href="#bindKeys"><span class="identifier">bindKeys</span></a>(<span style="white-space:nowrap">control:<a class="type" title="funkin.system.Control - Since, in many cases multiple actions should use similar keys, we don&#039;t want the rebinding UI to list every action." href="../../funkin/system/Control.html">Control</a>,</span> <span style="white-space:nowrap">keys:<span class="type">Array</span>&lt;<span class="type">FlxKey</span>&gt;</span>):<span class="type">Void</span></code></h3><div class="doc"><p>Sets all actions that pertain to the binder to trigger when the supplied keys are used.
If binder is a literal you can inline this</p></div></div><div class="field "><a name="checkByName"></a><h3 class="anchor"><code><a href="#checkByName"><span class="identifier">checkByName</span></a>(<span style="white-space:nowrap">name:<a class="type" title="funkin.system.Action" href="../../funkin/system/Action.html">Action</a></span>):<span class="type">Bool</span></code></h3><div class="doc"><p></p></div></div><div class="field "><a name="copyFrom"></a><h3 class="anchor"><code><a href="#copyFrom"><span class="identifier">copyFrom</span></a>(<span style="white-space:nowrap">controls:<a class="type" title="funkin.system.Controls - A list of actions that a player would invoke via some input device." href="../../funkin/system/Controls.html">Controls</a>,</span> <span style="white-space:nowrap">?device:<a class="type" title="funkin.system.Device" href="../../funkin/system/Device.html">Device</a></span>):<span class="type">Void</span></code></h3><div class="doc"><p></p></div></div><div class="field "><a name="copyTo"></a><h3 class="anchor"><code><span class="label label-inline">inline</span><a href="#copyTo"><span class="identifier">copyTo</span></a>(<span style="white-space:nowrap">controls:<a class="type" title="funkin.system.Controls - A list of actions that a player would invoke via some input device." href="../../funkin/system/Controls.html">Controls</a>,</span> <span style="white-space:nowrap">?device:<a class="type" title="funkin.system.Device" href="../../funkin/system/Device.html">Device</a></span>):<span class="type">Void</span></code></h3><div class="doc"><p></p></div></div><div class="field "><a name="getDialogueName"></a><h3 class="anchor"><code><a href="#getDialogueName"><span class="identifier">getDialogueName</span></a>(<span style="white-space:nowrap">action:<span class="type">FlxActionDigital</span></span>):<span class="type">String</span></code></h3><div class="doc"><p></p></div></div><div class="field "><a name="getDialogueNameFromToken"></a><h3 class="anchor"><code><a href="#getDialogueNameFromToken"><span class="identifier">getDialogueNameFromToken</span></a>(<span style="white-space:nowrap">token:<span class="type">String</span></span>):<span class="type">String</span></code></h3><div class="doc"><p></p></div></div><div class="field "><a name="getInputsFor"></a><h3 class="anchor"><code><a href="#getInputsFor"><span class="identifier">getInputsFor</span></a>(<span style="white-space:nowrap">control:<a class="type" title="funkin.system.Control - Since, in many cases multiple actions should use similar keys, we don&#039;t want the rebinding UI to list every action." href="../../funkin/system/Control.html">Control</a>,</span> <span style="white-space:nowrap">device:<a class="type" title="funkin.system.Device" href="../../funkin/system/Device.html">Device</a>,</span> <span style="white-space:nowrap">?list:<span class="type">Array</span>&lt;<span class="type">Int</span>&gt;</span>):<span class="type">Array</span>&lt;<span class="type">Int</span>&gt;</code></h3><div class="doc"><p></p></div></div><div class="field "><a name="removeDevice"></a><h3 class="anchor"><code><a href="#removeDevice"><span class="identifier">removeDevice</span></a>(<span style="white-space:nowrap">device:<a class="type" title="funkin.system.Device" href="../../funkin/system/Device.html">Device</a></span>):<span class="type">Void</span></code></h3><div class="doc"><p></p></div></div><div class="field "><a name="removeGamepad"></a><h3 class="anchor"><code><span class="label label-meta label-meta-value" title="Used to store default values for fields and function arguments.">@:value({ deviceID : FlxInputDeviceID.ALL })</span><a href="#removeGamepad"><span class="identifier">removeGamepad</span></a>(<span style="white-space:nowrap">deviceID:<span class="type">Int</span> = FlxInputDeviceID.ALL</span>):<span class="type">Void</span></code></h3><div class="doc"><p></p></div></div><div class="field "><a name="replaceBinding"></a><h3 class="anchor"><code><a href="#replaceBinding"><span class="identifier">replaceBinding</span></a>(<span style="white-space:nowrap">control:<a class="type" title="funkin.system.Control - Since, in many cases multiple actions should use similar keys, we don&#039;t want the rebinding UI to list every action." href="../../funkin/system/Control.html">Control</a>,</span> <span style="white-space:nowrap">device:<a class="type" title="funkin.system.Device" href="../../funkin/system/Device.html">Device</a>,</span> <span style="white-space:nowrap">?toAdd:<span class="type">Int</span>,</span> <span style="white-space:nowrap">?toRemove:<span class="type">Int</span></span>):<span class="type">Void</span></code></h3><div class="doc"><p></p></div></div><div class="field "><a name="setKeyboardScheme"></a><h3 class="anchor"><code><span class="label label-meta label-meta-value" title="Used to store default values for fields and function arguments.">@:value({ reset : true })</span><a href="#setKeyboardScheme"><span class="identifier">setKeyboardScheme</span></a>(<span style="white-space:nowrap">scheme:<a class="type" title="funkin.system.KeyboardScheme" href="../../funkin/system/KeyboardScheme.html">KeyboardScheme</a>,</span> <span style="white-space:nowrap">reset:<span class="type">Bool</span> = true</span>):<span class="type">Void</span></code></h3><div class="doc"><p></p></div></div><div class="field "><a name="unbindButtons"></a><h3 class="anchor"><code><a href="#unbindButtons"><span class="identifier">unbindButtons</span></a>(<span style="white-space:nowrap">control:<a class="type" title="funkin.system.Control - Since, in many cases multiple actions should use similar keys, we don&#039;t want the rebinding UI to list every action." href="../../funkin/system/Control.html">Control</a>,</span> <span style="white-space:nowrap">gamepadID:<span class="type">Int</span>,</span> <span style="white-space:nowrap">buttons:<span class="type">Array</span>&lt;<span class="type">FlxGamepadInputID</span>&gt;</span>):<span class="type">Void</span></code></h3><div class="doc"><p>Sets all actions that pertain to the binder to trigger when the supplied keys are used.
If binder is a literal you can inline this</p></div></div><div class="field "><a name="unbindKeys"></a><h3 class="anchor"><code><a href="#unbindKeys"><span class="identifier">unbindKeys</span></a>(<span style="white-space:nowrap">control:<a class="type" title="funkin.system.Control - Since, in many cases multiple actions should use similar keys, we don&#039;t want the rebinding UI to list every action." href="../../funkin/system/Control.html">Control</a>,</span> <span style="white-space:nowrap">keys:<span class="type">Array</span>&lt;<span class="type">FlxKey</span>&gt;</span>):<span class="type">Void</span></code></h3><div class="doc"><p>Sets all actions that pertain to the binder to trigger when the supplied keys are used.
If binder is a literal you can inline this</p></div></div></div> </div></div></div></div><footer class="section site-footer" style="background:#FAFAFA"><div class="container"><div class="copyright"><p style="color:#000000">&copy; 2022 &nbsp;</p></div></div></footer><script src="../..//highlighter.js"></script><link href="../../highlighter.css" rel="stylesheet"/></body></html>