mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2025-12-27 11:35:22 +09:00
Finished Rocket Gui
This commit is contained in:
@@ -37,6 +37,9 @@ local Gui = require 'expcore.gui.core'
|
||||
Gui.toggle_enable(element) --- Will toggle the enabled state of an element
|
||||
Gui.toggle_visible(element) --- Will toggle the visiblity of an element
|
||||
Gui.set_padding(element,up,down,left,right) --- Sets the padding for a gui element
|
||||
Gui.set_padding_style(style,up,down,left,right) --- Sets the padding for a gui style
|
||||
Gui.create_right_align(element,flow_name) --- Allows the creation of a right align flow to place elements into
|
||||
Gui.destory_if_valid(element) --- Destroies an element but tests for it being present and valid first
|
||||
]]
|
||||
|
||||
local Instances = require 'expcore.gui.instances'
|
||||
|
||||
@@ -154,6 +154,7 @@
|
||||
Gui.set_padding(element,up,down,left,right) --- Sets the padding for a gui element
|
||||
Gui.set_padding_style(style,up,down,left,right) --- Sets the padding for a gui style
|
||||
Gui.create_right_align(element,flow_name) --- Allows the creation of a right align flow to place elements into
|
||||
Gui.destory_if_valid(element) --- Destroies an element but tests for it being present and valid first
|
||||
]]
|
||||
local Gui = require 'utils.gui'
|
||||
local Game = require 'utils.game'
|
||||
@@ -583,4 +584,14 @@ function Gui.create_right_align(element,flow_name)
|
||||
return right_flow
|
||||
end
|
||||
|
||||
--- Destroies an element but tests for it being present and valid first
|
||||
-- @tparam element LuaGuiElement the element to be destroied
|
||||
-- @treturn boolean true if it was destoried
|
||||
function Gui.destory_if_valid(element)
|
||||
if element and element.valid then
|
||||
element.destroy()
|
||||
return true
|
||||
end
|
||||
end
|
||||
|
||||
return Gui
|
||||
Reference in New Issue
Block a user