update keyboard shortcuts

This commit is contained in:
2026-06-23 21:43:34 +02:00
parent f818c90af0
commit 31a8915b0f
9 changed files with 151 additions and 81 deletions

View File

@@ -6,6 +6,7 @@
#include <QWidget>
#include "BuilderModeExitedEvent.h"
#include "BuildHotkeyPressedEvent.h"
#include "BuildingType.h"
#include "DemolishModeChangedEvent.h"
#include "EventHandler.h"
@@ -15,7 +16,8 @@ class QPushButton;
class BuildButtonGrid : public QWidget,
public CombinedEventHandler<BuilderModeExitedEvent,
DemolishModeChangedEvent>
DemolishModeChangedEvent,
BuildHotkeyPressedEvent>
{
Q_OBJECT
@@ -29,6 +31,7 @@ public:
private:
void handleEvent(std::shared_ptr<const BuilderModeExitedEvent> event) override;
void handleEvent(std::shared_ptr<const DemolishModeChangedEvent> event) override;
void handleEvent(std::shared_ptr<const BuildHotkeyPressedEvent> event) override;
private slots:
void onBuildButton(int index);