File tree Expand file tree Collapse file tree 2 files changed +13
-2
lines changed
processing_app/library/library_proxy Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Original file line number Diff line number Diff line change 11class MouseThing < LibraryProxy
2+ attr_reader :app , :count
3+ def initialize ( app )
4+ @app = app
5+ @count = 0
6+ end
7+
28 def draw
39 end
410
511 def mouseEvent ( event )
612 case event . action
713 when MouseEvent ::CLICK
8- puts 'CLICK'
14+ # puts 'CLICK'
15+ app . send :puts , event . toString
916 when MouseEvent ::DRAG
1017 puts 'DRAG'
18+ when MouseEvent ::WHEEL
19+ @count += event . getCount
20+ puts count
1121 end
1222 end
1323end
Original file line number Diff line number Diff line change 33
44class MouseEventDemo < Propane ::App
55 load_libraries :library_proxy , :mouse_thing
6+ attr_reader :thing
67
78 def settings
89 size ( 800 , 600 )
910 end
1011
1112 def setup
1213 sketch_title 'Mouse Event Demo'
13- MouseThing . new ( self )
14+ @thing = MouseThing . new ( self )
1415 end
1516
1617 def draw
You can’t perform that action at this time.
0 commit comments