vendor/assets/src/medias/rubies/examples/text.rb in atome-0.5.3.7.3 vs vendor/assets/src/medias/rubies/examples/text.rb in atome-0.5.3.7.8

- old
+ new

@@ -1,27 +1,33 @@ # frozen_string_literal: true my_text = Atome.new( text: { renderers: [:browser], id: :text1, type: :text, parents: [:view], children: [], visual: { size: 33 }, data: 'My first text!', left: 120, top: 33, width: 199, height: 33, - color: { renderers: [:browser], id: :c31, type: :color, parents: [:text1], children: [], - red: 0.6, green: 0.6, blue: 0.6, alpha: 1 } + } ) +Atome.new(color: { renderers: [:browser], id: :c31, type: :color, parents: [:text1], children: [], + red: 0.6, green: 0.6, blue: 0.6, alpha: 1 }) + wait 1 do my_text.data(:kool) end text({ id: :the_text, left: 0 }) -text2 = Atome.new( - text: { renderers: [:browser], id: :text2, type: :text, parents: [:view], children: [], visual: { size: 33 }, - data: 'My second text!', left: 333, top: 33, width: 199, height: 33, - color: { renderers: [:browser], id: :c31, type: :color, parents: [:text1], children: [], - red: 0.6, green: 0.6, blue: 0.6, alpha: 1 } - } +text2=Atome.new( + text: { renderers: [:browser], id: :text2, type: :text, parents: [:view], children: [], visual: { size: 33 }, + data: 'My second text!', left: 333, top: 33, width: 199, height: 33, + + } ) + + + +Atome.new(color: { renderers: [:browser], id: :c33, type: :color, parents: [:text2], children: [], + red: 0.6, green: 0.6, blue: 0.1, alpha: 1 }) wait 2 do text2.data(:ok) end b = box({ left: 66, top: 66, drag: true })