Start converting GUI modules

This commit is contained in:
Cooldude2606
2025-01-15 22:32:49 +00:00
parent 88a47e3edc
commit bd6781b3a0
14 changed files with 88 additions and 144 deletions

View File

@@ -31,9 +31,12 @@ ExpGui.get_top_flow = mod_gui.get_button_flow
ExpGui.get_left_flow = mod_gui.get_frame_flow
--- Get a player from an element or gui event
--- @param input LuaGuiElement | { player_index: uint }
--- @param input LuaGuiElement | { player_index: uint } | { element: LuaGuiElement }
--- @return LuaPlayer
function ExpGui.get_player(input)
if type(input) == "table" and not input.player_index then
return assert(game.get_player(input.element.player_index))
end
return assert(game.get_player(input.player_index))
end