Sha256: bdcabc0e8b10fc6272c1a30909113634e06d740f83df0fc3f8b49555dbb5deac

Contents?: true

Size: 604 Bytes

Versions: 5

Compression:

Stored size: 604 Bytes

Contents

require_relative 'helpers/example_window'

# Labels can have text and/or icons.
class ExampleState < Fidgit::GuiState
  def initialize
    super

    pack :vertical do
      my_label = label "No clicky"

      list do
        item "chunky bacon", :CHUNKYBACON, tip: "You prefer Chunky Bacon, don't you?"
        item "lentils", :LENTILS, tip: "Lentils? Well, I suppose someone has to like them"

        subscribe :changed do |sender, value|
          my_label.text = "I like #{value} more than anything in the world!"
        end
      end
    end
  end
end

ExampleWindow.new.show

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
fidgit-0.0.6alpha examples/list_example.rb
fidgit-0.0.5alpha examples/list_example.rb
fidgit-0.0.4alpha examples/list_example.rb
fidgit-0.0.3alpha examples/list_example.rb
fidgit-0.0.2alpha examples/list_example.rb