Mercurial > games > semicongine
comparison tests/test_panel.nim @ 1135:74957cbf589b
fix: update tests according to some API renaming
author | sam <sam@basx.dev> |
---|---|
date | Mon, 03 Jun 2024 16:05:17 +0700 |
parents | 73b572f82a1f |
children | 71315636ba82 |
comparison
equal
deleted
inserted
replaced
1134:055eb17ce31e | 1135:74957cbf589b |
---|---|
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 |
71 elif keyWasPressed(F2): | 71 elif KeyWasPressed(F2): |
72 button.horizontalAlignment = Center | 72 button.horizontalAlignment = Center |
73 counterText.horizontalAlignment = Center | 73 counterText.horizontalAlignment = Center |
74 elif keyWasPressed(F3): | 74 elif KeyWasPressed(F3): |
75 button.horizontalAlignment = Right | 75 button.horizontalAlignment = Right |
76 counterText.horizontalAlignment = Right | 76 counterText.horizontalAlignment = Right |
77 elif keyWasPressed(F4): | 77 elif KeyWasPressed(F4): |
78 button.verticalAlignment = Top | 78 button.verticalAlignment = Top |
79 counterText.verticalAlignment = Top | 79 counterText.verticalAlignment = Top |
80 elif keyWasPressed(F5): | 80 elif KeyWasPressed(F5): |
81 button.verticalAlignment = Center | 81 button.verticalAlignment = Center |
82 counterText.verticalAlignment = Center | 82 counterText.verticalAlignment = Center |
83 elif keyWasPressed(F6): | 83 elif KeyWasPressed(F6): |
84 button.verticalAlignment = Bottom | 84 button.verticalAlignment = Bottom |
85 counterText.verticalAlignment = Bottom | 85 counterText.verticalAlignment = Bottom |
86 | 86 |
87 engine.processEvents(button) | 87 engine.ProcessEvents(button) |
88 | 88 |
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() |