godot-cpp-utils-docs/html/player__input_8hpp_source.html

216 lines
27 KiB
HTML
Raw Normal View History

2024-05-30 15:04:39 +00:00
<!-- HTML header for doxygen 1.9.7-->
2024-05-29 17:40:11 +00:00
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.7"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>godot-cpp-utils: player_input.hpp Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
2024-05-29 22:09:05 +00:00
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
2024-05-29 17:40:11 +00:00
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
2024-05-29 21:29:38 +00:00
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function() { init_search(); });
/* @license-end */
</script>
2024-05-29 17:40:11 +00:00
<link href="doxygen.css" rel="stylesheet" type="text/css" />
2024-05-29 22:10:08 +00:00
<link href="doxygen-awesome.css" rel="stylesheet" type="text/css"/>
2024-05-30 15:04:39 +00:00
<script type="text/javascript" src="doxygen-awesome-darkmode-toggle.js"></script>
<script type="text/javascript">
DoxygenAwesomeDarkModeToggle.init()
</script>
2024-05-29 17:40:11 +00:00
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr id="projectrow">
<td id="projectalign">
<div id="projectname">godot-cpp-utils
</div>
<div id="projectbrief">A collection of utility classes, functions and macros for use with Godot and GDExtension.</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.7 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
2024-05-29 21:29:38 +00:00
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main&#160;Page</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
<li>
<div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<span id="MSearchSelect" onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()">&#160;</span>
<input type="text" id="MSearchField" value="" placeholder="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.svg" alt=""/></a>
</span>
</div>
</li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="files.html"><span>File&#160;List</span></a></li>
<li><a href="globals.html"><span>File&#160;Members</span></a></li>
</ul>
</div>
</div><!-- top -->
2024-05-29 22:09:05 +00:00
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function(){initNavTree('player__input_8hpp_source.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
2024-05-29 17:40:11 +00:00
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>
<div class="header">
<div class="headertitle"><div class="title">player_input.hpp</div></div>
</div><!--header-->
<div class="contents">
2024-05-29 21:07:31 +00:00
<div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span><span class="preprocessor">#ifndef UTILS_PLAYER_INPUT_HPP</span></div>
<div class="line"><a id="l00002" name="l00002"></a><span class="lineno"> 2</span><span class="preprocessor">#define UTILS_PLAYER_INPUT_HPP</span></div>
2024-05-29 17:40:11 +00:00
<div class="line"><a id="l00003" name="l00003"></a><span class="lineno"> 3</span> </div>
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno"> 4</span><span class="preprocessor">#include &lt;optional&gt;</span></div>
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno"> 5</span><span class="preprocessor">#include &lt;godot_cpp/classes/input.hpp&gt;</span></div>
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno"> 6</span><span class="preprocessor">#include &lt;godot_cpp/classes/input_event.hpp&gt;</span></div>
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno"> 7</span><span class="preprocessor">#include &lt;godot_cpp/classes/node.hpp&gt;</span></div>
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno"> 8</span><span class="preprocessor">#include &lt;godot_cpp/templates/vector.hpp&gt;</span></div>
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno"> 9</span><span class="preprocessor">#include &lt;godot_cpp/variant/callable.hpp&gt;</span></div>
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno"> 10</span> </div>
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno"> 11</span><span class="keyword">namespace </span>gd = godot;</div>
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno"> 12</span> </div>
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span><span class="keyword">namespace </span>utils {</div>
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"><a class="line" href="classutils_1_1PlayerInput.html"> 18</a></span><span class="keyword">class </span><a class="code hl_class" href="classutils_1_1PlayerInput.html">PlayerInput</a> : <span class="keyword">public</span> gd::Node {</div>
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span> GDCLASS(<a class="code hl_class" href="classutils_1_1PlayerInput.html">PlayerInput</a>, gd::Node)</div>
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span> <span class="keyword">static</span> <span class="keywordtype">void</span> _bind_methods();</div>
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span><span class="keyword">public</span>:</div>
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"><a class="line" href="structutils_1_1PlayerInput_1_1Listener.html"> 29</a></span> <span class="keyword">struct </span><a class="code hl_struct" href="structutils_1_1PlayerInput_1_1Listener.html">Listener</a> {</div>
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span> <span class="keyword">friend</span> <span class="keyword">class </span><a class="code hl_class" href="classutils_1_1PlayerInput.html">PlayerInput</a>;</div>
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span> <span class="keyword">private</span>:</div>
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"><a class="line" href="structutils_1_1PlayerInput_1_1Listener.html#aff19336b1eaed1b4df15fecdd70578ba"> 33</a></span> gd::String <a class="code hl_variable" href="structutils_1_1PlayerInput_1_1Listener.html#aff19336b1eaed1b4df15fecdd70578ba">actionNegative</a>{<span class="stringliteral">&quot;&quot;</span>};</div>
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"><a class="line" href="structutils_1_1PlayerInput_1_1Listener.html#a6b1f868fcc48dfded6806b29aa49fdb1"> 35</a></span> gd::String <a class="code hl_variable" href="structutils_1_1PlayerInput_1_1Listener.html#a6b1f868fcc48dfded6806b29aa49fdb1">actionPositive</a>{<span class="stringliteral">&quot;&quot;</span>};</div>
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"><a class="line" href="structutils_1_1PlayerInput_1_1Listener.html#a84833f896b4ccff9b8e3b0ae789726ab"> 40</a></span> <span class="keywordtype">float</span> <a class="code hl_variable" href="structutils_1_1PlayerInput_1_1Listener.html#a84833f896b4ccff9b8e3b0ae789726ab">lastCached</a>{0.f};</div>
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"><a class="line" href="structutils_1_1PlayerInput_1_1Listener.html#ac8a7445f1bdc44fcc65f640447eee2c0"> 42</a></span> gd::Callable <a class="code hl_variable" href="structutils_1_1PlayerInput_1_1Listener.html#ac8a7445f1bdc44fcc65f640447eee2c0">callable</a>;</div>
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"><a class="line" href="structutils_1_1PlayerInput_1_1Listener.html#a70bb4eed0c2610b74107403742eea990"> 44</a></span> <span class="keywordtype">bool</span> <a class="code hl_variable" href="structutils_1_1PlayerInput_1_1Listener.html#a70bb4eed0c2610b74107403742eea990">isMouseEvent</a>{<span class="keyword">false</span>};</div>
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno"> 45</span> </div>
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno"> 46</span> <span class="keyword">public</span>:</div>
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno"> 47</span> <a class="code hl_struct" href="structutils_1_1PlayerInput_1_1Listener.html">Listener</a>() = <span class="keywordflow">default</span>;</div>
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"> 48</span> <a class="code hl_struct" href="structutils_1_1PlayerInput_1_1Listener.html">Listener</a>(gd::String negative, gd::String positive, gd::Callable <a class="code hl_variable" href="structutils_1_1PlayerInput_1_1Listener.html#ac8a7445f1bdc44fcc65f640447eee2c0">callable</a>);</div>
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno"> 49</span> <a class="code hl_struct" href="structutils_1_1PlayerInput_1_1Listener.html">Listener</a>(gd::String action, gd::Callable <a class="code hl_variable" href="structutils_1_1PlayerInput_1_1Listener.html#ac8a7445f1bdc44fcc65f640447eee2c0">callable</a>);</div>
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno"> 50</span> <span class="comment">// evaluate the current state of an action.</span></div>
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno"> 51</span> <span class="keyword">static</span> std::optional&lt;float&gt; evaluate_action(gd::String <span class="keyword">const</span> &amp;action);</div>
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno"> 56</span> <span class="keywordtype">bool</span> <a class="code hl_function" href="structutils_1_1PlayerInput_1_1Listener.html#af989733fa828d5920c3cc26a440f60b1">has_changed</a>(gd::Ref&lt;gd::InputEvent&gt; <span class="keyword">const</span> &amp;event);</div>
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno"> 58</span> <span class="keywordtype">float</span> <a class="code hl_function" href="structutils_1_1PlayerInput_1_1Listener.html#a5d187489ffaac84a884938d81d4a2fdb">evaluate</a>(gd::Ref&lt;gd::InputEvent&gt; <span class="keyword">const</span> &amp;event);</div>
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno"> 59</span> <span class="keywordtype">bool</span> operator==(<a class="code hl_struct" href="structutils_1_1PlayerInput_1_1Listener.html">PlayerInput::Listener</a> <span class="keyword">const</span>&amp; b) <span class="keyword">const</span>;</div>
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno"> 60</span> };</div>
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno"> 61</span><span class="keyword">public</span>:</div>
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno"> 63</span> <span class="keyword">static</span> gd::Vector2 <a class="code hl_function" href="classutils_1_1PlayerInput.html#a689cc968b84d6a92c10c541b97e3477e">get_last_mouse_motion</a>();</div>
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno"> 64</span> </div>
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"> 65</span> <span class="keyword">virtual</span> <span class="keywordtype">void</span> _enter_tree() <span class="keyword">override</span>;</div>
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"> 66</span> <span class="keyword">virtual</span> <span class="keywordtype">void</span> _exit_tree() <span class="keyword">override</span>;</div>
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"> 67</span> <span class="keyword">virtual</span> <span class="keywordtype">void</span> _unhandled_input(gd::Ref&lt;gd::InputEvent&gt; <span class="keyword">const</span> &amp;event) <span class="keyword">override</span>;</div>
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno"> 68</span> <span class="keyword">virtual</span> <span class="keywordtype">void</span> _process(<span class="keywordtype">double</span> deltaTime) <span class="keyword">override</span>;</div>
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno"> 69</span> </div>
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno"> 71</span> <span class="keywordtype">void</span> <a class="code hl_function" href="classutils_1_1PlayerInput.html#a52f0f96cd4732ce06016459094d3a714">listen_to</a>(Listener <span class="keyword">const</span> &amp;listener);</div>
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno"> 76</span> <span class="keywordtype">void</span> <a class="code hl_function" href="classutils_1_1PlayerInput.html#a52f0f96cd4732ce06016459094d3a714">listen_to</a>(gd::String action, gd::Callable callable);</div>
<div class="line"><a id="l00081" name="l00081"></a><span class="lineno"> 81</span> <span class="keywordtype">void</span> <a class="code hl_function" href="classutils_1_1PlayerInput.html#a52f0f96cd4732ce06016459094d3a714">listen_to</a>(gd::String negative, gd::String positive, gd::Callable callable);</div>
<div class="line"><a id="l00082" name="l00082"></a><span class="lineno"> 82</span> </div>
<div class="line"><a id="l00084" name="l00084"></a><span class="lineno"> 84</span> <span class="keywordtype">void</span> <a class="code hl_function" href="classutils_1_1PlayerInput.html#aedfe45a2286098d3e5c9bfc00fddd1e1">stop_listening</a>(Node *node);</div>
<div class="line"><a id="l00086" name="l00086"></a><span class="lineno"> 86</span> <span class="keywordtype">void</span> <a class="code hl_function" href="classutils_1_1PlayerInput.html#aedfe45a2286098d3e5c9bfc00fddd1e1">stop_listening</a>(Listener <span class="keyword">const</span> &amp;listener);</div>
<div class="line"><a id="l00088" name="l00088"></a><span class="lineno"> 88</span> <span class="keywordtype">void</span> <a class="code hl_function" href="classutils_1_1PlayerInput.html#a1b3a6b23e41e3a4b57d916e6ed0fab6b">clear_listeners</a>();</div>
<div class="line"><a id="l00090" name="l00090"></a><span class="lineno"> 90</span> <span class="keywordtype">void</span> <a class="code hl_function" href="classutils_1_1PlayerInput.html#a63928906c8769151ef37adcad505de35">set_device</a>(<span class="keywordtype">int</span> <span class="keywordtype">id</span>);</div>
<div class="line"><a id="l00091" name="l00091"></a><span class="lineno"> 91</span><span class="keyword">private</span>:</div>
<div class="line"><a id="l00093" name="l00093"></a><span class="lineno"><a class="line" href="classutils_1_1PlayerInput.html#a99e2dbf29ad4b1d97e7c295407cff335"> 93</a></span> <span class="keyword">static</span> gd::Vector2 <a class="code hl_variable" href="classutils_1_1PlayerInput.html#a99e2dbf29ad4b1d97e7c295407cff335">lastMouseMotion</a>;</div>
<div class="line"><a id="l00095" name="l00095"></a><span class="lineno"><a class="line" href="classutils_1_1PlayerInput.html#aacf94bfd501145c640767a7018cfdb76"> 95</a></span> <span class="keyword">static</span> <span class="keywordtype">bool</span> <a class="code hl_variable" href="classutils_1_1PlayerInput.html#aacf94bfd501145c640767a7018cfdb76">primaryExists</a>;</div>
<div class="line"><a id="l00100" name="l00100"></a><span class="lineno"><a class="line" href="classutils_1_1PlayerInput.html#a10749b40d6eafb1f6c11dc056f70e380"> 100</a></span> <span class="keywordtype">bool</span> <a class="code hl_variable" href="classutils_1_1PlayerInput.html#a10749b40d6eafb1f6c11dc056f70e380">isPrimary</a>{<span class="keyword">false</span>};</div>
<div class="line"><a id="l00102" name="l00102"></a><span class="lineno"><a class="line" href="classutils_1_1PlayerInput.html#af9aa77b42fac8fb673089d37105b932c"> 102</a></span> <span class="keywordtype">int</span> <a class="code hl_variable" href="classutils_1_1PlayerInput.html#af9aa77b42fac8fb673089d37105b932c">device</a>{-1}; </div>
<div class="line"><a id="l00103" name="l00103"></a><span class="lineno"> 103</span> </div>
<div class="line"><a id="l00105" name="l00105"></a><span class="lineno"><a class="line" href="classutils_1_1PlayerInput.html#a7dff7a6e68eeb89b2ff57b8e5447050d"> 105</a></span> gd::Vector&lt;Listener&gt; <a class="code hl_variable" href="classutils_1_1PlayerInput.html#a7dff7a6e68eeb89b2ff57b8e5447050d">listeners</a>{};</div>
<div class="line"><a id="l00106" name="l00106"></a><span class="lineno"> 106</span>};</div>
<div class="line"><a id="l00107" name="l00107"></a><span class="lineno"> 107</span>}</div>
<div class="line"><a id="l00108" name="l00108"></a><span class="lineno"> 108</span> </div>
<div class="line"><a id="l00109" name="l00109"></a><span class="lineno"> 109</span> </div>
2024-05-29 21:07:31 +00:00
<div class="line"><a id="l00110" name="l00110"></a><span class="lineno"> 110</span><span class="preprocessor">#endif </span><span class="comment">// !UTILS_PLAYER_INPUT_HPP</span></div>
2024-05-29 17:40:11 +00:00
<div class="ttc" id="aclassutils_1_1PlayerInput_html"><div class="ttname"><a href="classutils_1_1PlayerInput.html">utils::PlayerInput</a></div><div class="ttdoc">An event-driven input observer.</div><div class="ttdef"><b>Definition</b> player_input.hpp:18</div></div>
<div class="ttc" id="aclassutils_1_1PlayerInput_html_a10749b40d6eafb1f6c11dc056f70e380"><div class="ttname"><a href="classutils_1_1PlayerInput.html#a10749b40d6eafb1f6c11dc056f70e380">utils::PlayerInput::isPrimary</a></div><div class="ttdeci">bool isPrimary</div><div class="ttdoc">Is this the primary instance.</div><div class="ttdef"><b>Definition</b> player_input.hpp:100</div></div>
<div class="ttc" id="aclassutils_1_1PlayerInput_html_a1b3a6b23e41e3a4b57d916e6ed0fab6b"><div class="ttname"><a href="classutils_1_1PlayerInput.html#a1b3a6b23e41e3a4b57d916e6ed0fab6b">utils::PlayerInput::clear_listeners</a></div><div class="ttdeci">void clear_listeners()</div><div class="ttdoc">Remove all listeners.</div><div class="ttdef"><b>Definition</b> player_input.cpp:132</div></div>
<div class="ttc" id="aclassutils_1_1PlayerInput_html_a52f0f96cd4732ce06016459094d3a714"><div class="ttname"><a href="classutils_1_1PlayerInput.html#a52f0f96cd4732ce06016459094d3a714">utils::PlayerInput::listen_to</a></div><div class="ttdeci">void listen_to(Listener const &amp;listener)</div><div class="ttdoc">Start listening for action.</div><div class="ttdef"><b>Definition</b> player_input.cpp:106</div></div>
<div class="ttc" id="aclassutils_1_1PlayerInput_html_a63928906c8769151ef37adcad505de35"><div class="ttname"><a href="classutils_1_1PlayerInput.html#a63928906c8769151ef37adcad505de35">utils::PlayerInput::set_device</a></div><div class="ttdeci">void set_device(int id)</div><div class="ttdoc">set the device observe events from.</div><div class="ttdef"><b>Definition</b> player_input.cpp:136</div></div>
<div class="ttc" id="aclassutils_1_1PlayerInput_html_a689cc968b84d6a92c10c541b97e3477e"><div class="ttname"><a href="classutils_1_1PlayerInput.html#a689cc968b84d6a92c10c541b97e3477e">utils::PlayerInput::get_last_mouse_motion</a></div><div class="ttdeci">static gd::Vector2 get_last_mouse_motion()</div><div class="ttdoc">Returns the last stored mouse delta.</div><div class="ttdef"><b>Definition</b> player_input.cpp:73</div></div>
<div class="ttc" id="aclassutils_1_1PlayerInput_html_a7dff7a6e68eeb89b2ff57b8e5447050d"><div class="ttname"><a href="classutils_1_1PlayerInput.html#a7dff7a6e68eeb89b2ff57b8e5447050d">utils::PlayerInput::listeners</a></div><div class="ttdeci">gd::Vector&lt; Listener &gt; listeners</div><div class="ttdoc">current listeners for this instance</div><div class="ttdef"><b>Definition</b> player_input.hpp:105</div></div>
<div class="ttc" id="aclassutils_1_1PlayerInput_html_a99e2dbf29ad4b1d97e7c295407cff335"><div class="ttname"><a href="classutils_1_1PlayerInput.html#a99e2dbf29ad4b1d97e7c295407cff335">utils::PlayerInput::lastMouseMotion</a></div><div class="ttdeci">static gd::Vector2 lastMouseMotion</div><div class="ttdoc">The last mouse motion, updated by the primary instance.</div><div class="ttdef"><b>Definition</b> player_input.hpp:93</div></div>
<div class="ttc" id="aclassutils_1_1PlayerInput_html_aacf94bfd501145c640767a7018cfdb76"><div class="ttname"><a href="classutils_1_1PlayerInput.html#aacf94bfd501145c640767a7018cfdb76">utils::PlayerInput::primaryExists</a></div><div class="ttdeci">static bool primaryExists</div><div class="ttdoc">Does a primary instance exist.</div><div class="ttdef"><b>Definition</b> player_input.hpp:95</div></div>
<div class="ttc" id="aclassutils_1_1PlayerInput_html_aedfe45a2286098d3e5c9bfc00fddd1e1"><div class="ttname"><a href="classutils_1_1PlayerInput.html#aedfe45a2286098d3e5c9bfc00fddd1e1">utils::PlayerInput::stop_listening</a></div><div class="ttdeci">void stop_listening(Node *node)</div><div class="ttdoc">Remove any listeners related to node.</div><div class="ttdef"><b>Definition</b> player_input.cpp:118</div></div>
<div class="ttc" id="aclassutils_1_1PlayerInput_html_af9aa77b42fac8fb673089d37105b932c"><div class="ttname"><a href="classutils_1_1PlayerInput.html#af9aa77b42fac8fb673089d37105b932c">utils::PlayerInput::device</a></div><div class="ttdeci">int device</div><div class="ttdoc">which device to observe events from.</div><div class="ttdef"><b>Definition</b> player_input.hpp:102</div></div>
<div class="ttc" id="astructutils_1_1PlayerInput_1_1Listener_html"><div class="ttname"><a href="structutils_1_1PlayerInput_1_1Listener.html">utils::PlayerInput::Listener</a></div><div class="ttdoc">A PlayerInput action listener.</div><div class="ttdef"><b>Definition</b> player_input.hpp:29</div></div>
<div class="ttc" id="astructutils_1_1PlayerInput_1_1Listener_html_a5d187489ffaac84a884938d81d4a2fdb"><div class="ttname"><a href="structutils_1_1PlayerInput_1_1Listener.html#a5d187489ffaac84a884938d81d4a2fdb">utils::PlayerInput::Listener::evaluate</a></div><div class="ttdeci">float evaluate(gd::Ref&lt; gd::InputEvent &gt; const &amp;event)</div><div class="ttdoc">evaluate the event for changes to either actionPositive or actionNegative</div><div class="ttdef"><b>Definition</b> player_input.cpp:56</div></div>
<div class="ttc" id="astructutils_1_1PlayerInput_1_1Listener_html_a6b1f868fcc48dfded6806b29aa49fdb1"><div class="ttname"><a href="structutils_1_1PlayerInput_1_1Listener.html#a6b1f868fcc48dfded6806b29aa49fdb1">utils::PlayerInput::Listener::actionPositive</a></div><div class="ttdeci">gd::String actionPositive</div><div class="ttdoc">Positive action on axis, evaluates to +1.</div><div class="ttdef"><b>Definition</b> player_input.hpp:35</div></div>
<div class="ttc" id="astructutils_1_1PlayerInput_1_1Listener_html_a70bb4eed0c2610b74107403742eea990"><div class="ttname"><a href="structutils_1_1PlayerInput_1_1Listener.html#a70bb4eed0c2610b74107403742eea990">utils::PlayerInput::Listener::isMouseEvent</a></div><div class="ttdeci">bool isMouseEvent</div><div class="ttdoc">If either actionNegative or actionPositive is a mouse event this will be true.</div><div class="ttdef"><b>Definition</b> player_input.hpp:44</div></div>
<div class="ttc" id="astructutils_1_1PlayerInput_1_1Listener_html_a84833f896b4ccff9b8e3b0ae789726ab"><div class="ttname"><a href="structutils_1_1PlayerInput_1_1Listener.html#a84833f896b4ccff9b8e3b0ae789726ab">utils::PlayerInput::Listener::lastCached</a></div><div class="ttdeci">float lastCached</div><div class="ttdoc">The last cached action.</div><div class="ttdef"><b>Definition</b> player_input.hpp:40</div></div>
<div class="ttc" id="astructutils_1_1PlayerInput_1_1Listener_html_ac8a7445f1bdc44fcc65f640447eee2c0"><div class="ttname"><a href="structutils_1_1PlayerInput_1_1Listener.html#ac8a7445f1bdc44fcc65f640447eee2c0">utils::PlayerInput::Listener::callable</a></div><div class="ttdeci">gd::Callable callable</div><div class="ttdoc">The listening function.</div><div class="ttdef"><b>Definition</b> player_input.hpp:42</div></div>
<div class="ttc" id="astructutils_1_1PlayerInput_1_1Listener_html_af989733fa828d5920c3cc26a440f60b1"><div class="ttname"><a href="structutils_1_1PlayerInput_1_1Listener.html#af989733fa828d5920c3cc26a440f60b1">utils::PlayerInput::Listener::has_changed</a></div><div class="ttdeci">bool has_changed(gd::Ref&lt; gd::InputEvent &gt; const &amp;event)</div><div class="ttdoc">Check if this event has any chance to result in a trigger.</div><div class="ttdef"><b>Definition</b> player_input.cpp:47</div></div>
<div class="ttc" id="astructutils_1_1PlayerInput_1_1Listener_html_aff19336b1eaed1b4df15fecdd70578ba"><div class="ttname"><a href="structutils_1_1PlayerInput_1_1Listener.html#aff19336b1eaed1b4df15fecdd70578ba">utils::PlayerInput::Listener::actionNegative</a></div><div class="ttdeci">gd::String actionNegative</div><div class="ttdoc">Negative action on axis, evaluates to -1.</div><div class="ttdef"><b>Definition</b> player_input.hpp:33</div></div>
</div><!-- fragment --></div><!-- contents -->
2024-05-29 22:09:05 +00:00
</div><!-- doc-content -->
2024-05-29 17:40:11 +00:00
<!-- start footer part -->
2024-05-29 22:09:05 +00:00
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><b>player_input.hpp</b></li>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.7 </li>
</ul>
</div>
2024-05-29 17:40:11 +00:00
</body>
</html>