You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/// Causes the panel to be rendered (shown to the program user) each render frame, if it is not already shown. If RealTimeUpdate is true, the panel's UpdateLayout
151
-
/// handler is added to the Program.UpdateRealTimeLayout event handler list. If RealTimeUpdate is false, it simply calls UpdateLayout once.
176
+
/// Causes the panel to be rendered (shown to the program user) each render frame, and to accept keyboard input if AcceptsKeyboardInput is true,
177
+
/// if it is not already shown. If RealTimeUpdate is true, the panel's UpdateLayout handler is added to the Program.UpdateRealTimeLayout event
178
+
/// handler list. If RealTimeUpdate is false, it simply calls UpdateLayout once.
152
179
/// </summary>
153
180
publicvoidShow()
154
181
{
@@ -160,23 +187,29 @@ public void Show()
160
187
UpdateLayout(this,newUpdateEventArgs(0f));
161
188
162
189
Engine.Render+=Render;
163
-
Engine.AddToKeyPressFront(OnKeyPress);
190
+
191
+
if(_acceptsKeyboardInput)
192
+
Engine.AddToKeyPressFront(OnKeyPress);
193
+
164
194
Shown=true;
165
195
}
166
196
else
167
197
Console.WriteLine("WARNING: Tried to show panel that is already shown... BAD!!!");
168
198
}
169
199
170
200
/// <summary>
171
-
/// Causes the panel to stop being rendered (shown to the user), if it is currently shown. If RealTimeUpdate is true, the panel's UpdateLayout handler is
172
-
/// removed from the Program.UpdateRealTimeLayout event handler list.
201
+
/// Causes the panel to stop being rendered (shown to the user) and to stop receiving keyboard input, if it is currently shown.
202
+
/// If RealTimeUpdate is true, the panel's UpdateLayout handler is removed from the Program.UpdateRealTimeLayout event handler list.
<divid="projectbrief">Window/panel display utility library written with roguelike/2D game development in mind, on top of the C# full color console library RLNET.</div>
<trid="row_0_0_"><tdclass="entry"><spanstyle="width:32px;display:inline-block;"> </span><spanclass="icona"><spanclass="icon">C</span></span><aclass="el" href="class_win_man_1_1_key_handler.html" target="_self">KeyHandler</a></td><tdclass="desc"><aclass="el" href="class_win_man_1_1_key_handler.html" title="KeyHandler can be subclassed to represent anything that handles keys. Panels have an OnKeyPress funct...">KeyHandler</a> can be subclassed to represent anything that handles keys. Panels have an OnKeyPress function by default, so this class can be subclassed to represents something that ONLY handles keys. This allows objects that are not panels to handle keypresses. </td></tr>
70
+
<trid="row_0_1_" class="even"><tdclass="entry"><spanstyle="width:32px;display:inline-block;"> </span><spanclass="icona"><spanclass="icon">C</span></span><aclass="el" href="class_win_man_1_1_key_press_event_args.html" target="_self">KeyPressEventArgs</a></td><tdclass="desc">Passed to KeyPressEventHandler functions. Contains an RLKeyPress detailing information about the key that was pressed. Cancelable. </td></tr>
71
+
<trid="row_0_2_"><tdclass="entry"><spanstyle="width:32px;display:inline-block;"> </span><spanclass="icona"><spanclass="icon">C</span></span><aclass="el" href="class_win_man_1_1_panel.html" target="_self">Panel</a></td><tdclass="desc">This class is designed to be subclassed by any entity that wishes to have a section of the root console on which to render. </td></tr>
72
+
<trid="row_0_3_" class="even"><tdclass="entry"><spanstyle="width:32px;display:inline-block;"> </span><spanclass="icona"><spanclass="icon">C</span></span><aclass="el" href="class_win_man_1_1_screen.html" target="_self">Screen</a></td><tdclass="desc">This class is designed to be subclassed to represent any collection of related panels. This could be panels that resize relative to each other, or even just panels that will be shown and hidden as one unit. </td></tr>
73
+
</table>
74
+
</div><!-- directory -->
75
+
</div><!-- contents -->
76
+
<!-- start footer part -->
77
+
<hrclass="footer"/><addressclass="footer"><small>
78
+
Generated by  <ahref="http://www.doxygen.org/index.html">
<divid="projectbrief">Window/panel display utility library written with roguelike/2D game development in mind, on top of the C# full color console library RLNET.</div>
<divclass="title">WinMan.KeyHandler Member List</div></div>
68
+
</div><!--header-->
69
+
<divclass="contents">
70
+
71
+
<p>This is the complete list of members for <aclass="el" href="class_win_man_1_1_key_handler.html">WinMan.KeyHandler</a>, including all inherited members.</p>
0 commit comments