[LuaDoc] Accept two-element lists as a location in some places, and 3-element lists as a colour
This commit is contained in:
parent
1885113264
commit
dbae630acd
4 changed files with 11 additions and 3 deletions
|
@ -150,6 +150,11 @@ wesnoth.custom_synced_commands = {}
|
|||
---@field g integer
|
||||
---@field b integer
|
||||
---@field a integer
|
||||
---@class color_list
|
||||
---@field [1] integer
|
||||
---@field [2] integer
|
||||
---@field [3] integer
|
||||
---@field [4] integer?
|
||||
---@class color_range
|
||||
---@field mid color
|
||||
---@field min color
|
||||
|
|
|
@ -87,12 +87,12 @@ function wesnoth.interface.clear_chat_messages() end
|
|||
---@class overlay_text_options
|
||||
---@field size? integer The default font size
|
||||
---@field max_width? integer|string The maximum width in which to display the text, as either a pixel width or a percentage (a string ending in %); if longer, it will be word-wrapped
|
||||
---@field color? string|integer[] The default text colour as either a hex string or an RGB triple
|
||||
---@field color? string|color|color_list The default text colour as either a hex string or an RGB triple
|
||||
---@field bgcolor? string|integer[] The default background colour as either a hex string or an RGB triple; the default is no background (fully transparent)
|
||||
---@field bgalpha? integer Alpha value for the background, in the range [0,255]; defaults to 255 if a bgcolor is specified
|
||||
---@field duration? integer|"'unlimited'" How long the text should be displayed, in milliseconds
|
||||
---@field fade_time? integer This is how long it takes to fade out when the label is removed, either explicitly or because the duration expired
|
||||
---@field location? location The screen location of the text, relative to the specified anchor (default: center of the screen)
|
||||
---@field location? location|loc_list The screen location of the text, relative to the specified anchor (default: center of the screen)
|
||||
---@field halign? horizontal_align How the text should be anchored horizontally to the screen
|
||||
---@field valign? vertical_align How the text should be anchored vertically to the screen
|
||||
|
||||
|
|
|
@ -3,6 +3,9 @@
|
|||
---@class location
|
||||
---@field x integer
|
||||
---@field y integer
|
||||
---@class loc_list
|
||||
---@field [1] integer
|
||||
---@field [2] integer
|
||||
|
||||
---@class location_triple : location
|
||||
---@field value any
|
||||
|
|
|
@ -232,7 +232,7 @@ function animator:clear() end
|
|||
---@field value? number|number[]
|
||||
---@field with_bars? boolean
|
||||
---@field text? tstring
|
||||
---@field color? color
|
||||
---@field color? color|color_list
|
||||
---@field primary? unit_weapon
|
||||
---@field secondary? unit_weapon
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue