# Module `expcore.gui.center`

Gui structure define for center gui frames [[

## Functions

CenterFrames.get_flow (player) | Gets the center flow for a player
CenterFrames.clear_flow (player) | Clears the center flow for a player
CenterFrames.draw_frame (player, name) | Draws the center frame for a player, if already open then will do nothing
CenterFrames.redraw_frame (player, name) | Draws the center frame for a player, if already open then will destroy it and redraw
CenterFrames.toggle_frame (player, name[, state]) | Toggles if the frame is currently open or not, will open if closed and close if open
CenterFrames.new_frame (permision_name) | Creates a new center frame define
CenterFrames._prototype:set_auto_focus ([state=true]) | Sets the frame to be the current active gui when opened and closes all other frames
CenterFrames._prototype:draw_frame (player) | Draws this frame to the player, if already open does nothing (will call on_draw to draw to the frame)
CenterFrames._prototype:redraw_frame (player) | Draws this frame to the player, if already open it will remove it and redraw it (will call on_draw to draw to the frame)
CenterFrames._prototype:toggle_frame (player) | Toggles if the frame is open, if open it will close it and if closed it will open it
CenterFrames._prototype:event_handler ([action=update]) | Creates an event handler that will trigger one of its functions, use with Event.add

## Functions

CenterFrames.get_flow (player)
  Gets the center flow for a player

  ### Parameters:

  - player LuaPlayer the player to get the flow for

  ### Returns:

  LuaGuiElement the center flow
CenterFrames.clear_flow (player)
  Clears the center flow for a player

  ### Parameters:

  - player LuaPlayer the player to clear the flow for
CenterFrames.draw_frame (player, name)
  Draws the center frame for a player, if already open then will do nothing

  ### Parameters:

  - player LuaPlayer the player that will have the frame drawn
  - name string the name of the hui that will drawn

  ### Returns:

  LuaGuiElement the new frame that was made
CenterFrames.redraw_frame (player, name)
  Draws the center frame for a player, if already open then will destroy it and redraw

  ### Parameters:

  - player LuaPlayer the player that will have the frame drawn
  - name string the name of the hui that will drawn

  ### Returns:

  LuaGuiElement the new frame that was made
CenterFrames.toggle_frame (player, name[, state])
  Toggles if the frame is currently open or not, will open if closed and close if open

  ### Parameters:

  - player LuaPlayer the player that will have the frame toggled
  - name string the name of the hui that will be toggled
  - state boolean when set will force a state for the frame (optional)

  ### Returns:

  boolean if the frame if no open or closed
CenterFrames.new_frame (permision_name)
  Creates a new center frame define

  ### Parameters:

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

  ### Returns:

  table the new center frame define
CenterFrames._prototype:set_auto_focus ([state=true])
  Sets the frame to be the current active gui when opened and closes all other frames

  ### Parameters:

  - state boolean when true will auto close other frames and set this frame as player.opened (default true)
CenterFrames._prototype:draw_frame (player)
  Draws this frame to the player, if already open does nothing (will call on_draw to draw to the frame)

  ### Parameters:

  - player LuaPlayer the player to draw the frame for

  ### Returns:

  LuaGuiElement the new frame that was drawn
CenterFrames._prototype:redraw_frame (player)
  Draws this frame to the player, if already open it will remove it and redraw it (will call on_draw to draw to the frame)

  ### Parameters:

  - player LuaPlayer the player to draw the frame for

  ### Returns:

  LuaGuiElement the new frame that was drawn
CenterFrames._prototype:toggle_frame (player)
  Toggles if the frame is open, if open it will close it and if closed it will open it

  ### Parameters:

  - player LuaPlayer the player to draw the frame for

  ### Returns:

  boolean with the gui frame is now open
CenterFrames._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