Skip to main content

Bigpopupdialog

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

Overview​

BigPopupDialogScreen is a legacy UI screen component used to display a modal dialog with a large, centered window containing a title, descriptive text, and one or more buttons. It dims the entire screen behind the dialog and arranges buttons horizontally at the bottom of the dialog. As indicated by its own comment, this component is deprecated in favor of PopupDialogScreen with extended layout options. It extends the base Screen class and overrides OnUpdate and OnControl to support optional timeout-based callback execution.

Usage example​

local BigPopupDialogScreen = require "screens/bigpopupdialog"

local my_buttons = {
Button("OK", function() print("OK pressed") end),
Button("Cancel", function() print("Cancel pressed") end),
}

local dialog = BigPopupDialogScreen(
"Warning",
"This is a long message that will wrap automatically within the dialog.",
my_buttons,
{ timeout = 10, cb = function() print("Timeout!") end }
)

-- Add to screen manager (e.g., TheFrontEnd): TheFrontEnd:AddScreen(dialog)

Dependencies & tags​

Components used: None identified.
Tags: None identified.

Properties​

PropertyTypeDefault ValueDescription
blackImage—Fullscreen dark overlay with 75% opacity, used to dim the background.
prootWidget—Root widget for dialog content, centered and scaled proportionally.
bgWidget—Dialog container created via TEMPLATES.CurlyWindow.
bg.fillImage—Inner panel fill for visual styling.
titleText—Title text widget, positioned near the top.
textText—Main descriptive text widget with word wrapping enabled.
menuMenu—Horizontal menu containing the dialog's buttons.
buttonstable—Reference to the buttons array passed to the constructor.
default_focusMenuself.menuDefault UI focus target.
timeouttable or nilnilOptional { timeout = number, cb = function } for auto-closing the dialog.

Main functions​

OnUpdate(dt)​

  • Description: Handles frame-by-frame updates, including decrementing the remaining timeout and invoking the callback when time expires. Required for screen lifecycle.
  • Parameters: dt (number) — delta time since last frame.
  • Returns: true — indicates the screen should continue updating.
  • Error states: None.

OnControl(control, down)​

  • Description: Delegates input control events to the base Screen class and returns its result. Enables standard UI navigation within the dialog.
  • Parameters:
    control (string) — name of the control pressed (e.g., "confirm", "cancel").
    down (boolean) — whether the control was pressed (true) or released (false).
  • Returns: boolean — result of the base OnControl call; true if handled.

Events & listeners​

None identified.