Sha256: ab01912546622fefd91309b3386708d34f67cdd5514df3a90726e7b38a9595b6
Contents?: true
Size: 713 Bytes
Versions: 1
Compression:
Stored size: 713 Bytes
Contents
# frozen_string_literal: true class Answer < Shoes::Widget attr_reader :mark def initialize_widget(word) mark = nil flow do flow(width: 70, height: 20) { para word } mark = image(File.expand_path(File.join(__FILE__, '../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
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
shoes-4.0.0.pre12 | samples/simple_guess_game.rb |