Working on fixing minor bugs

This commit is contained in:
Vladislav Khorev committed 2026-03-05 23:58:35 +03:00
1 parent e84a094ad9
commit a8c76dee3c
32 files changed
+288 -110

No files matched your search

+16
View File
@@ -103,6 +103,22 @@ namespace ZL {
uiManager.setButtonCallback("shootButton2", [this](const std::string& name) {
onFirePressed();
});
uiManager.setButtonCallback("plusButton", [this](const std::string& name) {
int newVel = Environment::shipState.selectedVelocity+1;
if (newVel > 4)
{
newVel = 4;
}
onVelocityChanged(newVel);
});
uiManager.setButtonCallback("minusButton", [this](const std::string& name) {
int newVel = Environment::shipState.selectedVelocity-1;
if (newVel < 0)
{
newVel = 0;
}
onVelocityChanged(newVel);
});
uiManager.setSliderCallback("velocitySlider", [this](const std::string& name, float value) {
int newVel = roundf(value * 10);