Sha256: 8f98ab37a6a5fb97af84378930623dd9d8f5226c8cca24de31fbd65a90403dd4
Contents?: true
Size: 777 Bytes
Versions: 18
Compression:
Stored size: 777 Bytes
Contents
# frozen_string_literal: true b = box({ left: 666, color: :blue, smooth: 6, id: :the_box2 }) t=text({id: :the_text, data: 'type of touch : ?'}) t.touch(:down) do |event| puts event[:pageX] puts event[:pageY] b.touch({remove: :down}) # b.touch(:remove) # or b.touch(false) to remove all touches bindings t.data('touch down killed') end b.touch(true) do # t.data('type of touch : ?') b.color(:red) puts 'box tapped' end b.touch(:long) do t.data('type of touch is : long ') b.color(:black) end b.touch(:up) do t.data('type of touch is : up ') b.color(:orange) end b.touch(:down) do t.data('type of touch is : down ') b.color(:white) end b.touch(:double) do t.color(:red) t.data('type of touch is : double ') b.color(:yellowgreen) end
Version data entries
18 entries across 18 versions & 1 rubygems