forked from townforge/townforge
game: add "fight fire" button next to the "burning" note in the flag section
This commit is contained in:
parent
e3b3247e19
commit
4eb3259592
@ -179,6 +179,8 @@ TBLayout: axis: y, distribution-position: "left top", distribution: "available"
|
||||
TBLayout: axis: x
|
||||
TBTextField: text: "", id: "flag-special-event"
|
||||
TBButton: id: "flag-special-event-help", text: "?"
|
||||
TBToggleContainer: toggle: "expanded", id: "flag-special-event-fire-toggle"
|
||||
TBButton: id: "actions-fight-fire", text: "Fight fire"
|
||||
TBLayout: axis: x
|
||||
TBTextField: text: "", id: "flag-owner"
|
||||
TBButton: id: "flag-owner-info", text: "?"
|
||||
|
@ -246,6 +246,7 @@ UIUrho3D::UIUrho3D(Context *ctx, const GameState *gameState):
|
||||
flagPrimaryPotentialText = command_window->GetWidgetByIDAndType<TBTextField>("flag-primary-potential");
|
||||
flagSecondaryPotentialText = command_window->GetWidgetByIDAndType<TBTextField>("flag-secondary-potential");
|
||||
flagSpecialEventToggle = command_window->GetWidgetByIDAndType<TBToggleContainer>("flag-special-event-toggle");
|
||||
flagSpecialEventFireToggle = command_window->GetWidgetByIDAndType<TBToggleContainer>("flag-special-event-fire-toggle");
|
||||
flagItemTypeList = command_window->GetWidgetByIDAndType<TBSelectList>("flag-budget");
|
||||
flagItemTypeList->SetSource(&flagItemTypeListSource);
|
||||
|
||||
@ -1185,6 +1186,7 @@ void UIUrho3D::UpdateFlag(uint32_t mouse_x, uint32_t mouse_y, uint32_t sx0, uint
|
||||
currentFlagBudget.clear();
|
||||
flagSpecialEventText->SetText("-");
|
||||
ToggleWidget(flagSpecialEventToggle, false);
|
||||
ToggleWidget(flagSpecialEventFireToggle, false);
|
||||
return;
|
||||
}
|
||||
flag_owner = flag->owner;
|
||||
@ -1281,10 +1283,12 @@ void UIUrho3D::UpdateFlag(uint32_t mouse_x, uint32_t mouse_y, uint32_t sx0, uint
|
||||
flagSpecialEventText->SetText("Burning");
|
||||
flagSpecialEventText->SetTextColor(TBColor(0xff, 0x20, 0x20, 0xff));
|
||||
ToggleWidget(flagSpecialEventToggle, true);
|
||||
ToggleWidget(flagSpecialEventFireToggle, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
ToggleWidget(flagSpecialEventToggle, false);
|
||||
ToggleWidget(flagSpecialEventFireToggle, false);
|
||||
flagSpecialEventText->SetTextColor(TBColor(0xff, 0xff, 0xff, 0xff));
|
||||
}
|
||||
}
|
||||
|
@ -424,6 +424,7 @@ private:
|
||||
tb::TBTextField *flagEstimatedPayout;
|
||||
tb::TBTextField *flagSpecialEventText;
|
||||
tb::TBToggleContainer *flagSpecialEventToggle;
|
||||
tb::TBToggleContainer *flagSpecialEventFireToggle;
|
||||
tb::TBSelectList *flagItemTypeList;
|
||||
tb::TBGenericStringItemSource flagItemTypeListSource;
|
||||
tb::TBTextField *flagStabilityText;
|
||||
|
Loading…
Reference in New Issue
Block a user