Method: Fidgit::MenuPane#initialize
- Defined in:
- lib/fidgit/elements/menu_pane.rb
#initialize(options = {}, &block) ⇒ MenuPane
Returns a new instance of MenuPane.
75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 |
# File 'lib/fidgit/elements/menu_pane.rb', line 75 def initialize( = {}, &block) = { background_color: default(:color), z: Float::INFINITY, show: true, }.merge! state = $window.current_game_state if state.is_a? GuiState cursor = $window.current_game_state.cursor = { x: cursor.x, y: cursor.y, }.merge! end @items = nil super() @items = vertical spacing: 0, padding: 0 if [:show] and state.is_a? GuiState show end end |