Sha256: 095a46d9468e395d492764d4617c405f994394869afbc5fe34aae3a7e31ae07c
Contents?: true
Size: 653 Bytes
Versions: 2
Compression:
Stored size: 653 Bytes
Contents
class Answer < Shoes::Widget attr_reader :mark def initialize word mark = nil flow do flow(width: 70, height: 20){para word} mark = image(File.join(Shoes::DIR, 'samples/loogink.png'), width: 20, height: 20).hide end @mark = mark end end Shoes.app width: 200, height: 85 do stack width: 0.5, height:1.0 do background palegreen para '1. apple' ans = answer '2. tomato' para '3. orange' button('Ans.'){ans.mark.toggle} end stack width: 0.5, height: 1.0 do background lightsteelblue para '1. cat' para '2. dog' ans = answer '3. bird' button('Ans.'){ans.mark.toggle} end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
shoes-4.0.0.pre2 | samples/simple-guess-game.rb |
shoes-4.0.0.pre1 | samples/simple-guess-game.rb |