Sha256: fe2609fc9ffce62a24fc55ffc0290332843174f5529142586be637ff21fc4c09

Contents?: true

Size: 527 Bytes

Versions: 2

Compression:

Stored size: 527 Bytes

Contents

# key

b=box({color: :orange, atome_id: :the_box, x: 69})
t=text({content: "type some text over the box, \n touch the circle to stop the input capture \n ", x: 150, y: 20})
b.key(options: :press) do |key|
  t.content(key.key_code)
end
c=circle
c.x=c.y=96
c.touch do
  b.key(options: :stop)
end

c2=circle({width: 300,y: 300, color: :orange})
t2=c2.text({content: "Here key will be captured on key up!", color: :black, x: 3, y: 15 , center: true})
c2.key({options: :up}) do |evt|
  t2.content(evt.key_code)
  t2.center(true)
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
atome-0.4.7.0 vendor/assets/build/medias/rubies/examples/Old_examples/key.rb
atome-0.4.5.4 vendor/assets/build/medias/rubies/examples/Old_examples/key.rb