mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2025-12-29 12:16:37 +09:00
Finished Rocket Gui
This commit is contained in:
@@ -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