rename keycode, mousecode enumerations

This commit is contained in:
MihailRis
2025-04-02 17:39:31 +03:00
parent 9843a1fc27
commit 881edb7b28
22 changed files with 160 additions and 154 deletions
+5 -5
View File
@@ -252,15 +252,15 @@ void Hud::updateHotbarControl() {
player.setChosenSlot(slot);
}
for (
int i = static_cast<int>(keycode::NUM_1);
i <= static_cast<int>(keycode::NUM_9);
int i = static_cast<int>(Keycode::NUM_1);
i <= static_cast<int>(Keycode::NUM_9);
i++
) {
if (input.jpressed(static_cast<keycode>(i))) {
player.setChosenSlot(i - static_cast<int>(keycode::NUM_1));
if (input.jpressed(static_cast<Keycode>(i))) {
player.setChosenSlot(i - static_cast<int>(Keycode::NUM_1));
}
}
if (input.jpressed(keycode::NUM_0)) {
if (input.jpressed(Keycode::NUM_0)) {
player.setChosenSlot(9);
}
}
+3 -3
View File
@@ -180,13 +180,13 @@ void LevelScreen::saveWorldPreview() {
void LevelScreen::updateHotkeys() {
auto& settings = engine.getSettings();
if (input.jpressed(keycode::O)) {
if (input.jpressed(Keycode::O)) {
settings.graphics.frustumCulling.toggle();
}
if (input.jpressed(keycode::F1)) {
if (input.jpressed(Keycode::F1)) {
hudVisible = !hudVisible;
}
if (input.jpressed(keycode::F3)) {
if (input.jpressed(Keycode::F3)) {
debug = !debug;
hud->setDebug(debug);
renderer->setDebug(debug);