summaryrefslogtreecommitdiffhomepage
path: root/samples/02_input_basics/02_mouse
diff options
context:
space:
mode:
authorAmir Rajan <[email protected]>2021-08-07 00:13:33 -0500
committerAmir Rajan <[email protected]>2021-08-07 00:13:33 -0500
commita503afe87619ff82201c0a43818fa1c3f070a548 (patch)
tree0b228a6456d17f6d0c6ea54c9ecd6a045ddbdf59 /samples/02_input_basics/02_mouse
parentbea150381f495630f92f89d23d5f3445ec289b2d (diff)
downloaddragonruby-game-toolkit-contrib-a503afe87619ff82201c0a43818fa1c3f070a548.tar.gz
dragonruby-game-toolkit-contrib-a503afe87619ff82201c0a43818fa1c3f070a548.zip
Samples folder synced.
Diffstat (limited to 'samples/02_input_basics/02_mouse')
-rw-r--r--samples/02_input_basics/02_mouse/app/main.rb12
1 files changed, 4 insertions, 8 deletions
diff --git a/samples/02_input_basics/02_mouse/app/main.rb b/samples/02_input_basics/02_mouse/app/main.rb
index 43217f5..823336c 100644
--- a/samples/02_input_basics/02_mouse/app/main.rb
+++ b/samples/02_input_basics/02_mouse/app/main.rb
@@ -61,11 +61,7 @@ def small_label args, x, row, message
# This method effectively combines the row_to_px and small_font methods
# It changes the given row value to a DragonRuby pixel value
# and adds the customization parameters
- [x, row_to_px(args, row), message, small_font]
-end
-
-def small_font
- [-2, 0, 0, 0, 0, 255]
+ { x: x, y: row_to_px(args, row), text: message, alignment_enum: -2 }
end
def row_to_px args, row_number
@@ -81,7 +77,7 @@ def tick_instructions args, text, y = 715
args.state.key_event_occurred = true
end
- args.outputs.debug << [0, y - 50, 1280, 60].solid
- args.outputs.debug << [640, y, text, 1, 1, 255, 255, 255].label
- args.outputs.debug << [640, y - 25, "(click to dismiss instructions)" , -2, 1, 255, 255, 255].label
+ args.outputs.debug << { x: 0, y: y - 50, w: 1280, h: 60 }.solid!
+ args.outputs.debug << { x: 640, y: y, text: text, size_enum: 1, alignment_enum: 1, r: 255, g: 255, b: 255 }.label!
+ args.outputs.debug << { x: 640, y: y - 25, text: "(click to dismiss instructions)", size_enum: -2, alignment_enum: 1, r: 255, g: 255, b: 255 }.label!
end