Skip to content

SusHudTurnActions

SusHudTurnActions

Turn chrome column — Wait / End Turn buttons plus Confirm as a hold button.

Package

SusGame · HUD (commercial)

Open in Playground

SusGame · HUD

Props

NameTypeDefault
WaitLabelProp<string>"Wait"
EndTurnLabelProp<string>"End Turn"
ConfirmLabelProp<string>"Confirm"
ConfirmEnabledProp<bool>true
WaitVisibleProp<bool>true
EndTurnVisibleProp<bool>true
ConfirmVisibleProp<bool>true

Slots

No slots.

Events

NameFieldPayload
WaitOnWait
EndTurnOnEndTurn
ConfirmHoldOnConfirmHold

Style hooks

USS class contract — override appearance without touching C#. States toggle via these classes:

  • sus-hold-button
  • sus-hud-turn-actions
  • sus-hud-turn-actions__btn
  • sus-hud-turn-actions__confirm

Usage

Bind labels / visibility, or push a batch with ApplyData.

csharp
var actions = new SusHudTurnActions();
actions.WaitLabel.Value = "Wait";
actions.EndTurnLabel.Value = "End Turn";
actions.ConfirmLabel.Value = "Confirm";
actions.ConfirmEnabled.Value = true;
actions.WaitVisible.Value = true;
actions.EndTurnVisible.Value = true;
actions.ConfirmVisible.Value = true;
actions.OnWait += () => { /* skip AP */ };
actions.OnEndTurn += () => { /* commit turn */ };
actions.OnConfirmHold += () => { /* confirm aim / fire */ };

// Or batch:
actions.ApplyData(new SusHudTurnActionsData
{
    ConfirmEnabled = false,
    WaitVisible = false,
});
xml
<template>
  <sus:SusHudTurnActions :WaitLabel="Wait.Value"
                         :EndTurnLabel="End.Value"
                         :ConfirmLabel="Confirm.Value"
                         :ConfirmEnabled="ConfirmOk.Value"
                         :WaitVisible="ShowWait.Value"
                         :EndTurnVisible="ShowEnd.Value"
                         :ConfirmVisible="ShowConfirm.Value"
                         @wait="OnWait"
                         @end-turn="OnEndTurn"
                         @confirm-hold="OnConfirmHold" />
</template>

<script>
public Prop<string> Wait = new("Wait");
public Prop<string> End = new("End Turn");
public Prop<string> Confirm = new("Confirm");
public Prop<bool> ConfirmOk = new(true);
public Prop<bool> ShowWait = new(true);
public Prop<bool> ShowEnd = new(true);
public Prop<bool> ShowConfirm = new(true);
void OnWait() { /* … */ }
void OnEndTurn() { /* … */ }
void OnConfirmHold() { /* … */ }
</script>
Prop / APIRole
WaitLabel · EndTurnLabel · ConfirmLabelButton texts (defaults Wait / End Turn / Confirm)
ConfirmEnabledDisables Confirm hold when false
WaitVisible · EndTurnVisible · ConfirmVisibleShow / hide each control
ApplyData(SusHudTurnActionsData)Batch-set labels + flags
OnWait · OnEndTurn · OnConfirmHoldClick / hold-complete

Notes

  • Confirm is kit SusHoldButton (ProgressMode=strip, HoldDurationMs=700).
  • Wait / End Turn are kit SusButton (outlined secondary / elevated primary, Size=small).
  • Prefer ApplyData from Assembler / tactical host when chrome changes every phase.