Class: Cliptic::Main::Player::Menus::Pause

Inherits:
Interface::Menu show all
Defined in:
lib/cliptic/main.rb

Constant Summary

Constants included from Chars

Chars::Block, Chars::HL, Chars::LL, Chars::LS, Chars::LU, Chars::MS, Chars::Nums, Chars::RL, Chars::RS, Chars::RU, Chars::TD, Chars::TL, Chars::TR, Chars::TU, Chars::Tick, Chars::VL, Chars::XX

Instance Attribute Summary collapse

Attributes inherited from Interface::Menu

#height, #selector

Attributes inherited from Interface::Menu_Box

#bot_b, #draw_bars, #logo, #top_b

Attributes inherited from Windows::Window

#centered_x, #centered_y, #col, #line, #x, #y

Instance Method Summary collapse

Methods inherited from Interface::Menu

#back, #choose_opt, #enter, #hide, #redraw, #reset_pos, #show

Methods inherited from Interface::Menu_Box

#add_title, #draw, #line, #reset_pos

Methods inherited from Windows::Window

#add_str, #bold, #clear, #color, #draw, #move, #refresh, #reset_attrs, #reset_pos, #setpos, #standend, #standout, #time_str, #wrap_str

Methods included from Chars

small_num

Constructor Details

#initialize(game:) ⇒ Pause

Returns a new instance of Pause.



374
375
376
377
378
# File 'lib/cliptic/main.rb', line 374

def initialize(game:)
  super
  @game = game
  @draw_bars = false
end

Instance Attribute Details

#gameObject (readonly)

Returns the value of attribute game.



373
374
375
# File 'lib/cliptic/main.rb', line 373

def game
  @game
end

Instance Method Details

#ctrlsObject



388
389
390
391
392
# File 'lib/cliptic/main.rb', line 388

def ctrls
  super.merge({
    ?q => ->{back; game.unpause}
  })
end

#optsObject



379
380
381
382
383
384
# File 'lib/cliptic/main.rb', line 379

def opts
  {
    "Continue" => ->{back; game.unpause},
    "Exit Game" => ->{back; game.exit}
  }
end

#titleObject



385
386
387
# File 'lib/cliptic/main.rb', line 385

def title
  "Paused"
end