EventOptionUI
Overview
Renders a single response option of a Chairman Event: background color/hue by personality, a line of effect icons with +/- signs, a localized description, and interactivity state. Displays a “tap to confirm” prompt when selected, and a “missing tokens” message when invalid. fileciteturn24file1
Serialized
Sprites:
- PoliceSeverity, CartelSeverity, Control, Money, Loyalty, Demand
- MobsterTokens, SchemerTokens, SubterfugeTokens
- Backgrounds: mobsterBackground, schemerBackground, subterfugeBackground
UI:
Image background,Button button,TextMeshProUGUI optionDescList<Image> effectIcons(icons are paired with a small TMP text for +/-) fileciteturn24file1
Behavior
- UpdateUI(EventResponse response, bool valid):
- Saves
isValid = valid, setsoptionDescto either the cached localized string orEVENT_MISSING_TOKENS(I2). - Enables/disables
buttonand fades text/background alpha when invalid. - Picks the background sprite from the last effect: Mobster/Schemer/Subterfuge affinity ⇒ corresponding background.
- Populates
effectIcons[i]for each effect with correct sprite and a+/-sign by value; hides extra slots. fileciteturn24file1
- Saves
- OnSelected() / OnUnselected(): swaps description to
EVENT_TAP_CONFIRMand back. - Localize(localizedDesc, selected): stores text and re-applies according to
selectedandisValid. fileciteturn24file1