Skip to main content

Woodensignpopup

Based on game build 714014 | Last updated: 2026-03-09

Overview

WoodenSignPopup is a UI screen class that displays a modal dialog using a wooden board texture as background. It provides structured layout for title, body text, and bottom-aligned buttons, closely resembling the in-game wooden sign aesthetic. It inherits from Screen and leverages Redux UI templates for consistency with the updated menu system.

Usage example

local WoodenSignPopup = require "widgets/redux/woodensignpopup"

local popup = WoodenSignPopup(
"Warning", -- title_text
"The path ahead is unstable.", -- body_text
{ -- bottom_buttons
{ text = STRINGS.UI.CANCEL, cb = function() popup:Close() end }
}
)

TheFrontEnd:ShowScreen(popup)

Dependencies & tags

Components used: None identified
Tags: None identified

Properties

PropertyTypeDefault ValueDescription
blackImage (child of Screen)TEMPLATES.BackgroundTint()Full-screen background tint overlay.
prootWidget (ScreenRoot)TEMPLATES.ScreenRoot()Root container for screen content.
bgImage"images/tradescreen_redux.xml", "woodenboard.tex"Wooden board background image widget.
dialogWidget"dialog" containerContainer for title, body, and button areas.
buttonstablebottom_buttons (passed to constructor)Reference to the button list passed at construction.
default_focusMenu or nilself.dialog.actionsDefault UI focus target (the button menu).

Main functions

OnControl(control, down)

  • Description: Handles input events, particularly responding to CONTROL_CANCEL (e.g., ESC or B button) to trigger the last button’s callback if present.
  • Parameters:
    control (number) — Input control code.
    down (boolean) — true if the button is pressed down; false on release.
  • Returns: true if the event was handled, otherwise delegates to base class.

GetHelpText()

  • Description: Returns localized help text for the primary action (e.g., "ESC Back") if applicable.
  • Parameters: None.
  • Returns: string — Concatenated localized help text (e.g., "ESC Back"), or an empty string if no action is available.

Events & listeners

  • Listens to: None identified
  • Pushes: None identified