File tree Expand file tree Collapse file tree 2 files changed +13
-3
lines changed
processing_app/library/library_proxy Expand file tree Collapse file tree 2 files changed +13
-3
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 11load_libraries :library_proxy , :mouse_thing
22
3- attr_reader :mouseThing
3+ attr_reader :mouse_proxy
44
55def settings
66 size ( 800 , 600 )
77end
88
99def setup
1010 sketch_title 'Mouse Event'
11- frameRate ( 1 )
11+ frame_rate ( 1 )
1212 MouseThing . new ( self )
1313end
1414
You can’t perform that action at this time.
0 commit comments