chore: split monolithic header to proper program files, add vec2 ruby class to proxy element position etc., other cleanup

This commit is contained in:
2026-06-01 22:13:50 +01:00
parent 872d878ddc
commit dcb8b46245
21 changed files with 3153 additions and 2037 deletions
+4 -3
View File
@@ -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
+4 -4
View File
@@ -1,4 +1,4 @@
App.run 720, 480, "Stress Test", fps: 120
App.run 720, 480, "Stress Test", fps: 60
scene = Scene.new
@@ -30,7 +30,7 @@ App.localize(:en, :btn_text, "Stress Test %{count}")
App.localize(:en, :text, "Random Text")
1.times do |i|
1000.times do |i|
elements << ElementText.new(
:text,
font,
@@ -43,7 +43,7 @@ App.localize(:en, :text, "Random Text")
)
end
500.times do |i|
1000.times do |i|
elements << ElementImage.new(
animations.sample,
position: { x: rand(0..700), y: rand(0..450) },
@@ -54,7 +54,7 @@ end
)
end
500.times do |i|
1000.times do |i|
elements << ElementRect.new(
20 + rand(100),
20 + rand(100),