chore: split monolithic header to proper program files, add vec2 ruby class to proxy element position etc., other cleanup
This commit is contained in:
+4
-3
@@ -1,4 +1,4 @@
|
||||
App.run 720, 480, "Button Test", fps: 240
|
||||
App.run 720, 480, "Button Test", fps: 60
|
||||
|
||||
main_scene = Scene.new
|
||||
|
||||
@@ -18,7 +18,7 @@ text = ElementText.new :btn_text, default_font, 0xFFFF00, {name: "Me"}, position
|
||||
|
||||
rect = ElementRect.new 100, 25, 0xFF0000, position: {x: 50, y: 50}, z: 0, rotation: 60, scale: { x: 1, y: 1 }, alpha: 0.8, click_mode: :block
|
||||
|
||||
image_element = ElementImage.new bg_animation, position: {x: 0, y: 0}, z: -1, click_mode: :ignore, alpha: 1
|
||||
image_element = ElementImage.new bg_animation, position: {x: 0, y: 0}, z: -1, click_mode: :block, alpha: 1
|
||||
|
||||
pp text, rect, image_element
|
||||
|
||||
@@ -26,7 +26,7 @@ end_scene = Scene.new
|
||||
end_scene << rect
|
||||
|
||||
text.click do
|
||||
App.switch_to end_scene
|
||||
#App.switch_to end_scene
|
||||
end
|
||||
|
||||
image_element.click do
|
||||
@@ -75,6 +75,7 @@ App.update do |delta_time|
|
||||
elsif elem == text
|
||||
pp "Down over text element"
|
||||
end
|
||||
elem.position.x += 10
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user