resolve keyboard shortcuts through one action table instead of a switch
This commit is contained in:
@@ -64,6 +64,7 @@
|
||||
|
||||
struct Command;
|
||||
struct ParsedReplay;
|
||||
class BlueprintLibrary;
|
||||
class ItemIconCache;
|
||||
class ReplayPlayer;
|
||||
class Simulation;
|
||||
@@ -102,6 +103,17 @@ public:
|
||||
void setGameSpeed(double multiplier);
|
||||
void resetForNewGame();
|
||||
|
||||
// The blueprint library is constructed after this widget, so it arrives by setter.
|
||||
// Not owned; supplies the two facts about blueprints that the control context needs
|
||||
// (REQ-UI-CONTROLS-CONTENT).
|
||||
void setBlueprintLibrary(const BlueprintLibrary* library);
|
||||
|
||||
// The player's current situation, as the one snapshot every reader of the control
|
||||
// table works from: this widget's own mouse dispatch, the input mapper, and the
|
||||
// controls panel (REQ-UI-CONTROLS-CONTENT). Built here because this widget owns the
|
||||
// build mode and the selection.
|
||||
ControlContext getControlContext() const;
|
||||
|
||||
protected:
|
||||
void initializeGL() override;
|
||||
void paintGL() override;
|
||||
@@ -280,6 +292,8 @@ private:
|
||||
// between them (REQ-UI-SELECTION-CATEGORIES), including publishing the change
|
||||
// events. This widget only resolves what was hit.
|
||||
SelectionController m_selection;
|
||||
// Not owned; set after construction, so null until MainWindow has built it.
|
||||
const BlueprintLibrary* m_blueprintLibrary = nullptr;
|
||||
bool m_boxSelecting;
|
||||
QPoint m_boxStartTile;
|
||||
QPoint m_boxCurrentTile;
|
||||
|
||||
Reference in New Issue
Block a user