Cursed FactorUI deprecated

by L0771

Very easy way to make GUI for all mods. First GUI editor on Factorio.

Utilities
4 years ago
0.17
5

FAQ

remote.call("fui","add_mod",{mod_name=…})

Init a instance
Parameters:
- mod_name :: string: Shouldn't contain ';'

remote.call("fui","make_window",({ mod_name=…, player=…, view_name=…, header=…, subheader=…, theme=…, reload=…, parent=…, root=…, visible=…, cancel=…, accept=… }))

Add a window
Parameters:
- mod_name :: string: Same name as add_mod
- player :: LuaPlayer: Player to show this view
- view_name:: string: Name to store this view, must be unique per mod. Shouldn't contain ';'
- header :: LocalisedString (optional): String to show in header
- subheader :: LocalisedString (optional): String to show in subheader
- theme :: string (optional): Custom theme on this view (check theme_default.lua)
- reload :: boolean (optional): If this view exists, destroy and build again
- parent :: LuaGuiElement (optional): Parent to show this view
- root :: string (optional): Only "top", "left", "center", "goal" or "screen" allowed
- visible :: boolean (optional): Initial visibility.
- cancel :: [ButtonArray] (optional):
- accept :: [ButtonArray] (optional)
Return value:
- view :: LuaGuiElement: Base frame of created view
- element :: LuaGuiElement: Body of created view
- events :: [EventsArray]: Requested events

remote.call("fui","close_gui",{mod_name=…, player=…, view_name=…})

Destroy a view, if exists
Parameters:
- mod_name :: string: Same name as add_mod
- player :: LuaPlayer: Player to destroy this view
- view_name:: string: Name of the view to destroy