Sha256: 0d14fa3f99438c4c51df46eb66784119f7bb49346d20ca32b1606dff4badb334

Contents?: true

Size: 309 Bytes

Versions: 10

Compression:

Stored size: 309 Bytes

Contents

# Move the mouse to position the shape. 
# Press the mouse button to invert the color. 


def setup
  size 640, 360
  fill 126
  background 102
end

def draw
  mouse_pressed? ? stroke(255) : stroke(0)
  line mouse_x - 66, mouse_y, mouse_x + 66, mouse_y
  line mouse_x, mouse_y - 66, mouse_x, mouse_y + 66
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
ruby-processing-2.6.3 samples/processing_app/basics/input/mouse_press.rb
ruby-processing-2.6.2 samples/processing_app/basics/input/mouse_press.rb
ruby-processing-2.6.1 samples/processing_app/basics/input/mouse_press.rb
ruby-processing-2.6.0 samples/processing_app/basics/input/mouse_press.rb
ruby-processing-2.5.1 samples/processing_app/basics/input/mouse_press.rb
ruby-processing-2.5.0 samples/processing_app/basics/input/mouse_press.rb
ruby-processing-2.4.4 samples/processing_app/basics/input/mouse_press.rb
ruby-processing-2.4.3 samples/processing_app/basics/input/mouse_press.rb
ruby-processing-2.4.2 samples/processing_app/basics/input/mouse_press.rb
ruby-processing-2.4.1 samples/processing_app/basics/input/mouse_press.rb