summaryrefslogtreecommitdiffhomepage
path: root/test/controller.rb
blob: 72a193f99b04f3dbaebb4fad23dcdfa8c49c14e5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
require 'ruby2d'

set width: 300, height: 200, title: "Ruby 2D — Controller"

on_controller do |which, is_axis, axis, val, is_btn, btn, pressed|
  puts "=== Controller Pressed ===",
       "which: which",
       "is_axis: #{is_axis}",
       "axis: #{axis}",
       "val: #{val}",
       "is_btn: #{is_btn}",
       "btn: #{btn}",
       "pressed: #{pressed}", ""
end

show