We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b08fc6e commit adfcb83Copy full SHA for adfcb83
2 files changed
processing_app/library/library_proxy/library/mouse_thing/mouse_thing.rb
@@ -0,0 +1,13 @@
1
+class MouseThing < LibraryProxy
2
+ def draw
3
+ end
4
+
5
+ def mouseEvent(event)
6
+ case event.action
7
+ when MouseEvent::CLICK
8
+ puts 'CLICK'
9
+ when MouseEvent::DRAG
10
+ puts 'DRAG'
11
12
13
+end
processing_app/library/library_proxy/mouse_event_demo.rb
@@ -0,0 +1,17 @@
+load_libraries :library_proxy, :mouse_thing
+attr_reader :mouseThing
+def settings
+ size(800, 600)
+def setup
+ sketch_title 'Mouse Event'
+ frameRate(1)
+ MouseThing.new(self)
14
15
+def draw
16
+ background(255)
17
0 commit comments