More spelling fixes

This commit is contained in:
bbassie
2019-07-03 16:16:39 +02:00
parent 786525f58f
commit 36aae4fd12
42 changed files with 312 additions and 312 deletions

View File

@@ -7,7 +7,7 @@
Button._prototype:on_left_click(player,element) --- Registers a handler for when the button is clicked with the left mouse button
Button._prototype:on_right_click(player,element) --- Registers a handler for when the button is clicked with the right mouse button
Button._prototype:set_sprites(sprite,hovered_sprite,clicked_sprite) --- Adds sprites to a button making it a spirte button
Button._prototype:set_sprites(sprite,hovered_sprite,clicked_sprite) --- Adds sprites to a button making it a sprite button
Button._prototype:set_click_filter(filter,...) --- Adds a click / mouse button filter to the button
Button._prototype:set_key_filter(filter,...) --- Adds a control key filter to the button
@@ -66,7 +66,7 @@ function Button.new_button(name)
return self
end
--- Adds sprites to a button making it a spirte button
--- Adds sprites to a button making it a sprite button
-- @tparam SpritePath sprite the sprite path for the default sprite for the button
-- @tparam[opt] SpritePath hovered_sprite the sprite path for the sprite when the player hovers over the button
-- @tparam[opt] SpritePath clicked_sprite the sprite path for the sprite when the player clicks the button
@@ -103,7 +103,7 @@ end
--- Adds a control key filter to the button
-- @tparam table filter ?string|table either a of control keys or the first control keys to filter, with a table true means allowed
-- @tparam[opt] table ... when filter is not a you can add the control keyss one after each other
-- @tparam[opt] table ... when filter is not a you can add the control keys one after each other
-- @treturn self returns the button define to allow chaining
function Button._prototype:set_key_filter(filter,...)
if type(filter) == 'string' then

View File

@@ -1,4 +1,4 @@
--- Gui class define for checkboxs and radiobuttons
--- Gui class define for checkbox and radiobuttons
--[[
>>>> Using an option set
An option set is a set of radio buttons where only one of them can be active at a time, this means that when one
@@ -26,7 +26,7 @@
Note that these radiobuttons can still have on_element_update events but this may result in a double trigger of events as
the option set update is always triggered; also add_store cant be used as the option set acts as the store however get
and set store will still work but will effect the option set rather than the indivual radiobuttons.
and set store will still work but will effect the option set rather than the individual radiobuttons.
>>>> Functions
Checkbox.new_checkbox(name) --- Creates a new checkbox element define
@@ -38,10 +38,10 @@
Checkbox._prototype_radiobutton:on_store_update(callback) --- Registers a handler for when the stored value updates
Checkbox._prototype_radiobutton:add_as_option(option_set,option_name) --- Adds this radiobutton to be an option in the given option set (only one can be true at a time)
Checkbox.new_option_set(name,callback,categorize) --- Registers a new option set that can be linked to radiobutotns (only one can be true at a time)
Checkbox.new_option_set(name,callback,categorize) --- Registers a new option set that can be linked to radiobutton (only one can be true at a time)
Checkbox.draw_option_set(name,element) --- Draws all radiobuttons that are part of an option set at once (Gui.draw will not work)
Checkbox.reset_radiobutton(element,exclude,recursive) --- Sets all radiobutotn in a element to false (unless excluded) and can act recursivly
Checkbox.reset_radiobutton(element,exclude,recursive) --- Sets all radiobutton in a element to false (unless excluded) and can act recursively
Other functions present from expcore.gui.core
]]
@@ -131,7 +131,7 @@ end
--- Adds this radiobutton to be an option in the given option set (only one can be true at a time)
-- @tparam string option_set the name of the option set to add this element to
-- @tparam string option_name the name of this option that will be used to idenitife it
-- @tparam string option_name the name of this option that will be used to identify it
-- @treturn self the define to allow chaining
function Checkbox._prototype_radiobutton:add_as_option(option_set,option_name)
self.option_set = option_set
@@ -166,9 +166,9 @@ function Checkbox._prototype_radiobutton:set_store(category,value,internal)
return Store.set(location,category,value)
end
--- Registers a new option set that can be linked to radiobutotns (only one can be true at a time)
--- Registers a new option set that can be linked to radiobuttons (only one can be true at a time)
-- @tparam string name the name of the option set, must be unique
-- @tparam function callback the update callback when the value of the option set chagnes
-- @tparam function callback the update callback when the value of the option set changes
-- callback param - value string - the new selected option for this option set
-- callback param - category string - the category that updated if categorize was used
-- @tparam function categorize the function used to convert an element into a string
@@ -208,7 +208,7 @@ function Checkbox.draw_option_set(name,element)
end
--- Sets all radiobutotn in a element to false (unless excluded) and can act recursivly
--- Sets all radiobutton in a element to false (unless excluded) and can act recursively
-- @tparam LuaGuiElement element the root gui element to start setting radio buttons from
-- @tparam[opt] table exclude ?string|table the name of the radiobutton to exclude or a of radiobuttons where true will set the state true
-- @tparam[opt=false] ?number|boolean recursive if true will recur as much as possible, if a will recur that number of times

View File

@@ -1,4 +1,4 @@
--- Gui class define for dropdowns and list boxs
--- Gui class define for dropdowns and list box
--[[
>>>> Functions
Dropdown.new_dropdown(name) --- Creates a new dropdown element define

View File

@@ -1,9 +1,9 @@
--- Gui element define for progess bars
--- Gui element define for progress bars
--[[
>>>> Functions
ProgressBar.set_maximum(element,amount,count_down) --- Sets the maximum value that represents the end value of the progress bar
ProgressBar.increment(element,amount) --- Increases the value of the progressbar, if a define is given all of its instances are incremented
ProgressBar.decrement(element,amount) --- Decreases the value of the progressbar, if a define is given all of its instances are decresed
ProgressBar.increment(element,amount) --- Increases the value of the progressbar, if a define is given all of its instances have incremented
ProgressBar.decrement(element,amount) --- Decreases the value of the progressbar, if a define is given all of its instances have decremented
ProgressBar.new_progressbar(name) --- Creates a new progressbar element define
ProgressBar._prototype:set_maximum(amount,count_down) --- Sets the maximum value that represents the end value of the progress bar
@@ -15,10 +15,10 @@
ProgressBar._prototype:add_element(element,maximum) --- Adds an element into the list of instances that will are waiting to complete, does not work with store
ProgressBar._prototype:reset_element(element) --- Resets an element, or its store, to be back at the start, either 1 or 0
ProgressBar._prototype:on_complete(callback) --- Triggers when a progress bar element compeltes (hits 0 or 1)
ProgressBar._prototype:on_complete(callback) --- Triggers when a progress bar element completes (hits 0 or 1)
ProgressBar._prototype:on_complete(callback) --- Triggers when a store value completes (hits 0 or 1)
ProgressBar._prototype:event_counter(filter) --- Event handler factory that counts up by 1 every time the event triggeres, can filter which elements are incremented
ProgressBar._prototype:event_countdown(filter) --- Event handler factory that counts down by 1 every time the event triggeres, can filter which elements are decremented
ProgressBar._prototype:event_counter(filter) --- Event handler factory that counts up by 1 every time the event triggers, can filter which elements have incremented
ProgressBar._prototype:event_countdown(filter) --- Event handler factory that counts down by 1 every time the event triggers, can filter which elements have decremented
]]
local Gui = require 'expcore.gui.core'
local Prototype = require 'expcore.gui.prototype'
@@ -52,7 +52,7 @@ end
local ProgressBar = {
unregistered={}, -- elements with no callbacks
independent={}, -- elements with a link to a deinfe
independent={}, -- elements with a link to a define
_prototype=Prototype.extend{
on_complete = Prototype.event,
on_store_complete = Prototype.event,
@@ -84,7 +84,7 @@ end
--- Gets the element data, used when there is no define
-- @tparam LuaGuiElement element the element to get the data of
-- @treturn table the element data simialr to define
-- @treturn table the element data similar to define
local function get_element(element)
if not element.valid then return end
local name = element.player_index..':'..element.index
@@ -102,7 +102,7 @@ function ProgressBar.set_maximum(element,amount)
local define = get_define(element)
if define then
define:set_deafult_maximum(amount)
define:set_default_maximum(amount)
else
local element_data = get_element(element)
@@ -122,7 +122,7 @@ function ProgressBar.set_maximum(element,amount)
end
end
--- Increases the value of the progressbar, if a define is given all of its instances are incremented
--- Increases the value of the progressbar, if a define is given all of its instances have incremented
-- @tparam ?LuaGuiElement|string element either a gui element or a registered define
-- @tparam[opt=1] number amount the amount to increase the progressbar by
function ProgressBar.increment(element,amount)
@@ -149,7 +149,7 @@ function ProgressBar.increment(element,amount)
end
end
--- Decreases the value of the progressbar, if a define is given all of its instances are decresed
--- Decreases the value of the progressbar, if a define is given all of its instances have decremented
-- @tparam ?LuaGuiElement|string element either a gui element or a registered define
-- @tparam[opt=1] number amount the amount to decrease the progressbar by
function ProgressBar.decrement(element,amount)
@@ -178,7 +178,7 @@ end
--- Creates a new progressbar element define
-- @tparam[opt] string name the optional debug name that can be added
-- @treturn table the new progressbar elemente define
-- @treturn table the new progressbar element define
function ProgressBar.new_progressbar(name)
local self = Gui.new_define(ProgressBar._prototype,name)
@@ -349,8 +349,8 @@ function ProgressBar._prototype:reset_element(element)
end
end
--- Event handler factory that counts up by 1 every time the event triggeres, can filter which elements are incremented
-- @tparam[opt] function filter when given will use filtered incerement
--- Event handler factory that counts up by 1 every time the event triggers, can filter which elements have incremented
-- @tparam[opt] function filter when given will use filtered increment
-- @treturn function the event handler
function ProgressBar._prototype:event_counter(filter)
if type(filter) == 'function' then
@@ -364,8 +364,8 @@ function ProgressBar._prototype:event_counter(filter)
end
end
--- Event handler factory that counts down by 1 every time the event triggeres, can filter which elements are decremented
-- @tparam[opt] function filter when given will use filtered decerement
--- Event handler factory that counts down by 1 every time the event triggers, can filter which elements have decremented
-- @tparam[opt] function filter when given will use filtered decrement
-- @treturn function the event handler
function ProgressBar._prototype:event_countdown(filter)
if type(filter) == 'function' then

View File

@@ -1,4 +1,4 @@
--- Gui class define for silders
--- Gui class define for sliders
--[[
>>>> Functions
Slider.new_slider(name) --- Creates a new slider element define
@@ -128,7 +128,7 @@ function Slider._prototype:set_range(min,max)
end
--- Draws a new label and links its value to the value of this slider, if no store then it will only show one value per player
-- @tparam LuaGuiElement element the parent element that the lable will be drawn to
-- @tparam LuaGuiElement element the parent element that the label will be drawn to
-- @treturn LuaGuiElement the new label element so that styles can be applied
function Slider._prototype:draw_label(element)
local name = self.name..'-label'

View File

@@ -1,4 +1,4 @@
--- Gui class define for text fields and text boxs
--- Gui class define for text fields and text boxes
--[[
>>>> Functions
Text.new_text_field(name) --- Creates a new text field element define