api update

This commit is contained in:
Monica Moniot
2022-10-28 14:40:49 -04:00
parent 4887e3925d
commit d2bb9e2523
113 changed files with 432 additions and 222 deletions

View File

@@ -1,7 +1,7 @@
---@meta
---@diagnostic disable
--$Factorio 1.1.69
--$Factorio 1.1.70
--$Overlay 5
--$Section LuaGuiElement
-- This file is automatically generated. Edits will be overwritten.
@@ -127,9 +127,11 @@
---_Can only be used if this is textfield or text-box_
---@field clear_and_focus_on_right_click boolean
---[RW]
---The image to display on this sprite-button when it is clicked.
---The sprite to display on this sprite-button when it is clicked.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.clicked_sprite)
---
---_Can only be used if this is sprite-button_
---@field clicked_sprite SpritePath
---[R]
---The number of columns in this table.
@@ -236,11 +238,15 @@
---The entity associated with this entity-preview, camera, minimap, if any.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.entity)
---
---_Can only be used if this is entity-preview, camera or minimap_
---@field entity? LuaEntity
---[RW]
---The force this minimap is using, if any.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.force)
---
---_Can only be used if this is minimap_
---@field force? string
---[R]
---The GUI this element is a child of.
@@ -255,7 +261,7 @@
---_Can only be used if this is scroll-pane_
---@field horizontal_scroll_policy string
---[RW]
---The image to display on this sprite-button when it is hovered.
---The sprite to display on this sprite-button when it is hovered.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.hovered_sprite)
---
@@ -282,6 +288,8 @@
---The items in this dropdown or listbox.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.items)
---
---_Can only be used if this is drop-down or list-box_
---@field items LocalisedString[]
---[RW]
---The text shown for the left switch label.
@@ -327,6 +335,8 @@
---The mouse button filters for this button or sprite-button.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.mouse_button_filter)
---
---_Can only be used if this is button or sprite-button_
---@field mouse_button_filter MouseButtonFlags
---[RW]
---The name of this element. `""` if no name was set.
@@ -342,6 +352,8 @@
---The number to be shown in the bottom right corner of this sprite-button. Set this to `nil` to show nothing.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.number)
---
---_Can only be used if this is sprite-button_
---@field number double
---[RW]
---Whether this textfield is limited to only numberic characters.
@@ -369,6 +381,8 @@
---The position this camera or minimap is focused on, if any.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.position)
---
---_Can only be used if this is camera or minimap_
---@field position MapPosition
---[RW]
---Whether this text-box is read-only. Defaults to `false`.
@@ -378,9 +392,11 @@
---_Can only be used if this is text-box_
---@field read_only boolean
---[RW]
---Whether the image widget should resize according to the sprite in it. Defaults to `true`.
---Whether the sprite widget should resize according to the sprite in it. Defaults to `true`.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.resize_to_sprite)
---
---_Can only be used if this is sprite_
---@field resize_to_sprite boolean
---[RW]
---The text shown for the right switch label.
@@ -407,6 +423,8 @@
---The selected index for this dropdown or listbox. Returns `0` if none is selected.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.selected_index)
---
---_Can only be used if this is drop-down or list-box_
---@field selected_index uint
---[RW]
---The selected tab index for this tabbed pane, if any.
@@ -419,6 +437,8 @@
---Related to the number to be shown in the bottom right corner of this sprite-button. When set to `true`, numbers that are non-zero and smaller than one are shown as a percentage rather than the value. For example, `0.5` will be shown as `50%` instead.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.show_percent_for_small_numbers)
---
---_Can only be used if this is sprite-button_
---@field show_percent_for_small_numbers boolean
---[RW]
---The value of this slider element.
@@ -428,16 +448,18 @@
---_Can only be used if this is slider_
---@field slider_value double
---[RW]
---The image to display on this sprite-button or sprite in the default state.
---The sprite to display on this sprite-button or sprite in the default state.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.sprite)
---
---_Can only be used if this is sprite-button or sprite_
---@field sprite SpritePath
---[RW]
---Is this checkbox or radiobutton checked?
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.state)
---
---_Can only be used if this is CheckBox or RadioButton_
---_Can only be used if this is checkbox or radiobutton_
---@field state boolean
---[RW]
---The style of this element. When read, this evaluates to a [LuaStyle](https://lua-api.factorio.com/latest/LuaStyle.html). For writing, it only accepts a string that specifies the textual identifier (prototype name) of the desired style.
@@ -448,6 +470,8 @@
---The surface index this camera or minimap is using.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.surface_index)
---
---_Can only be used if this is camera or minimap_
---@field surface_index uint
---[RW]
---The switch state (left, none, right) for this switch.
@@ -462,6 +486,8 @@
---The tabs and contents being shown in this tabbed-pane.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.tabs)
---
---_Can only be used if this is tabbed-pane_
---@field tabs TabAndContent[]
---[RW]
---The tags associated with this LuaGuiElement.
@@ -526,6 +552,8 @@
---The zoom this camera or minimap is using. This value must be positive.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.zoom)
---
---_Can only be used if this is camera or minimap_
---@field zoom double
---[R]
---The indexing operator. Gets children by name.
@@ -563,7 +591,7 @@ local LuaGuiElement={
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.add)
---@field ignored_by_interaction? boolean
---Style of the child element.
---The name of the style prototype to apply to the new element.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.add)
---@field style? string
@@ -905,6 +933,8 @@ add=function(param)end,
---Inserts a string at the end or at the given index of this dropdown or listbox.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.add_item)
---
---_Can only be used if this is drop-down or list-box_
---@param string LocalisedString@The text to insert.
---@param index uint?@The index at which to insert the item.
add_item=function(string,index)end,
@@ -934,6 +964,8 @@ clear=function()end,
---Removes the items in this dropdown or listbox.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.clear_items)
---
---_Can only be used if this is drop-down or list-box_
clear_items=function()end,
---Remove this element, along with its children. Any [LuaGuiElement](https://lua-api.factorio.com/latest/LuaGuiElement.html) objects referring to the destroyed elements become invalid after this operation.
---
@@ -969,6 +1001,8 @@ get_index_in_parent=function()end,
---Gets the item at the given index from this dropdown or listbox.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.get_item)
---
---_Can only be used if this is drop-down or list-box_
---@param index uint@The index to get
---@return LocalisedString
get_item=function(index)end,
@@ -1012,6 +1046,8 @@ help=function()end,
---Removes the item at the given index from this dropdown or listbox.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.remove_item)
---
---_Can only be used if this is drop-down or list-box_
---@param index uint@The index
remove_item=function(index)end,
---Removes the given tab and its associated content from this tabbed pane.
@@ -1094,6 +1130,8 @@ select_all=function()end,
---Sets the given string at the given index in this dropdown or listbox.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.set_item)
---
---_Can only be used if this is drop-down or list-box_
---@param index uint@The index whose text to replace.
---@param string LocalisedString@The text to set at the given index.
set_item=function(index,string)end,