Module expcore.gui.left

Gui structure define for left frames [[

Functions

LeftFrames.get_flow (player) Gets the left frame flow for a player
LeftFrames.get_frame (name, player) Gets one frame from the left flow by its name
LeftFrames.get_open (player) Gets all open frames for a player, if non are open it will remove the close all button
LeftFrames.toggle_frame (name, player[, state]) Toggles the visiblty of a left frame, or sets its visiblty state
LeftFrames.new_frame (permision_name) Creates a new left frame define
LeftFrames._prototype:set_open_by_default ([state=true]) Sets if the frame is visible when a player joins, can also be a function to return a boolean
LeftFrames._prototype:set_direction (direction) Sets the direction of the frame, either vertical or horizontal
LeftFrames._prototype:get_frame (player) Gets the frame for this define from the left frame flow
LeftFrames._prototype:is_open (player) Returns if the player currently has this define visible
LeftFrames._prototype:toggle (player) Toggles the visiblty of the left frame
LeftFrames._prototype:update (player) Updates the contents of the left frame, first tries update callback, oter wise will clear and redraw
LeftFrames._prototype:update_all ([update_offline=false]) Updates the frame for all players, see update
LeftFrames._prototype:redraw (player) Redraws the frame by calling on_draw, will always clear the frame
LeftFrames._prototype:redraw_all ([update_offline=false]) Redraws the frame for all players, see redraw
LeftFrames._prototype:event_handler ([action=update]) Creates an event handler that will trigger one of its functions, use with Event.add


Functions

LeftFrames.get_flow (player)
Gets the left frame flow for a player

Parameters:

  • player LuaPlayer the player to get the flow of

Returns:

    LuaGuiElement the left frame flow for the player
LeftFrames.get_frame (name, player)
Gets one frame from the left flow by its name

Parameters:

  • name string the name of the gui frame to get
  • player LuaPlayer the player to get the frame of

Returns:

    LuaGuiElement the frame in the left frame flow with that name
LeftFrames.get_open (player)
Gets all open frames for a player, if non are open it will remove the close all button

Parameters:

  • player LuaPlayer the player to get the flow of

Returns:

    table contains all the open (and registered) frames for the player
LeftFrames.toggle_frame (name, player[, state])
Toggles the visiblty of a left frame, or sets its visiblty state

Parameters:

  • name string the name of the gui frame to toggle
  • player LuaPlayer the player to get the frame of
  • state boolean when given will be the state that the visiblty is set to (optional)

Returns:

    boolean the new state of the visiblity
LeftFrames.new_frame (permision_name)
Creates a new left frame define

Parameters:

  • permision_name string the name that can be used with the permision system

Returns:

    table the new left frame define
LeftFrames._prototype:set_open_by_default ([state=true])
Sets if the frame is visible when a player joins, can also be a function to return a boolean

Parameters:

  • state boolean or function the default state of the visiblty, can be a function state param - player LuaPlayer - the player that has joined the game state param - define_name string - the define name for the frame state return - boolean - false will hide the frame (default true)
LeftFrames._prototype:set_direction (direction)
Sets the direction of the frame, either vertical or horizontal

Parameters:

  • direction string the direction to have the elements be added to thef frame
LeftFrames._prototype:get_frame (player)
Gets the frame for this define from the left frame flow

Parameters:

  • player LuaPlayer the player to get the frame of

Returns:

    LuaGuiElement the frame in the left frame flow for this define
LeftFrames._prototype:is_open (player)
Returns if the player currently has this define visible

Parameters:

  • player LuaPlayer the player to get the frame of

Returns:

    boolean true if it is open/visible
LeftFrames._prototype:toggle (player)
Toggles the visiblty of the left frame

Parameters:

  • player LuaPlayer the player to toggle the frame of

Returns:

    boolean the new state of the visiblity
LeftFrames._prototype:update (player)
Updates the contents of the left frame, first tries update callback, oter wise will clear and redraw

Parameters:

  • player LuaPlayer the player to update the frame of
LeftFrames._prototype:update_all ([update_offline=false])
Updates the frame for all players, see update

Parameters:

  • update_offline boolean when true will update the frame for offline players (default false)
LeftFrames._prototype:redraw (player)
Redraws the frame by calling on_draw, will always clear the frame

Parameters:

  • player LuaPlayer the player to update the frame of
LeftFrames._prototype:redraw_all ([update_offline=false])
Redraws the frame for all players, see redraw

Parameters:

  • update_offline boolean when true will update the frame for offline players (default false)
LeftFrames._prototype:event_handler ([action=update])
Creates an event handler that will trigger one of its functions, use with Event.add

Parameters:

  • action string the action to take on this event (default update)
generated by LDoc 1.4.3 Last updated 2019-05-29 22:30:49