Files
project-cybersyn/.vscode/factorio/runtime-api-LuaGui.lua
Monica Moniot 30fe2946e6 updated api
2022-12-01 19:04:58 -05:00

82 lines
3.7 KiB
Lua

---@meta
---@diagnostic disable
--$Factorio 1.1.72
--$Overlay 5
--$Section LuaGui
-- This file is automatically generated. Edits will be overwritten.
---The root of the GUI. This type houses the root elements, `top`, `left`, `center`, `goal`, and `screen`, to which other elements can be added to be displayed on screen.
---
---**Note:** Every player can have a different GUI state.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGui.html)
---@class LuaGui:LuaObject
---[R]
---The center part of the GUI. It is a flow element.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGui.html#LuaGui.center)
---@field center LuaGuiElement
---[R]
---The children GUI elements mapped by name <> element.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGui.html#LuaGui.children)
---@field children {[string]: LuaGuiElement}
---[R]
---The flow used in the objectives window. It is a flow element. The objectives window is only visible when the flow is not empty or the objective text is set.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGui.html#LuaGui.goal)
---@field goal LuaGuiElement
---[R]
---The left part of the GUI. It is a flow element inside a scroll pane element.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGui.html#LuaGui.left)
---@field left LuaGuiElement
---[R]
---The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGui.html#LuaGui.object_name)
---@field object_name string
---[R]
---The player who owns this gui.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGui.html#LuaGui.player)
---@field player LuaPlayer
---[R]
---For showing a GUI somewhere relative to one of the game GUIs. It is an empty-widget element.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGui.html#LuaGui.relative)
---@field relative LuaGuiElement
---[R]
---For showing a GUI somewhere on the entire screen. It is an empty-widget element.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGui.html#LuaGui.screen)
---@field screen LuaGuiElement
---[R]
---The top part of the GUI. It is a flow element inside a scroll pane element.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGui.html#LuaGui.top)
---@field top LuaGuiElement
---[R]
---Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGui.html#LuaGui.valid)
---@field valid boolean
local LuaGui={
---All methods and properties that this object supports.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGui.html#LuaGui.help)
---@return string
help=function()end,
---Returns `true` if sprite_path is valid and contains loaded sprite, otherwise `false`. Sprite path of type `file` doesn't validate if file exists.
---
---If you want to avoid needing a LuaGui object, [LuaGameScript::is_valid_sprite_path](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.is_valid_sprite_path) can be used instead.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGui.html#LuaGui.is_valid_sprite_path)
---@param sprite_path SpritePath@Path to a image.
---@return boolean
is_valid_sprite_path=function(sprite_path)end,
}