Module expcore.gui.popups
Gui structure define for popup gui
[[
Functions
-
PopupFrames.get_flow (player)
-
Gets the left flow that contains the popup frames
Parameters:
- player
LuaPlayer
the player to get the flow for
Returns:
LuaGuiElement
the left flow that contains the popup frames
-
PopupFrames.open (define_name, player[, open_time], ...)
-
Opens a popup for the player, can give the amount of time it is open as well as params for the draw function
Parameters:
- define_name
string
the name of the define that you want to open for the player
- player
LuaPlayer
the player to open the popup for
- open_time
number
the minimum number of ticks you want the popup open for, 0 means no limit, nil will take default
(optional)
- ...
any
the other params that you want to pass to your on_draw event
Returns:
LuaGuiElement
the frame that was drawn, the inner gui flow which contains the content
-
PopupFrames.new_popup ([name])
-
Creates a new popup frame define
Parameters:
- name
string
the optional debug name that can be added
(optional)
Returns:
table
the new popup frame define
-
PopupFrames._prototype:set_default_open_time (amount)
-
Sets the default open time for the popup, will be used if non is provided with open
Parameters:
- amount
number
the number of ticks, by default, the popup will be open for
Returns:
table
the define to allow for chaining
-
PopupFrames._prototype:open (player[, open_time], ...)
-
Opens this define for a player, can be given open time and any other params for the draw function
Parameters:
- player
LuaPlayer
the player to open the popup for
- open_time
number
the minimum number of ticks you want the popup open for, 0 means no limit, nil will take default
(optional)
- ...
any
the other params that you want to pass to your on_draw event
Returns:
LuaGuiElement
the frame that was drawn, the inner gui flow which contains the content
Fields
-
PopupFrames.close_progress
-
Progress bar which when depleaded will close the popup frame
-
PopupFrames.close_button
-
A button which can be used to close the gui before the timer runs out