a guest Aug 22nd, 2019 75 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- #!/usr/bin/env jruby
- # frozen_string_literal: false
- require 'propane'
- # check for specific keys
- # propane graffiti by 8mana
- # based on code by Casey Reas and Ben Fry
- class CheckKeys < Propane::App
- def settings
- size 120, 120
- def setup
- sketch_title 'check for specific keys'
- def draw
- background 204
- if key_pressed?
- line 30, 60, 90, 60 if key == 'h' || key == 'H'
- line 30, 20, 90, 100 if key == 'n' || key == 'N'
- line 30, 20, 30, 100
- line 90, 20, 90, 100
RAW Paste Data