Class: Gemba::HelpWindow
- Inherits:
-
Object
- Object
- Gemba::HelpWindow
- Includes:
- ChildWindow, Locale::Translatable
- Defined in:
- lib/gemba/help_window.rb
Overview
Floating hotkey reference panel toggled by pressing ‘?’.
Non-modal — no grab, no focus steal. Positioned to the right of the main window via ChildWindow#position_near_parent. AppController pauses emulation while the panel is visible and restores play on close.
Constant Summary collapse
- TOP =
'.help_window'
Instance Method Summary collapse
- #hide ⇒ Object
-
#initialize(app:, hotkeys:) ⇒ HelpWindow
constructor
A new instance of HelpWindow.
- #show ⇒ Object
- #visible? ⇒ Boolean
Methods included from ChildWindow
#build_toplevel, #hide_window, #position_near_parent, #show_modal, #show_window, #withdraw
Constructor Details
#initialize(app:, hotkeys:) ⇒ HelpWindow
Returns a new instance of HelpWindow.
15 16 17 18 19 |
# File 'lib/gemba/help_window.rb', line 15 def initialize(app:, hotkeys:) @app = app @hotkeys = hotkeys build_toplevel(translate('settings.hotkeys'), geometry: '220x400') { build_ui } end |
Instance Method Details
#hide ⇒ Object
22 |
# File 'lib/gemba/help_window.rb', line 22 def hide = hide_window(modal: false) |
#show ⇒ Object
21 |
# File 'lib/gemba/help_window.rb', line 21 def show = show_window(modal: false) |
#visible? ⇒ Boolean
23 |
# File 'lib/gemba/help_window.rb', line 23 def visible? = @app.tcl_eval("wm state #{TOP}") == 'normal' |