comparison tests/test_panel.nim @ 1138:02e1d2658ff5

did: more renaming
author sam <sam@basx.dev>
date Tue, 04 Jun 2024 22:08:48 +0700
parents a4aa9f374d44
children 114f395b9144
comparison
equal deleted inserted replaced
1137:a4aa9f374d44 1138:02e1d2658ff5
18 panel.mesh.transform = panel.mesh.transform * Scale(1 / 1.05, 1 / 1.05) 18 panel.mesh.transform = panel.mesh.transform * Scale(1 / 1.05, 1 / 1.05)
19 panel.color = NewVec4f(1, 0, 0, 0.5) 19 panel.color = NewVec4f(1, 0, 0, 0.5)
20 20
21 proc main() = 21 proc main() =
22 # setup engine 22 # setup engine
23 var engine = initEngine("Test panels") 23 var engine = InitEngine("Test panels")
24 engine.initRenderer([]) 24 engine.InitRenderer([])
25 25
26 const B = [0'u8, 0'u8, 0'u8, 255'u8] 26 const B = [0'u8, 0'u8, 0'u8, 255'u8]
27 const T = [0'u8, 0'u8, 0'u8, 0'u8] 27 const T = [0'u8, 0'u8, 0'u8, 0'u8]
28 # build scene 28 # build scene
29 # 29 #
60 60
61 scene.add counterText 61 scene.add counterText
62 scene.add button 62 scene.add button
63 scene.add help_text 63 scene.add help_text
64 scene.add origin 64 scene.add origin
65 engine.loadScene(scene) 65 engine.LoadScene(scene)
66 66
67 while engine.UpdateInputs() and not KeyIsDown(Escape): 67 while engine.UpdateInputs() and not KeyIsDown(Escape):
68 if KeyWasPressed(F1): 68 if KeyWasPressed(F1):
69 button.horizontalAlignment = Left 69 button.horizontalAlignment = Left
70 counterText.horizontalAlignment = Left 70 counterText.horizontalAlignment = Left
89 button.refresh() 89 button.refresh()
90 counterText.refresh() 90 counterText.refresh()
91 origin.refresh() 91 origin.refresh()
92 help_text.refresh() 92 help_text.refresh()
93 93
94 engine.renderScene(scene) 94 engine.RenderScene(scene)
95 engine.destroy() 95 engine.Destroy()
96 96
97 97
98 when isMainModule: 98 when isMainModule:
99 main() 99 main()