divide the always-available rows in the General context too
This commit is contained in:
@@ -623,7 +623,7 @@ The controls panel tells the player which controls are available right now. It i
|
|||||||
- **Header** — always shown, and the panel's only interactive element (REQ-UI-CONTROLS-PANEL). It holds a colored context dot on the left, the context's name beside it in upper case, and, for contexts that define one, a **detail suffix** separated by a middle dot (`BUILD MODE · Assembler`). The name and detail per context are given in REQ-UI-CONTROLS-CONTENT.
|
- **Header** — always shown, and the panel's only interactive element (REQ-UI-CONTROLS-PANEL). It holds a colored context dot on the left, the context's name beside it in upper case, and, for contexts that define one, a **detail suffix** separated by a middle dot (`BUILD MODE · Assembler`). The name and detail per context are given in REQ-UI-CONTROLS-CONTENT.
|
||||||
- **Rows** — one per available control, shown only while the panel is expanded. Each row is one or more **key badges** on the left — the key or mouse button drawn as a small bordered chip — and a **label** beside them naming what it does. An action reachable two ways carries both badges in the same row (`RMB` `Q` — Exit placement) rather than occupying two rows. A row whose action leaves the current mode is drawn with the destructive badge styling, distinguishing it from the rows that act within the mode. No row is ever drawn greyed or otherwise disabled: a control the player cannot currently use is not shown at all (REQ-UI-CONTROLS-ACCURACY).
|
- **Rows** — one per available control, shown only while the panel is expanded. Each row is one or more **key badges** on the left — the key or mouse button drawn as a small bordered chip — and a **label** beside them naming what it does. An action reachable two ways carries both badges in the same row (`RMB` `Q` — Exit placement) rather than occupying two rows. A row whose action leaves the current mode is drawn with the destructive badge styling, distinguishing it from the rows that act within the mode. No row is ever drawn greyed or otherwise disabled: a control the player cannot currently use is not shown at all (REQ-UI-CONTROLS-ACCURACY).
|
||||||
|
|
||||||
The rows that are live in every context (REQ-UI-CONTROLS-CONTENT) are shown last, under a divider and the caption `ALWAYS AVAILABLE`. In the General context those rows are the entire content, so neither divider nor caption is shown there.
|
The rows that are live in every context (REQ-UI-CONTROLS-CONTENT) are shown last, under a divider and the caption `ALWAYS AVAILABLE`. This holds in every context including the General one, which has context rows of its own above the divider like any other, so the card is read the same way wherever the player is.
|
||||||
- REQ-UI-CONTROLS-CONTENT: **Content catalog.** The control context follows from the active build mode and the selection alone. Build modes are mutually exclusive (REQ-BLD-BUILDER-MODE), so exactly one context applies at any moment:
|
- REQ-UI-CONTROLS-CONTENT: **Content catalog.** The control context follows from the active build mode and the selection alone. Build modes are mutually exclusive (REQ-BLD-BUILDER-MODE), so exactly one context applies at any moment:
|
||||||
|
|
||||||
| Context | When | Header name | Header detail |
|
| Context | When | Header name | Header detail |
|
||||||
|
|||||||
@@ -159,11 +159,10 @@ void ControlsPanel::rebuild(const ControlContext& context)
|
|||||||
m_rowsLayout->addWidget(makeRow(action, context, m_rows));
|
m_rowsLayout->addWidget(makeRow(action, context, m_rows));
|
||||||
}
|
}
|
||||||
|
|
||||||
// The always-available block sits under a divider, except in the General context,
|
// The always-available block sits under a divider in every context, the General one
|
||||||
// where those rows and the context's own are the same kind of thing to a player
|
// included, so the card is read the same way wherever the player is
|
||||||
// with nothing selected and no mode active (REQ-UI-CONTROLS-CARD).
|
// (REQ-UI-CONTROLS-CARD).
|
||||||
if (!m_shownAlwaysActions.empty()
|
if (!m_shownAlwaysActions.empty())
|
||||||
&& getControlContextKind(context) != ControlContextKind::General)
|
|
||||||
{
|
{
|
||||||
QFrame* divider = new QFrame(m_rows);
|
QFrame* divider = new QFrame(m_rows);
|
||||||
divider->setFrameShape(QFrame::HLine);
|
divider->setFrameShape(QFrame::HLine);
|
||||||
|
|||||||
Reference in New Issue
Block a user