float the build buttons as a horizontal bar over the game world and show key bindings inside build buttons
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
#pragma once
|
||||
|
||||
#include <QString>
|
||||
|
||||
#include "BuildingType.h"
|
||||
#include "WorldCamera.h"
|
||||
|
||||
class QKeyEvent;
|
||||
@@ -24,6 +27,12 @@ class QKeyEvent;
|
||||
class InputMapper
|
||||
{
|
||||
public:
|
||||
// The build hotkey that selects the given building type, spelled for display on
|
||||
// its build button's badge (REQ-UI-BUILD-COST): "1" for a plain digit, "⇧1" for
|
||||
// a Shift+digit, and an empty string for a building type with no build hotkey.
|
||||
// Lives here so the badge and the key handling read the same binding table.
|
||||
static QString getBuildHotkeyLabel(BuildingType type);
|
||||
|
||||
// Both return true when the key was consumed; the caller passes anything else
|
||||
// on to its base class so unrelated shortcuts keep working.
|
||||
bool handleKeyPress(QKeyEvent* event);
|
||||
|
||||
Reference in New Issue
Block a user