Sha256: e1626fb6cbd665566f56c3634ed308ee104a7aff3c81cf31fa76f48018fb3f5d

Contents?: true

Size: 681 Bytes

Versions: 2

Compression:

Stored size: 681 Bytes

Contents

require 'glimmer_klondike_solitaire/model/game'

class GlimmerKlondikeSolitaire
  module View
    class ActionPanel
      include Glimmer::UI::CustomWidget

      option :game
      
      body {
        composite {
          grid_layout(1, false) {
            margin_width 10
            margin_height 0
            margin_top 10
            margin_bottom 5
          }
          
          background :dark_green
          
          button {
            layout_data :center, :center, true, false
            
            text 'Restart Game'
            
            on_widget_selected {
              game.restart!
            }
          }
        }
      }
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
glimmer_klondike_solitaire-1.1.0 app/glimmer_klondike_solitaire/view/action_panel.rb
glimmer_klondike_solitaire-1.0.1 app/glimmer_klondike_solitaire/view/action_panel.rb