Class: RoadToRubykaigi::OpeningScreen
- Inherits:
-
Object
- Object
- RoadToRubykaigi::OpeningScreen
- Defined in:
- lib/road_to_rubykaigi/opening_screen.rb
Constant Summary collapse
- WIDTH =
10- OFFSET =
30- DELAY =
0.75- LOGO =
<<~LOGO ╔═══════╗ ║ ║ ║ ║ ║ ║ ║ ║ ╠═════╦═╝ ╔═══════╗ ╔═══════║ ╔══════╣ ║ ╚═╗ ║ ║ ║ ║ ╔╝ ║ ══╬══ ╔═══╗ ║ ║ ║ ║ ║ ║ ║ ║ ║ ║ ║ ║ ║ ╚═══════╝ ╚═══════║ ╚═══════╝ ║ ╚═══╝ ╔═══════╗ ║ ║ ║ ║ ║ ║ ║ ║ ║ ║ ║ ║ ║ ╔═══════║ ║ ║ ║ ║ ║ ║ ║ ║ ║ ║ ║ ╠═════╦═╝ ║ ║ ╠══════╗ ║ ║ ╠═════╦═╝ ╔═══════║ ║ ║ ║ ╚═╗ ║ ║ ║ ╚╗ ╚═══════╣ ║ ╚═╗ ║ ║ ║ ╚═══════╣ ║ ║ ║ ║ ║ ║ ║ ║ ║ ║ ║ ║ ║ ║ ║ ║ ║ ╚═══════║ ╚═══════╝ ════════╝ ║ ║ ╚═══════║ ║ ════════╝ ║ LOGO
- PLAYER =
<<~PLAYER ╭──────╮ │。・◡・│_◢◤ ╰ᜊ───ᜊ─╯ PLAYER
- VERSION_ROW =
25
Instance Method Summary collapse
Instance Method Details
#display ⇒ Object
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 |
# File 'lib/road_to_rubykaigi/opening_screen.rb', line 32 def display loop do ANSI.clear render $stdin.raw do if handle_input == :SELECTED item = [@menu_index] case item when :calibrate CalibrationScreen.new.display when :input_source Config.cycle_input_source @menu_items = nil @menu_index = .index(:input_source) || 0 when :open_controller GameServer.start GameServer.open_controller else return item end end move_player sleep Manager::GameManager::FRAME_RATE end end end |