Sha256: 5648a832cfbf478ec03d3ea74311ff45e0649778a642c94282e7f93efc9a7d05
Contents?: true
Size: 1020 Bytes
Versions: 2
Compression:
Stored size: 1020 Bytes
Contents
require_relative 'helpers/example_window' # Labels can have text and/or icons. class ExampleState < Fidgit::GuiState def initialize super pack :vertical, background_color: Gosu::Color.rgb(255, 0, 0) do label "Hello!", tip: 'A label with text' label "Hello!", icon: Gosu::Image["head_icon.png"], tip: 'A label with text & icon' label '', icon: Gosu::Image["head_icon.png"], tip: 'A label with just icon' label '', background_color: Gosu::Color.rgb(0, 255, 0), tip: 'No text or icon' end pack :vertical do label ":left justification", width: 400, background_color: Gosu::Color.rgb(0, 100, 0), justify: :left, tip: 'A label with text' label ":right justification", width: 400, background_color: Gosu::Color.rgb(0, 100, 0), justify: :right, tip: 'A label with text' label ":center justification", width: 400, background_color: Gosu::Color.rgb(0, 100, 0), justify: :center, tip: 'A label with text' end end end ExampleWindow.new.show
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
fidgit-0.0.6alpha | examples/label_example.rb |
fidgit-0.0.5alpha | examples/label_example.rb |