Sha256: 9ab17db650f62cdacc44e814808b4c831b09ebfda6e0b7aeeef0372676fc865b
Contents?: true
Size: 596 Bytes
Versions: 5
Compression:
Stored size: 596 Bytes
Contents
# encoding: utf-8 # frozen_string_literal: true # require_relative '../../lib/propane' # temporary local # Demo of Mouse Button class MouseButtonDemo < Propane::App # Click within the image and press # the left and right mouse buttons to # change the value of the rectangle def setup size 300, 200 end def draw rect(25, 25, 150, 80) end def mouse_pressed case mouse_button when LEFT fill 0 when RIGHT fill 255 when CENTER fill 125 else fill 200, 0, 0 end end end MouseButtonDemo.new title: 'Mouse Button Demo'
Version data entries
5 entries across 5 versions & 1 rubygems