class Rcade::Menu::Screen

Public Class Methods

inherited(subclass) click to toggle source
# File lib/rcade/menu/screen.rb, line 7
def self.inherited(subclass)
  subclass.extend DSL
end

Public Instance Methods

button_down(button) click to toggle source
# File lib/rcade/menu/screen.rb, line 37
def button_down(button)
  case button
  when Quit  then close
  when Enter then menu.select_current_option
  when P1Up    then menu.decrement_selection if menu.alignment == :vertical
  when P1Down  then menu.increment_selection if menu.alignment == :vertical
  when P1Left  then menu.decrement_selection if menu.alignment == :horizontal
  when P1Right then menu.increment_selection if menu.alignment == :horizontal
  end
end
draw() click to toggle source
# File lib/rcade/menu/screen.rb, line 48
def draw
  menu.render(self)
end
menu() click to toggle source