# Module `ExpGamingCore.Gui.Center`

Adds a uniform preset for guis in the center of the screen which allow for different tabs to be opened

### Info:

- License: https://github.com/explosivegaming/scenario/blob/master/LICENSE
- Author: Cooldude2606

## Functions

_comment () | This is a submodule of ExpGamingCore.Gui but for ldoc reasons it is under its own module
add (obj) | Adds a new obj to the center gui
get_flow (player) | Used to get the center frame of the player, used mainly in script
open (player, center) | Used to open a center frame for a player
open_tab (player, center, tab) | Used to open a center frame for a player
clear (player) | Used to clear the center frame of the player, used mainly in script
center._center:add_tab (name, caption[, tooltip], callback) | If deafult draw is used then you can add tabs to the gui with this function

## Functions

_comment ()
  This is a submodule of ExpGamingCore.Gui but for ldoc reasons it is under its own module
add (obj)
  Adds a new obj to the center gui

  ### Parameters:

  - obj contains the new object, needs name, fraw is opt and is function(root_frame)

  ### Returns:

  the object made, used to add tabs

  ### Usage:

      Gui.center.add{name='foo',caption='Foo',tooltip='Testing',draw=function}

get_flow (player)
  Used to get the center frame of the player, used mainly in script

  ### Parameters:

  - player a player indifier to get the flow for

  ### Returns:

  table the gui element flow

  ### Usage:

      Gui.center.get_flow(player) -- returns gui emelemt

open (player, center)
  Used to open a center frame for a player

  ### Parameters:

  - player a player indifier to get the flow for
  - center string the name of the center frame to open

  ### Returns:

  boolean based on if it successed or not

  ### Usage:

      Gui.center.open(player,'server-info') -- return true

open_tab (player, center, tab)
  Used to open a center frame for a player

  ### Parameters:

  - player a player indifier to get the flow for
  - center string the name of the center frame to open
  - tab string the name of the tab to open

  ### Returns:

  boolean based on if it successed or not

  ### Usage:

      Gui.center.open_tab(player,'readme','rules') -- return true

clear (player)
  Used to clear the center frame of the player, used mainly in script

  ### Parameters:

  - player a player indifier to get the flow for

  ### Usage:

      Gui.center.clear(player)

center._center:add_tab (name, caption[, tooltip], callback)
  If deafult draw is used then you can add tabs to the gui with this function

  ### Parameters:

  - name string this is the name of the tab
  - caption string this is the words that appear on the tab button
  - tooltip string the tooltip that is on the button (optional)
  - callback function this is called when button is pressed with function(root_frame)

  ### Returns:

  self to allow chaining of _center:add_tab

  ### Usage:

      _center:add_tab('foo','Foo','Just a tab',function)

generated by LDoc 1.4.6 Last updated 2018-06-07 12:58:23