Sha256: afffb7a6cb3c037cc6641e67a49a9e0b9cd8ad22510419ce3f2b40f16926ee45
Contents?: true
Size: 1007 Bytes
Versions: 16
Compression:
Stored size: 1007 Bytes
Contents
require_relative 'helpers/example_window' # Labels can have text and/or icons. class ExampleState < Fidgit::GuiState def initialize super 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 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
16 entries across 16 versions & 1 rubygems