mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2025-12-27 11:35:22 +09:00
Added Module: ExpGamingCore.Gui
This commit is contained in:
@@ -26,7 +26,8 @@ local ReadOnlyManager = setmetatable({},{
|
||||
-- provents the changing of any key that is not currentState
|
||||
if key == 'currentState' then
|
||||
-- provides a verbose that is always emited describing the change in state
|
||||
Manager.verbose('Current state is now: "'..value.. '"; The verbose state is now: '..tostring(Manager.setVerbose[value]),true)
|
||||
Manager.verbose(string.rep('__',10)..'| Start: '..value..' |'..string.rep('__',10),true)
|
||||
Manager.verbose('The verbose state is now: '..tostring(Manager.setVerbose[value]),true)
|
||||
rawset(Manager,key,value)
|
||||
else error('Manager is read only please use included methods',2) end
|
||||
end,
|
||||
@@ -48,7 +49,7 @@ local function setupModuleName(name)
|
||||
end
|
||||
|
||||
Manager.currentState = 'selfInit'
|
||||
-- selfInit > moduleLoad > moduleInit > moduleEnv
|
||||
-- selfInit > moduleLoad > moduleInit > modulePost > moduleEnv
|
||||
|
||||
--- Default output for the verbose
|
||||
-- @usage Manager.verbose('Hello, World!')
|
||||
@@ -98,6 +99,7 @@ Manager.setVerbose = setmetatable(
|
||||
-- @tfield boolean selfInit called while the manager is being set up
|
||||
-- @tfield boolean moduleLoad when a module is required by the manager
|
||||
-- @tfield boolean moduleInit when and within the initation of a module
|
||||
-- @tfield boolean modulePost when and within the post of a module
|
||||
-- @tfield boolean moduleEnv during module runtime, this is a global option set within each module(module_verbose=true ln:1) for fine control
|
||||
-- @tfield boolean eventRegistered when a module registers its event handlers
|
||||
-- @tfield boolean errorCaught when an error is caught during runtime
|
||||
@@ -107,6 +109,7 @@ Manager.setVerbose = setmetatable(
|
||||
selfInit=true,
|
||||
moduleLoad=false,
|
||||
moduleInit=false,
|
||||
modulePost=false,
|
||||
moduleEnv=false,
|
||||
eventRegistered=false,
|
||||
errorCaught=true,
|
||||
@@ -145,7 +148,8 @@ Manager.setVerbose = setmetatable(
|
||||
}
|
||||
)
|
||||
-- call to verbose to show start up, will always be present
|
||||
Manager.verbose('Current state is now: "selfInit"; The verbose state is: '..tostring(Manager.setVerbose.selfInit),true)
|
||||
Manager.verbose(string.rep('__',10)..'| Start: selfInit |'..string.rep('__',10),true)
|
||||
Manager.verbose('The verbose state is: '..tostring(Manager.setVerbose.selfInit),true)
|
||||
|
||||
--- Used to avoid conflicts in the global table
|
||||
-- @usage global[key] -- used like the normal global table
|
||||
@@ -292,7 +296,7 @@ Manager.loadModules = setmetatable({},
|
||||
end
|
||||
-- new state for the manager to allow control of verbose
|
||||
ReadOnlyManager.currentState = 'moduleInit'
|
||||
-- runs though all loaded modules looking for on_init function; all other modules have been loaded
|
||||
-- runs though all loaded modules looking for on_init function; all other modules have been loaded use this to load extra code based on opttial dependies
|
||||
for module_name,data in pairs(tbl) do
|
||||
-- looks for init so that init or on_init can be used
|
||||
if type(data) == 'table' and data.init and data.on_init == nil then data.on_init = data.init data.init = nil end
|
||||
@@ -308,6 +312,24 @@ Manager.loadModules = setmetatable({},
|
||||
data.on_init = nil
|
||||
end
|
||||
end
|
||||
-- new state for the manager to allow control of verbose
|
||||
ReadOnlyManager.currentState = 'modulePost'
|
||||
-- runs though all loaded modules looking for on_post function; all other modules have been loaded and inited, do not load extra code in this time only altar your own data
|
||||
for module_name,data in pairs(tbl) do
|
||||
-- looks for post so that post or on_post can be used
|
||||
if type(data) == 'table' and data.post and data.on_post == nil then data.on_post = data.post data.post = nil end
|
||||
if type(data) == 'table' and data.on_post and type(data.on_post) == 'function' then
|
||||
Manager.verbose('Post for module: "'..module_name..'"')
|
||||
local sandbox, success, err = Manager.sandbox(data.on_post,{module_name=setupModuleName(module_name),module_path=moduleIndex[tostring(module_name)]},data)
|
||||
if success then
|
||||
Manager.verbose('Successful post: "'..module_name..'"')
|
||||
else
|
||||
Manager.verbose('Failed post: "'..module_name..'" ('..err..')','errorCaught')
|
||||
end
|
||||
-- clears the post function so it cant be used in runtime
|
||||
data.on_post = nil
|
||||
end
|
||||
end
|
||||
-- this could also be called runtime
|
||||
ReadOnlyManager.currentState = 'moduleEnv'
|
||||
end,
|
||||
|
||||
@@ -16,6 +16,7 @@ Manager.setVerbose{
|
||||
selfInit=true, -- called while the manager is being set up
|
||||
moduleLoad=true, -- when a module is required by the manager
|
||||
moduleInit=true, -- when and within the initation of a module
|
||||
modulePost=true, -- when and within the post of a module
|
||||
moduleEnv=true, -- during module runtime, this is a global option set within each module for fine control
|
||||
eventRegistered=false, -- when a module registers its event handlers
|
||||
errorCaught=true, -- when an error is caught during runtime
|
||||
|
||||
@@ -33,12 +33,13 @@
|
||||
<ul class="nowrap">
|
||||
<li><a href="modules/FSM.html">FSM</a></li>
|
||||
<li><a href="modules/ExpGamingCore.Commands.html">ExpGamingCore.Commands</a></li>
|
||||
<li><a href="modules/modules.expgamingcore.gui.guiparts.center.html">modules.expgamingcore.gui.guiparts.center</a></li>
|
||||
<li><a href="modules/modules.expgamingcore.gui.guiparts.inputs.html">modules.expgamingcore.gui.guiparts.inputs</a></li>
|
||||
<li><a href="modules/modules.expgamingcore.gui.guiparts.left.html">modules.expgamingcore.gui.guiparts.left</a></li>
|
||||
<li><a href="modules/modules.expgamingcore.gui.guiparts.popup.html">modules.expgamingcore.gui.guiparts.popup</a></li>
|
||||
<li><a href="modules/modules.expgamingcore.gui.guiparts.toolbar.html">modules.expgamingcore.gui.guiparts.toolbar</a></li>
|
||||
<li><a href="modules/modules.expgamingcore.gui.control.html">modules.expgamingcore.gui.control</a></li>
|
||||
<li><a href="modules/ExpGamingCore.Gui.html">ExpGamingCore.Gui</a></li>
|
||||
<li><a href="modules/ExpGamingCore.Gui.Center.html">ExpGamingCore.Gui.Center</a></li>
|
||||
<li><a href="modules/ExpGamingCore.Gui.Inputs.html">ExpGamingCore.Gui.Inputs</a></li>
|
||||
<li><a href="modules/ExpGamingCore.Gui.Left.html">ExpGamingCore.Gui.Left</a></li>
|
||||
<li><a href="modules/ExpGamingCore.Gui.Popup.html">ExpGamingCore.Gui.Popup</a></li>
|
||||
<li><a href="modules/ExpGamingCore.Gui.Test.html">ExpGamingCore.Gui.Test</a></li>
|
||||
<li><a href="modules/ExpGamingCore.Gui.Toolbar.html">ExpGamingCore.Gui.Toolbar</a></li>
|
||||
<li><a href="modules/ExpGamingCore.Ranking.html">ExpGamingCore.Ranking</a></li>
|
||||
<li><a href="modules/ExpGamingCore.Server.html">ExpGamingCore.Server</a></li>
|
||||
<li><a href="modules/ExpGamingCore.Sync.html">ExpGamingCore.Sync</a></li>
|
||||
@@ -67,28 +68,32 @@
|
||||
<td class="summary">A full ranking system for factorio.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="modules/modules.expgamingcore.gui.guiparts.center.html">modules.expgamingcore.gui.guiparts.center</a></td>
|
||||
<td class="summary">Adds a new obj to the center gui</td>
|
||||
<td class="name" nowrap><a href="modules/ExpGamingCore.Gui.html">ExpGamingCore.Gui</a></td>
|
||||
<td class="summary">Adds a objective version to custom guis.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="modules/modules.expgamingcore.gui.guiparts.inputs.html">modules.expgamingcore.gui.guiparts.inputs</a></td>
|
||||
<td class="summary">Sets the input to trigger on an certain event</td>
|
||||
<td class="name" nowrap><a href="modules/ExpGamingCore.Gui.Center.html">ExpGamingCore.Gui.Center</a></td>
|
||||
<td class="summary">Adds a uniform preset for guis in the center of the screen which allow for different tabs to be opened</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="modules/modules.expgamingcore.gui.guiparts.left.html">modules.expgamingcore.gui.guiparts.left</a></td>
|
||||
<td class="summary">Used to add a left gui frame</td>
|
||||
<td class="name" nowrap><a href="modules/ExpGamingCore.Gui.Inputs.html">ExpGamingCore.Gui.Inputs</a></td>
|
||||
<td class="summary">Adds a clean way of making new inputs for a gui allowing for sliders and text inputs to be hanndleded with custom events</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="modules/modules.expgamingcore.gui.guiparts.popup.html">modules.expgamingcore.gui.guiparts.popup</a></td>
|
||||
<td class="summary">Used to add a popup gui style</td>
|
||||
<td class="name" nowrap><a href="modules/ExpGamingCore.Gui.Left.html">ExpGamingCore.Gui.Left</a></td>
|
||||
<td class="summary">Adds a organiser for left gui ellements which will automaticaly update there information and have open requirements</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="modules/modules.expgamingcore.gui.guiparts.toolbar.html">modules.expgamingcore.gui.guiparts.toolbar</a></td>
|
||||
<td class="summary">Add a button to the toolbar, ranks need to be allowed to use these buttons if ranks is preset</td>
|
||||
<td class="name" nowrap><a href="modules/ExpGamingCore.Gui.Popup.html">ExpGamingCore.Gui.Popup</a></td>
|
||||
<td class="summary">Adds a location for popups which can be dismissed by a player and created from other scripts</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="modules/modules.expgamingcore.gui.control.html">modules.expgamingcore.gui.control</a></td>
|
||||
<td class="summary">Add a white bar to any gui frame</td>
|
||||
<td class="name" nowrap><a href="modules/ExpGamingCore.Gui.Test.html">ExpGamingCore.Gui.Test</a></td>
|
||||
<td class="summary">Used to test all gui elements and parts can be used in game via Gui.test()</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="modules/ExpGamingCore.Gui.Toolbar.html">ExpGamingCore.Gui.Toolbar</a></td>
|
||||
<td class="summary">Adds a toolbar to the top left of the screen</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="modules/ExpGamingCore.Ranking.html">ExpGamingCore.Ranking</a></td>
|
||||
@@ -132,7 +137,7 @@
|
||||
</div> <!-- id="main" -->
|
||||
<div id="about">
|
||||
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
|
||||
<i style="float:right;">Last updated 2018-06-05 19:31:42 </i>
|
||||
<i style="float:right;">Last updated 2018-06-07 12:58:23 </i>
|
||||
</div> <!-- id="about" -->
|
||||
</div> <!-- id="container" -->
|
||||
</body>
|
||||
|
||||
@@ -42,12 +42,13 @@
|
||||
<ul class="nowrap">
|
||||
<li><a href="../modules/FSM.html">FSM</a></li>
|
||||
<li><strong>ExpGamingCore.Commands</strong></li>
|
||||
<li><a href="../modules/modules.expgamingcore.gui.guiparts.center.html">modules.expgamingcore.gui.guiparts.center</a></li>
|
||||
<li><a href="../modules/modules.expgamingcore.gui.guiparts.inputs.html">modules.expgamingcore.gui.guiparts.inputs</a></li>
|
||||
<li><a href="../modules/modules.expgamingcore.gui.guiparts.left.html">modules.expgamingcore.gui.guiparts.left</a></li>
|
||||
<li><a href="../modules/modules.expgamingcore.gui.guiparts.popup.html">modules.expgamingcore.gui.guiparts.popup</a></li>
|
||||
<li><a href="../modules/modules.expgamingcore.gui.guiparts.toolbar.html">modules.expgamingcore.gui.guiparts.toolbar</a></li>
|
||||
<li><a href="../modules/modules.expgamingcore.gui.control.html">modules.expgamingcore.gui.control</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Gui.html">ExpGamingCore.Gui</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Gui.Center.html">ExpGamingCore.Gui.Center</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Gui.Inputs.html">ExpGamingCore.Gui.Inputs</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Gui.Left.html">ExpGamingCore.Gui.Left</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Gui.Popup.html">ExpGamingCore.Gui.Popup</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Gui.Test.html">ExpGamingCore.Gui.Test</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Gui.Toolbar.html">ExpGamingCore.Gui.Toolbar</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Ranking.html">ExpGamingCore.Ranking</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Server.html">ExpGamingCore.Server</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Sync.html">ExpGamingCore.Sync</a></li>
|
||||
@@ -393,7 +394,7 @@
|
||||
</div> <!-- id="main" -->
|
||||
<div id="about">
|
||||
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
|
||||
<i style="float:right;">Last updated 2018-06-05 19:31:42 </i>
|
||||
<i style="float:right;">Last updated 2018-06-07 12:58:23 </i>
|
||||
</div> <!-- id="about" -->
|
||||
</div> <!-- id="container" -->
|
||||
</body>
|
||||
|
||||
@@ -40,12 +40,13 @@
|
||||
<ul class="nowrap">
|
||||
<li><a href="../modules/FSM.html">FSM</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Commands.html">ExpGamingCore.Commands</a></li>
|
||||
<li><strong>modules.expgamingcore.gui.guiparts.center</strong></li>
|
||||
<li><a href="../modules/modules.expgamingcore.gui.guiparts.inputs.html">modules.expgamingcore.gui.guiparts.inputs</a></li>
|
||||
<li><a href="../modules/modules.expgamingcore.gui.guiparts.left.html">modules.expgamingcore.gui.guiparts.left</a></li>
|
||||
<li><a href="../modules/modules.expgamingcore.gui.guiparts.popup.html">modules.expgamingcore.gui.guiparts.popup</a></li>
|
||||
<li><a href="../modules/modules.expgamingcore.gui.guiparts.toolbar.html">modules.expgamingcore.gui.guiparts.toolbar</a></li>
|
||||
<li><a href="../modules/modules.expgamingcore.gui.control.html">modules.expgamingcore.gui.control</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Gui.html">ExpGamingCore.Gui</a></li>
|
||||
<li><strong>ExpGamingCore.Gui.Center</strong></li>
|
||||
<li><a href="../modules/ExpGamingCore.Gui.Inputs.html">ExpGamingCore.Gui.Inputs</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Gui.Left.html">ExpGamingCore.Gui.Left</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Gui.Popup.html">ExpGamingCore.Gui.Popup</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Gui.Test.html">ExpGamingCore.Gui.Test</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Gui.Toolbar.html">ExpGamingCore.Gui.Toolbar</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Ranking.html">ExpGamingCore.Ranking</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Server.html">ExpGamingCore.Server</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Sync.html">ExpGamingCore.Sync</a></li>
|
||||
@@ -61,18 +62,26 @@
|
||||
|
||||
<div id="content">
|
||||
|
||||
<h1>Module <code>modules.expgamingcore.gui.guiparts.center</code></h1>
|
||||
<p>Adds a new obj to the center gui</p>
|
||||
<h1>Module <code>ExpGamingCore.Gui.Center</code></h1>
|
||||
<p>Adds a uniform preset for guis in the center of the screen which allow for different tabs to be opened</p>
|
||||
<p></p>
|
||||
<h3>Usage:</h3>
|
||||
<h3>Info:</h3>
|
||||
<ul>
|
||||
<pre class="example">Gui.center.add{name='foo',caption='Foo',tooltip='Testing',draw=function}
|
||||
</pre>
|
||||
<li><strong>License</strong>: https://github.com/explosivegaming/scenario/blob/master/LICENSE</li>
|
||||
<li><strong>Author</strong>: Cooldude2606</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h2><a href="#Functions">Functions</a></h2>
|
||||
<table class="function_list">
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#_comment">_comment ()</a></td>
|
||||
<td class="summary">This is a submodule of ExpGamingCore.Gui but for ldoc reasons it is under its own module</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#add">add (obj)</a></td>
|
||||
<td class="summary">Adds a new obj to the center gui</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#get_flow">get_flow (player)</a></td>
|
||||
<td class="summary">Used to get the center frame of the player, used mainly in script</td>
|
||||
@@ -102,6 +111,49 @@
|
||||
<h2 class="section-header "><a name="Functions"></a>Functions</h2>
|
||||
|
||||
<dl class="function">
|
||||
<dt>
|
||||
<a name = "_comment"></a>
|
||||
<strong>_comment ()</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
This is a submodule of ExpGamingCore.Gui but for ldoc reasons it is under its own module
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "add"></a>
|
||||
<strong>add (obj)</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Adds a new obj to the center gui
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">obj</span>
|
||||
contains the new object, needs name, fraw is opt and is function(root_frame)
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
the object made, used to add tabs
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
<h3>Usage:</h3>
|
||||
<ul>
|
||||
<pre class="example">Gui.center.add{name=<span class="string">'foo'</span>,caption=<span class="string">'Foo'</span>,tooltip=<span class="string">'Testing'</span>,draw=<span class="keyword">function</span>}</pre>
|
||||
</ul>
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "get_flow"></a>
|
||||
<strong>get_flow (player)</strong>
|
||||
@@ -278,7 +330,7 @@
|
||||
</div> <!-- id="main" -->
|
||||
<div id="about">
|
||||
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
|
||||
<i style="float:right;">Last updated 2018-06-05 19:31:42 </i>
|
||||
<i style="float:right;">Last updated 2018-06-07 12:58:23 </i>
|
||||
</div> <!-- id="about" -->
|
||||
</div> <!-- id="container" -->
|
||||
</body>
|
||||
@@ -40,12 +40,13 @@
|
||||
<ul class="nowrap">
|
||||
<li><a href="../modules/FSM.html">FSM</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Commands.html">ExpGamingCore.Commands</a></li>
|
||||
<li><a href="../modules/modules.expgamingcore.gui.guiparts.center.html">modules.expgamingcore.gui.guiparts.center</a></li>
|
||||
<li><strong>modules.expgamingcore.gui.guiparts.inputs</strong></li>
|
||||
<li><a href="../modules/modules.expgamingcore.gui.guiparts.left.html">modules.expgamingcore.gui.guiparts.left</a></li>
|
||||
<li><a href="../modules/modules.expgamingcore.gui.guiparts.popup.html">modules.expgamingcore.gui.guiparts.popup</a></li>
|
||||
<li><a href="../modules/modules.expgamingcore.gui.guiparts.toolbar.html">modules.expgamingcore.gui.guiparts.toolbar</a></li>
|
||||
<li><a href="../modules/modules.expgamingcore.gui.control.html">modules.expgamingcore.gui.control</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Gui.html">ExpGamingCore.Gui</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Gui.Center.html">ExpGamingCore.Gui.Center</a></li>
|
||||
<li><strong>ExpGamingCore.Gui.Inputs</strong></li>
|
||||
<li><a href="../modules/ExpGamingCore.Gui.Left.html">ExpGamingCore.Gui.Left</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Gui.Popup.html">ExpGamingCore.Gui.Popup</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Gui.Test.html">ExpGamingCore.Gui.Test</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Gui.Toolbar.html">ExpGamingCore.Gui.Toolbar</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Ranking.html">ExpGamingCore.Ranking</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Server.html">ExpGamingCore.Server</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Sync.html">ExpGamingCore.Sync</a></li>
|
||||
@@ -61,18 +62,26 @@
|
||||
|
||||
<div id="content">
|
||||
|
||||
<h1>Module <code>modules.expgamingcore.gui.guiparts.inputs</code></h1>
|
||||
<p>Sets the input to trigger on an certain event</p>
|
||||
<h1>Module <code>ExpGamingCore.Gui.Inputs</code></h1>
|
||||
<p>Adds a clean way of making new inputs for a gui allowing for sliders and text inputs to be hanndleded with custom events</p>
|
||||
<p></p>
|
||||
<h3>Usage:</h3>
|
||||
<h3>Info:</h3>
|
||||
<ul>
|
||||
<pre class="example">button:on_event(defines.events.on_gui_click,player_return)
|
||||
</pre>
|
||||
<li><strong>License</strong>: https://github.com/explosivegaming/scenario/blob/master/LICENSE</li>
|
||||
<li><strong>Author</strong>: Cooldude2606</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h2><a href="#Functions">Functions</a></h2>
|
||||
<table class="function_list">
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#_comment">_comment ()</a></td>
|
||||
<td class="summary">This is a submodule of ExpGamingCore.Gui but for ldoc reasons it is under its own module</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#inputs._input:on_event">inputs._input:on_event (event, callback)</a></td>
|
||||
<td class="summary">Sets the input to trigger on an certain event</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#inputs._input:draw">inputs._input:draw (root)</a></td>
|
||||
<td class="summary">Draw the input into the root element</td>
|
||||
@@ -114,6 +123,54 @@
|
||||
<h2 class="section-header "><a name="Functions"></a>Functions</h2>
|
||||
|
||||
<dl class="function">
|
||||
<dt>
|
||||
<a name = "_comment"></a>
|
||||
<strong>_comment ()</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
This is a submodule of ExpGamingCore.Gui but for ldoc reasons it is under its own module
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "inputs._input:on_event"></a>
|
||||
<strong>inputs._input:on_event (event, callback)</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Sets the input to trigger on an certain event
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">event</span>
|
||||
the event to raise callback on | can be number of the event | can be a key of inputs.events
|
||||
</li>
|
||||
<li><span class="parameter">callback</span>
|
||||
<span class="types"><span class="type">function</span></span>
|
||||
the function you want to run on the event
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.2/manual.html#6.5">table</a></span>
|
||||
returns self so you can chain together
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
<h3>Usage:</h3>
|
||||
<ul>
|
||||
<pre class="example">button:on_event(defines.events.on_gui_click,player_return)</pre>
|
||||
</ul>
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "inputs._input:draw"></a>
|
||||
<strong>inputs._input:draw (root)</strong>
|
||||
@@ -434,7 +491,7 @@
|
||||
</div> <!-- id="main" -->
|
||||
<div id="about">
|
||||
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
|
||||
<i style="float:right;">Last updated 2018-06-05 19:31:42 </i>
|
||||
<i style="float:right;">Last updated 2018-06-07 12:58:23 </i>
|
||||
</div> <!-- id="about" -->
|
||||
</div> <!-- id="container" -->
|
||||
</body>
|
||||
@@ -40,12 +40,13 @@
|
||||
<ul class="nowrap">
|
||||
<li><a href="../modules/FSM.html">FSM</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Commands.html">ExpGamingCore.Commands</a></li>
|
||||
<li><a href="../modules/modules.expgamingcore.gui.guiparts.center.html">modules.expgamingcore.gui.guiparts.center</a></li>
|
||||
<li><a href="../modules/modules.expgamingcore.gui.guiparts.inputs.html">modules.expgamingcore.gui.guiparts.inputs</a></li>
|
||||
<li><strong>modules.expgamingcore.gui.guiparts.left</strong></li>
|
||||
<li><a href="../modules/modules.expgamingcore.gui.guiparts.popup.html">modules.expgamingcore.gui.guiparts.popup</a></li>
|
||||
<li><a href="../modules/modules.expgamingcore.gui.guiparts.toolbar.html">modules.expgamingcore.gui.guiparts.toolbar</a></li>
|
||||
<li><a href="../modules/modules.expgamingcore.gui.control.html">modules.expgamingcore.gui.control</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Gui.html">ExpGamingCore.Gui</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Gui.Center.html">ExpGamingCore.Gui.Center</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Gui.Inputs.html">ExpGamingCore.Gui.Inputs</a></li>
|
||||
<li><strong>ExpGamingCore.Gui.Left</strong></li>
|
||||
<li><a href="../modules/ExpGamingCore.Gui.Popup.html">ExpGamingCore.Gui.Popup</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Gui.Test.html">ExpGamingCore.Gui.Test</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Gui.Toolbar.html">ExpGamingCore.Gui.Toolbar</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Ranking.html">ExpGamingCore.Ranking</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Server.html">ExpGamingCore.Server</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Sync.html">ExpGamingCore.Sync</a></li>
|
||||
@@ -61,18 +62,26 @@
|
||||
|
||||
<div id="content">
|
||||
|
||||
<h1>Module <code>modules.expgamingcore.gui.guiparts.left</code></h1>
|
||||
<p>Used to add a left gui frame</p>
|
||||
<h1>Module <code>ExpGamingCore.Gui.Left</code></h1>
|
||||
<p>Adds a organiser for left gui ellements which will automaticaly update there information and have open requirements</p>
|
||||
<p></p>
|
||||
<h3>Usage:</h3>
|
||||
<h3>Info:</h3>
|
||||
<ul>
|
||||
<pre class="example">Gui.left.add{name='foo',caption='Foo',tooltip='just testing',open_on_join=true,can_open=function,draw=function}
|
||||
</pre>
|
||||
<li><strong>License</strong>: https://github.com/explosivegaming/scenario/blob/master/LICENSE</li>
|
||||
<li><strong>Author</strong>: Cooldude2606</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h2><a href="#Functions">Functions</a></h2>
|
||||
<table class="function_list">
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#_comment">_comment ()</a></td>
|
||||
<td class="summary">This is a submodule of ExpGamingCore.Gui but for ldoc reasons it is under its own module</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#add">add (obj)</a></td>
|
||||
<td class="summary">Used to add a left gui frame</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#update">update ([frame[, players]])</a></td>
|
||||
<td class="summary">This is used to update all the guis of conected players, good idea to use our thread system as it as nested for loops</td>
|
||||
@@ -94,6 +103,49 @@
|
||||
<h2 class="section-header "><a name="Functions"></a>Functions</h2>
|
||||
|
||||
<dl class="function">
|
||||
<dt>
|
||||
<a name = "_comment"></a>
|
||||
<strong>_comment ()</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
This is a submodule of ExpGamingCore.Gui but for ldoc reasons it is under its own module
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "add"></a>
|
||||
<strong>add (obj)</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Used to add a left gui frame
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">obj</span>
|
||||
this is what will be made, needs a name and a draw function(root_frame), open_on_join can be used to set the deaful state true/false, can_open is a test to block it from opening but is not needed
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
the object that is made to... well idk but for the future
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
<h3>Usage:</h3>
|
||||
<ul>
|
||||
<pre class="example">Gui.left.add{name=<span class="string">'foo'</span>,caption=<span class="string">'Foo'</span>,tooltip=<span class="string">'just testing'</span>,open_on_join=<span class="keyword">true</span>,can_open=<span class="keyword">function</span>,draw=<span class="keyword">function</span>}</pre>
|
||||
</ul>
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "update"></a>
|
||||
<strong>update ([frame[, players]])</strong>
|
||||
@@ -181,7 +233,7 @@
|
||||
</div> <!-- id="main" -->
|
||||
<div id="about">
|
||||
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
|
||||
<i style="float:right;">Last updated 2018-06-05 19:31:42 </i>
|
||||
<i style="float:right;">Last updated 2018-06-07 12:58:23 </i>
|
||||
</div> <!-- id="about" -->
|
||||
</div> <!-- id="container" -->
|
||||
</body>
|
||||
@@ -40,12 +40,13 @@
|
||||
<ul class="nowrap">
|
||||
<li><a href="../modules/FSM.html">FSM</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Commands.html">ExpGamingCore.Commands</a></li>
|
||||
<li><a href="../modules/modules.expgamingcore.gui.guiparts.center.html">modules.expgamingcore.gui.guiparts.center</a></li>
|
||||
<li><a href="../modules/modules.expgamingcore.gui.guiparts.inputs.html">modules.expgamingcore.gui.guiparts.inputs</a></li>
|
||||
<li><a href="../modules/modules.expgamingcore.gui.guiparts.left.html">modules.expgamingcore.gui.guiparts.left</a></li>
|
||||
<li><strong>modules.expgamingcore.gui.guiparts.popup</strong></li>
|
||||
<li><a href="../modules/modules.expgamingcore.gui.guiparts.toolbar.html">modules.expgamingcore.gui.guiparts.toolbar</a></li>
|
||||
<li><a href="../modules/modules.expgamingcore.gui.control.html">modules.expgamingcore.gui.control</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Gui.html">ExpGamingCore.Gui</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Gui.Center.html">ExpGamingCore.Gui.Center</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Gui.Inputs.html">ExpGamingCore.Gui.Inputs</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Gui.Left.html">ExpGamingCore.Gui.Left</a></li>
|
||||
<li><strong>ExpGamingCore.Gui.Popup</strong></li>
|
||||
<li><a href="../modules/ExpGamingCore.Gui.Test.html">ExpGamingCore.Gui.Test</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Gui.Toolbar.html">ExpGamingCore.Gui.Toolbar</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Ranking.html">ExpGamingCore.Ranking</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Server.html">ExpGamingCore.Server</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Sync.html">ExpGamingCore.Sync</a></li>
|
||||
@@ -61,18 +62,26 @@
|
||||
|
||||
<div id="content">
|
||||
|
||||
<h1>Module <code>modules.expgamingcore.gui.guiparts.popup</code></h1>
|
||||
<p>Used to add a popup gui style</p>
|
||||
<h1>Module <code>ExpGamingCore.Gui.Popup</code></h1>
|
||||
<p>Adds a location for popups which can be dismissed by a player and created from other scripts</p>
|
||||
<p></p>
|
||||
<h3>Usage:</h3>
|
||||
<h3>Info:</h3>
|
||||
<ul>
|
||||
<pre class="example">Gui.left.add{name='foo',caption='Foo',draw=function}
|
||||
</pre>
|
||||
<li><strong>License</strong>: https://github.com/explosivegaming/scenario/blob/master/LICENSE</li>
|
||||
<li><strong>Author</strong>: Cooldude2606</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h2><a href="#Functions">Functions</a></h2>
|
||||
<table class="function_list">
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#_comment">_comment ()</a></td>
|
||||
<td class="summary">This is a submodule of ExpGamingCore.Gui but for ldoc reasons it is under its own module</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#add">add (obj)</a></td>
|
||||
<td class="summary">Used to add a popup gui style</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#open">open (style, data[, players=game.connected_players])</a></td>
|
||||
<td class="summary">Use to open a popup for these players</td>
|
||||
@@ -86,6 +95,49 @@
|
||||
<h2 class="section-header "><a name="Functions"></a>Functions</h2>
|
||||
|
||||
<dl class="function">
|
||||
<dt>
|
||||
<a name = "_comment"></a>
|
||||
<strong>_comment ()</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
This is a submodule of ExpGamingCore.Gui but for ldoc reasons it is under its own module
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "add"></a>
|
||||
<strong>add (obj)</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Used to add a popup gui style
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">obj</span>
|
||||
this is what will be made, needs a name and a draw function(root_frame,data)
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
the object that is made to... well idk but for the future
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
<h3>Usage:</h3>
|
||||
<ul>
|
||||
<pre class="example">Gui.left.add{name=<span class="string">'foo'</span>,caption=<span class="string">'Foo'</span>,draw=<span class="keyword">function</span>}</pre>
|
||||
</ul>
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "open"></a>
|
||||
<strong>open (style, data[, players=game.connected_players])</strong>
|
||||
@@ -126,7 +178,7 @@
|
||||
</div> <!-- id="main" -->
|
||||
<div id="about">
|
||||
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
|
||||
<i style="float:right;">Last updated 2018-06-05 19:31:42 </i>
|
||||
<i style="float:right;">Last updated 2018-06-07 12:58:23 </i>
|
||||
</div> <!-- id="about" -->
|
||||
</div> <!-- id="container" -->
|
||||
</body>
|
||||
@@ -40,12 +40,13 @@
|
||||
<ul class="nowrap">
|
||||
<li><a href="../modules/FSM.html">FSM</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Commands.html">ExpGamingCore.Commands</a></li>
|
||||
<li><a href="../modules/modules.expgamingcore.gui.guiparts.center.html">modules.expgamingcore.gui.guiparts.center</a></li>
|
||||
<li><a href="../modules/modules.expgamingcore.gui.guiparts.inputs.html">modules.expgamingcore.gui.guiparts.inputs</a></li>
|
||||
<li><a href="../modules/modules.expgamingcore.gui.guiparts.left.html">modules.expgamingcore.gui.guiparts.left</a></li>
|
||||
<li><a href="../modules/modules.expgamingcore.gui.guiparts.popup.html">modules.expgamingcore.gui.guiparts.popup</a></li>
|
||||
<li><strong>modules.expgamingcore.gui.guiparts.toolbar</strong></li>
|
||||
<li><a href="../modules/modules.expgamingcore.gui.control.html">modules.expgamingcore.gui.control</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Gui.html">ExpGamingCore.Gui</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Gui.Center.html">ExpGamingCore.Gui.Center</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Gui.Inputs.html">ExpGamingCore.Gui.Inputs</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Gui.Left.html">ExpGamingCore.Gui.Left</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Gui.Popup.html">ExpGamingCore.Gui.Popup</a></li>
|
||||
<li><strong>ExpGamingCore.Gui.Test</strong></li>
|
||||
<li><a href="../modules/ExpGamingCore.Gui.Toolbar.html">ExpGamingCore.Gui.Toolbar</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Ranking.html">ExpGamingCore.Ranking</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Server.html">ExpGamingCore.Server</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Sync.html">ExpGamingCore.Sync</a></li>
|
||||
@@ -61,21 +62,25 @@
|
||||
|
||||
<div id="content">
|
||||
|
||||
<h1>Module <code>modules.expgamingcore.gui.guiparts.toolbar</code></h1>
|
||||
<p>Add a button to the toolbar, ranks need to be allowed to use these buttons if ranks is preset</p>
|
||||
<h1>Module <code>ExpGamingCore.Gui.Test</code></h1>
|
||||
<p>Used to test all gui elements and parts can be used in game via Gui.test()</p>
|
||||
<p></p>
|
||||
<h3>Usage:</h3>
|
||||
<h3>Info:</h3>
|
||||
<ul>
|
||||
<pre class="example">toolbar.add('foo','Foo','Test',function() game.print('test') end)
|
||||
</pre>
|
||||
<li><strong>License</strong>: https://github.com/explosivegaming/scenario/blob/master/LICENSE</li>
|
||||
<li><strong>Author</strong>: Cooldude2606</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h2><a href="#Functions">Functions</a></h2>
|
||||
<table class="function_list">
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#draw">draw (player)</a></td>
|
||||
<td class="summary">Draws the toolbar for a certain player</td>
|
||||
<td class="name" nowrap><a href="#_comment">_comment ()</a></td>
|
||||
<td class="summary">This is a submodule of ExpGamingCore.Gui but for ldoc reasons it is under its own module</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#Gui.test">Gui.test ([player=game.player])</a></td>
|
||||
<td class="summary">The funcation that is called when calling Gui.test</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
@@ -87,17 +92,32 @@
|
||||
|
||||
<dl class="function">
|
||||
<dt>
|
||||
<a name = "draw"></a>
|
||||
<strong>draw (player)</strong>
|
||||
<a name = "_comment"></a>
|
||||
<strong>_comment ()</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Draws the toolbar for a certain player
|
||||
This is a submodule of ExpGamingCore.Gui but for ldoc reasons it is under its own module
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "Gui.test"></a>
|
||||
<strong>Gui.test ([player=game.player])</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
The funcation that is called when calling Gui.test
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">player</span>
|
||||
the player to draw the tool bar of
|
||||
a pointer to a player to draw the test gui for
|
||||
(<em>default</em> game.player)
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
@@ -106,7 +126,7 @@
|
||||
|
||||
<h3>Usage:</h3>
|
||||
<ul>
|
||||
<pre class="example">toolbar.draw(<span class="number">1</span>)</pre>
|
||||
<pre class="example">Gui.test() <span class="comment">-- draws test gui</span></pre>
|
||||
</ul>
|
||||
|
||||
</dd>
|
||||
@@ -117,7 +137,7 @@
|
||||
</div> <!-- id="main" -->
|
||||
<div id="about">
|
||||
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
|
||||
<i style="float:right;">Last updated 2018-06-05 19:31:42 </i>
|
||||
<i style="float:right;">Last updated 2018-06-07 12:58:23 </i>
|
||||
</div> <!-- id="about" -->
|
||||
</div> <!-- id="container" -->
|
||||
</body>
|
||||
190
doc/modules/ExpGamingCore.Gui.Toolbar.html
Normal file
190
doc/modules/ExpGamingCore.Gui.Toolbar.html
Normal file
@@ -0,0 +1,190 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
||||
<head>
|
||||
<title>Reference</title>
|
||||
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div id="container">
|
||||
|
||||
<div id="product">
|
||||
<div id="product_logo"></div>
|
||||
<div id="product_name"><big><b></b></big></div>
|
||||
<div id="product_description"></div>
|
||||
</div> <!-- id="product" -->
|
||||
|
||||
|
||||
<div id="main">
|
||||
|
||||
|
||||
<!-- Menu -->
|
||||
|
||||
<div id="navigation">
|
||||
<br/>
|
||||
<h1>ldoc</h1>
|
||||
|
||||
<ul>
|
||||
<li><a href="../index.html">Index</a></li>
|
||||
</ul>
|
||||
|
||||
<h2>Contents</h2>
|
||||
<ul>
|
||||
<li><a href="#Functions">Functions</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h2>Modules</h2>
|
||||
<ul class="nowrap">
|
||||
<li><a href="../modules/FSM.html">FSM</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Commands.html">ExpGamingCore.Commands</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Gui.html">ExpGamingCore.Gui</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Gui.Center.html">ExpGamingCore.Gui.Center</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Gui.Inputs.html">ExpGamingCore.Gui.Inputs</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Gui.Left.html">ExpGamingCore.Gui.Left</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Gui.Popup.html">ExpGamingCore.Gui.Popup</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Gui.Test.html">ExpGamingCore.Gui.Test</a></li>
|
||||
<li><strong>ExpGamingCore.Gui.Toolbar</strong></li>
|
||||
<li><a href="../modules/ExpGamingCore.Ranking.html">ExpGamingCore.Ranking</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Server.html">ExpGamingCore.Server</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Sync.html">ExpGamingCore.Sync</a></li>
|
||||
<li><a href="../modules/ExpGamingLib.html">ExpGamingLib</a></li>
|
||||
<li><a href="../modules/StdLib.Color.html">StdLib.Color</a></li>
|
||||
<li><a href="../modules/StdLib.Game.html">StdLib.Game</a></li>
|
||||
<li><a href="../modules/StdLib.String.html">StdLib.String</a></li>
|
||||
<li><a href="../modules/StdLib.Table.html">StdLib.Table</a></li>
|
||||
<li><a href="../modules/StdLib.Time.html">StdLib.Time</a></li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
|
||||
<h1>Module <code>ExpGamingCore.Gui.Toolbar</code></h1>
|
||||
<p>Adds a toolbar to the top left of the screen</p>
|
||||
<p></p>
|
||||
<h3>Info:</h3>
|
||||
<ul>
|
||||
<li><strong>License</strong>: https://github.com/explosivegaming/scenario/blob/master/LICENSE</li>
|
||||
<li><strong>Author</strong>: Cooldude2606</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h2><a href="#Functions">Functions</a></h2>
|
||||
<table class="function_list">
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#_comment">_comment ()</a></td>
|
||||
<td class="summary">This is a submodule of ExpGamingCore.Gui but for ldoc reasons it is under its own module</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#add">add (name, caption, tooltip, callback)</a></td>
|
||||
<td class="summary">Add a button to the toolbar, ranks need to be allowed to use these buttons if ranks is preset</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#draw">draw (player)</a></td>
|
||||
<td class="summary">Draws the toolbar for a certain player</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br/>
|
||||
<br/>
|
||||
|
||||
|
||||
<h2 class="section-header "><a name="Functions"></a>Functions</h2>
|
||||
|
||||
<dl class="function">
|
||||
<dt>
|
||||
<a name = "_comment"></a>
|
||||
<strong>_comment ()</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
This is a submodule of ExpGamingCore.Gui but for ldoc reasons it is under its own module
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "add"></a>
|
||||
<strong>add (name, caption, tooltip, callback)</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Add a button to the toolbar, ranks need to be allowed to use these buttons if ranks is preset
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">name</span>
|
||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.2/manual.html#6.4">string</a></span>
|
||||
the name of the button
|
||||
</li>
|
||||
<li><span class="parameter">caption</span>
|
||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.2/manual.html#6.4">string</a></span>
|
||||
can be a sprite path or text to show
|
||||
</li>
|
||||
<li><span class="parameter">tooltip</span>
|
||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.2/manual.html#6.4">string</a></span>
|
||||
the help to show for the button
|
||||
</li>
|
||||
<li><span class="parameter">callback</span>
|
||||
<span class="types"><span class="type">function</span></span>
|
||||
the function which is called on_click
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.2/manual.html#6.5">table</a></span>
|
||||
the button object that was made
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
<h3>Usage:</h3>
|
||||
<ul>
|
||||
<pre class="example">toolbar.add(<span class="string">'foo'</span>,<span class="string">'Foo'</span>,<span class="string">'Test'</span>,<span class="keyword">function</span>() game.<span class="global">print</span>(<span class="string">'test'</span>) <span class="keyword">end</span>)</pre>
|
||||
</ul>
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "draw"></a>
|
||||
<strong>draw (player)</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Draws the toolbar for a certain player
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">player</span>
|
||||
the player to draw the tool bar of
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Usage:</h3>
|
||||
<ul>
|
||||
<pre class="example">toolbar.draw(<span class="number">1</span>)</pre>
|
||||
</ul>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
|
||||
</div> <!-- id="content" -->
|
||||
</div> <!-- id="main" -->
|
||||
<div id="about">
|
||||
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
|
||||
<i style="float:right;">Last updated 2018-06-07 12:58:23 </i>
|
||||
</div> <!-- id="about" -->
|
||||
</div> <!-- id="container" -->
|
||||
</body>
|
||||
</html>
|
||||
366
doc/modules/ExpGamingCore.Gui.html
Normal file
366
doc/modules/ExpGamingCore.Gui.html
Normal file
@@ -0,0 +1,366 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
||||
<head>
|
||||
<title>Reference</title>
|
||||
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div id="container">
|
||||
|
||||
<div id="product">
|
||||
<div id="product_logo"></div>
|
||||
<div id="product_name"><big><b></b></big></div>
|
||||
<div id="product_description"></div>
|
||||
</div> <!-- id="product" -->
|
||||
|
||||
|
||||
<div id="main">
|
||||
|
||||
|
||||
<!-- Menu -->
|
||||
|
||||
<div id="navigation">
|
||||
<br/>
|
||||
<h1>ldoc</h1>
|
||||
|
||||
<ul>
|
||||
<li><a href="../index.html">Index</a></li>
|
||||
</ul>
|
||||
|
||||
<h2>Contents</h2>
|
||||
<ul>
|
||||
<li><a href="#Functions">Functions</a></li>
|
||||
<li><a href="#Tables">Tables</a></li>
|
||||
<li><a href="#Fields">Fields</a></li>
|
||||
<li><a href="#modules_expgamingcore_gui_src_server_Functions">modules.expgamingcore.gui.src.server Functions</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h2>Modules</h2>
|
||||
<ul class="nowrap">
|
||||
<li><a href="../modules/FSM.html">FSM</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Commands.html">ExpGamingCore.Commands</a></li>
|
||||
<li><strong>ExpGamingCore.Gui</strong></li>
|
||||
<li><a href="../modules/ExpGamingCore.Gui.Center.html">ExpGamingCore.Gui.Center</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Gui.Inputs.html">ExpGamingCore.Gui.Inputs</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Gui.Left.html">ExpGamingCore.Gui.Left</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Gui.Popup.html">ExpGamingCore.Gui.Popup</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Gui.Test.html">ExpGamingCore.Gui.Test</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Gui.Toolbar.html">ExpGamingCore.Gui.Toolbar</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Ranking.html">ExpGamingCore.Ranking</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Server.html">ExpGamingCore.Server</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Sync.html">ExpGamingCore.Sync</a></li>
|
||||
<li><a href="../modules/ExpGamingLib.html">ExpGamingLib</a></li>
|
||||
<li><a href="../modules/StdLib.Color.html">StdLib.Color</a></li>
|
||||
<li><a href="../modules/StdLib.Game.html">StdLib.Game</a></li>
|
||||
<li><a href="../modules/StdLib.String.html">StdLib.String</a></li>
|
||||
<li><a href="../modules/StdLib.Table.html">StdLib.Table</a></li>
|
||||
<li><a href="../modules/StdLib.Time.html">StdLib.Time</a></li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
|
||||
<h1>Module <code>ExpGamingCore.Gui</code></h1>
|
||||
<p>Adds a objective version to custom guis.</p>
|
||||
<p></p>
|
||||
<h3>Info:</h3>
|
||||
<ul>
|
||||
<li><strong>License</strong>: https://github.com/explosivegaming/scenario/blob/master/LICENSE</li>
|
||||
<li><strong>Author</strong>: Cooldude2606</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h2><a href="#Functions">Functions</a></h2>
|
||||
<table class="function_list">
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#bar">bar (frame[, width=10])</a></td>
|
||||
<td class="summary">Add a white bar to any gui frame</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#set_dropdown_index">set_dropdown_index (dropdown, _item)</a></td>
|
||||
<td class="summary">Used to set the index of a drop down to a certian item</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#cam_link">cam_link (data)</a></td>
|
||||
<td class="summary">Adds a camera that updates every tick (or less depeading on how many are opening) it will move to follow an entity</td>
|
||||
</tr>
|
||||
</table>
|
||||
<h2><a href="#Tables">Tables</a></h2>
|
||||
<table class="function_list">
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#events">events</a></td>
|
||||
<td class="summary">Stores all the on_player_joined_game event handlers for the guis</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#ParametersForCamLink">ParametersForCamLink</a></td>
|
||||
<td class="summary">Prams for Gui.cam_link</td>
|
||||
</tr>
|
||||
</table>
|
||||
<h2><a href="#Fields">Fields</a></h2>
|
||||
<table class="function_list">
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#data">data</a></td>
|
||||
<td class="summary">Used to set and get data about different guis</td>
|
||||
</tr>
|
||||
</table>
|
||||
<h2><a href="#modules_expgamingcore_gui_src_server_Functions">modules.expgamingcore.gui.src.server Functions</a></h2>
|
||||
<table class="function_list">
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#_comment">_comment ()</a></td>
|
||||
<td class="summary">This file will be loaded when ExpGamingCore.Commands is present</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#__comment">__comment ()</a></td>
|
||||
<td class="summary">Adds a server thread that allows the camera follows to be toggled off and on</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br/>
|
||||
<br/>
|
||||
|
||||
|
||||
<h2 class="section-header "><a name="Functions"></a>Functions</h2>
|
||||
|
||||
<dl class="function">
|
||||
<dt>
|
||||
<a name = "bar"></a>
|
||||
<strong>bar (frame[, width=10])</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Add a white bar to any gui frame
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">frame</span>
|
||||
the frame to draw the line to
|
||||
</li>
|
||||
<li><span class="parameter">width</span>
|
||||
the width of the bar
|
||||
(<em>default</em> 10)
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
the line that was made type is progressbar
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
<h3>Usage:</h3>
|
||||
<ul>
|
||||
<pre class="example">Gui.bar(frame,<span class="number">100</span>)</pre>
|
||||
</ul>
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "set_dropdown_index"></a>
|
||||
<strong>set_dropdown_index (dropdown, _item)</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Used to set the index of a drop down to a certian item
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">dropdown</span>
|
||||
the dropdown that is to be effected
|
||||
</li>
|
||||
<li><span class="parameter">_item</span>
|
||||
this is the item to look for
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
returns the dropdown if it was successful
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
<h3>Usage:</h3>
|
||||
<ul>
|
||||
<pre class="example">Gui.set_dropdown_index(dropdown,player.name) <span class="comment">-- will select the index with the players name as the value</span></pre>
|
||||
</ul>
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "cam_link"></a>
|
||||
<strong>cam_link (data)</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Adds a camera that updates every tick (or less depeading on how many are opening) it will move to follow an entity
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">data</span>
|
||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.2/manual.html#6.5">table</a></span>
|
||||
contains all other params given below
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
the camera that the function used be it made or given as a param
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
<h3>Usage:</h3>
|
||||
<ul>
|
||||
<li><pre class="example">Gui.cam_link{entity=game.player.character,frame=frame,width=<span class="number">50</span>,hight=<span class="number">50</span>,zoom=<span class="number">1</span>}</pre></li>
|
||||
<li><pre class="example">Gui.cam_link{entity=game.player.character,cam=frame.camera,surface=game.surfaces[<span class="string">'testing'</span>]}</pre></li>
|
||||
</ul>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<h2 class="section-header "><a name="Tables"></a>Tables</h2>
|
||||
|
||||
<dl class="function">
|
||||
<dt>
|
||||
<a name = "events"></a>
|
||||
<strong>events</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Stores all the on_player_joined_game event handlers for the guis
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "ParametersForCamLink"></a>
|
||||
<strong>ParametersForCamLink</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Prams for Gui.cam_link
|
||||
|
||||
|
||||
<h3>Fields:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">entity</span>
|
||||
this is the entity that the camera will follow
|
||||
</li>
|
||||
<li><span class="parameter">cam</span>
|
||||
a camera that you already have in the gui
|
||||
</li>
|
||||
<li><span class="parameter">frame</span>
|
||||
the frame to add the camera to, no effect if cam param is given
|
||||
</li>
|
||||
<li><span class="parameter">zoom</span>
|
||||
the zoom to give the new camera
|
||||
</li>
|
||||
<li><span class="parameter">width</span>
|
||||
the width to give the new camera
|
||||
</li>
|
||||
<li><span class="parameter">height</span>
|
||||
the height to give the new camera
|
||||
</li>
|
||||
<li><span class="parameter">surface</span>
|
||||
this will over ride the surface that the camera follows on, allowing for a 'ghost surface' while keeping same position
|
||||
</li>
|
||||
<li><span class="parameter">respawn_open</span>
|
||||
if set to true then the camera will auto re link to the player after a respawn
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<h2 class="section-header "><a name="Fields"></a>Fields</h2>
|
||||
|
||||
<dl class="function">
|
||||
<dt>
|
||||
<a name = "data"></a>
|
||||
<strong>data</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Used to set and get data about different guis
|
||||
|
||||
|
||||
<ul>
|
||||
<li><span class="parameter">location</span>
|
||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.2/manual.html#6.4">string</a></span>
|
||||
the location to get/set the data, center left etc...
|
||||
</li>
|
||||
<li><span class="parameter">key</span>
|
||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.2/manual.html#6.4">string</a></span>
|
||||
the name of the gui to set the value of
|
||||
(<em>optional</em>)
|
||||
</li>
|
||||
<li><span class="parameter">value</span>
|
||||
the data that will be set can be any value but table advised
|
||||
(<em>optional</em>)
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Usage:</h3>
|
||||
<ul>
|
||||
<li><pre class="example">Gui.data[location] <span class="comment">-- returns the gui data for that gui location ex center</span></pre></li>
|
||||
<li><pre class="example">Gui.data(location,gui_name,gui_data) <span class="comment">-- adds gui data for a gui at a location</span></pre></li>
|
||||
</ul>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<h2 class="section-header "><a name="modules_expgamingcore_gui_src_server_Functions"></a>modules.expgamingcore.gui.src.server Functions</h2>
|
||||
|
||||
<dl class="function">
|
||||
<dt>
|
||||
<a name = "_comment"></a>
|
||||
<strong>_comment ()</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
This file will be loaded when ExpGamingCore.Commands is present
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "__comment"></a>
|
||||
<strong>__comment ()</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Adds a server thread that allows the camera follows to be toggled off and on
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
|
||||
</div> <!-- id="content" -->
|
||||
</div> <!-- id="main" -->
|
||||
<div id="about">
|
||||
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
|
||||
<i style="float:right;">Last updated 2018-06-07 12:58:23 </i>
|
||||
</div> <!-- id="about" -->
|
||||
</div> <!-- id="container" -->
|
||||
</body>
|
||||
</html>
|
||||
@@ -45,12 +45,13 @@
|
||||
<ul class="nowrap">
|
||||
<li><a href="../modules/FSM.html">FSM</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Commands.html">ExpGamingCore.Commands</a></li>
|
||||
<li><a href="../modules/modules.expgamingcore.gui.guiparts.center.html">modules.expgamingcore.gui.guiparts.center</a></li>
|
||||
<li><a href="../modules/modules.expgamingcore.gui.guiparts.inputs.html">modules.expgamingcore.gui.guiparts.inputs</a></li>
|
||||
<li><a href="../modules/modules.expgamingcore.gui.guiparts.left.html">modules.expgamingcore.gui.guiparts.left</a></li>
|
||||
<li><a href="../modules/modules.expgamingcore.gui.guiparts.popup.html">modules.expgamingcore.gui.guiparts.popup</a></li>
|
||||
<li><a href="../modules/modules.expgamingcore.gui.guiparts.toolbar.html">modules.expgamingcore.gui.guiparts.toolbar</a></li>
|
||||
<li><a href="../modules/modules.expgamingcore.gui.control.html">modules.expgamingcore.gui.control</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Gui.html">ExpGamingCore.Gui</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Gui.Center.html">ExpGamingCore.Gui.Center</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Gui.Inputs.html">ExpGamingCore.Gui.Inputs</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Gui.Left.html">ExpGamingCore.Gui.Left</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Gui.Popup.html">ExpGamingCore.Gui.Popup</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Gui.Test.html">ExpGamingCore.Gui.Test</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Gui.Toolbar.html">ExpGamingCore.Gui.Toolbar</a></li>
|
||||
<li><strong>ExpGamingCore.Ranking</strong></li>
|
||||
<li><a href="../modules/ExpGamingCore.Server.html">ExpGamingCore.Server</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Sync.html">ExpGamingCore.Sync</a></li>
|
||||
@@ -875,7 +876,7 @@
|
||||
</div> <!-- id="main" -->
|
||||
<div id="about">
|
||||
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
|
||||
<i style="float:right;">Last updated 2018-06-05 19:31:42 </i>
|
||||
<i style="float:right;">Last updated 2018-06-07 12:58:23 </i>
|
||||
</div> <!-- id="about" -->
|
||||
</div> <!-- id="container" -->
|
||||
</body>
|
||||
|
||||
@@ -44,12 +44,13 @@
|
||||
<ul class="nowrap">
|
||||
<li><a href="../modules/FSM.html">FSM</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Commands.html">ExpGamingCore.Commands</a></li>
|
||||
<li><a href="../modules/modules.expgamingcore.gui.guiparts.center.html">modules.expgamingcore.gui.guiparts.center</a></li>
|
||||
<li><a href="../modules/modules.expgamingcore.gui.guiparts.inputs.html">modules.expgamingcore.gui.guiparts.inputs</a></li>
|
||||
<li><a href="../modules/modules.expgamingcore.gui.guiparts.left.html">modules.expgamingcore.gui.guiparts.left</a></li>
|
||||
<li><a href="../modules/modules.expgamingcore.gui.guiparts.popup.html">modules.expgamingcore.gui.guiparts.popup</a></li>
|
||||
<li><a href="../modules/modules.expgamingcore.gui.guiparts.toolbar.html">modules.expgamingcore.gui.guiparts.toolbar</a></li>
|
||||
<li><a href="../modules/modules.expgamingcore.gui.control.html">modules.expgamingcore.gui.control</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Gui.html">ExpGamingCore.Gui</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Gui.Center.html">ExpGamingCore.Gui.Center</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Gui.Inputs.html">ExpGamingCore.Gui.Inputs</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Gui.Left.html">ExpGamingCore.Gui.Left</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Gui.Popup.html">ExpGamingCore.Gui.Popup</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Gui.Test.html">ExpGamingCore.Gui.Test</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Gui.Toolbar.html">ExpGamingCore.Gui.Toolbar</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Ranking.html">ExpGamingCore.Ranking</a></li>
|
||||
<li><strong>ExpGamingCore.Server</strong></li>
|
||||
<li><a href="../modules/ExpGamingCore.Sync.html">ExpGamingCore.Sync</a></li>
|
||||
@@ -840,7 +841,7 @@
|
||||
</div> <!-- id="main" -->
|
||||
<div id="about">
|
||||
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
|
||||
<i style="float:right;">Last updated 2018-06-05 19:31:42 </i>
|
||||
<i style="float:right;">Last updated 2018-06-07 12:58:23 </i>
|
||||
</div> <!-- id="about" -->
|
||||
</div> <!-- id="container" -->
|
||||
</body>
|
||||
|
||||
@@ -44,12 +44,13 @@
|
||||
<ul class="nowrap">
|
||||
<li><a href="../modules/FSM.html">FSM</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Commands.html">ExpGamingCore.Commands</a></li>
|
||||
<li><a href="../modules/modules.expgamingcore.gui.guiparts.center.html">modules.expgamingcore.gui.guiparts.center</a></li>
|
||||
<li><a href="../modules/modules.expgamingcore.gui.guiparts.inputs.html">modules.expgamingcore.gui.guiparts.inputs</a></li>
|
||||
<li><a href="../modules/modules.expgamingcore.gui.guiparts.left.html">modules.expgamingcore.gui.guiparts.left</a></li>
|
||||
<li><a href="../modules/modules.expgamingcore.gui.guiparts.popup.html">modules.expgamingcore.gui.guiparts.popup</a></li>
|
||||
<li><a href="../modules/modules.expgamingcore.gui.guiparts.toolbar.html">modules.expgamingcore.gui.guiparts.toolbar</a></li>
|
||||
<li><a href="../modules/modules.expgamingcore.gui.control.html">modules.expgamingcore.gui.control</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Gui.html">ExpGamingCore.Gui</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Gui.Center.html">ExpGamingCore.Gui.Center</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Gui.Inputs.html">ExpGamingCore.Gui.Inputs</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Gui.Left.html">ExpGamingCore.Gui.Left</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Gui.Popup.html">ExpGamingCore.Gui.Popup</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Gui.Test.html">ExpGamingCore.Gui.Test</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Gui.Toolbar.html">ExpGamingCore.Gui.Toolbar</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Ranking.html">ExpGamingCore.Ranking</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Server.html">ExpGamingCore.Server</a></li>
|
||||
<li><strong>ExpGamingCore.Sync</strong></li>
|
||||
@@ -812,7 +813,7 @@
|
||||
</div> <!-- id="main" -->
|
||||
<div id="about">
|
||||
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
|
||||
<i style="float:right;">Last updated 2018-06-05 19:31:42 </i>
|
||||
<i style="float:right;">Last updated 2018-06-07 12:58:23 </i>
|
||||
</div> <!-- id="about" -->
|
||||
</div> <!-- id="container" -->
|
||||
</body>
|
||||
|
||||
@@ -33,6 +33,7 @@
|
||||
<h2>Contents</h2>
|
||||
<ul>
|
||||
<li><a href="#Functions">Functions</a></li>
|
||||
<li><a href="#Class_table">Class table </a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
@@ -40,12 +41,13 @@
|
||||
<ul class="nowrap">
|
||||
<li><a href="../modules/FSM.html">FSM</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Commands.html">ExpGamingCore.Commands</a></li>
|
||||
<li><a href="../modules/modules.expgamingcore.gui.guiparts.center.html">modules.expgamingcore.gui.guiparts.center</a></li>
|
||||
<li><a href="../modules/modules.expgamingcore.gui.guiparts.inputs.html">modules.expgamingcore.gui.guiparts.inputs</a></li>
|
||||
<li><a href="../modules/modules.expgamingcore.gui.guiparts.left.html">modules.expgamingcore.gui.guiparts.left</a></li>
|
||||
<li><a href="../modules/modules.expgamingcore.gui.guiparts.popup.html">modules.expgamingcore.gui.guiparts.popup</a></li>
|
||||
<li><a href="../modules/modules.expgamingcore.gui.guiparts.toolbar.html">modules.expgamingcore.gui.guiparts.toolbar</a></li>
|
||||
<li><a href="../modules/modules.expgamingcore.gui.control.html">modules.expgamingcore.gui.control</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Gui.html">ExpGamingCore.Gui</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Gui.Center.html">ExpGamingCore.Gui.Center</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Gui.Inputs.html">ExpGamingCore.Gui.Inputs</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Gui.Left.html">ExpGamingCore.Gui.Left</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Gui.Popup.html">ExpGamingCore.Gui.Popup</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Gui.Test.html">ExpGamingCore.Gui.Test</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Gui.Toolbar.html">ExpGamingCore.Gui.Toolbar</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Ranking.html">ExpGamingCore.Ranking</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Server.html">ExpGamingCore.Server</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Sync.html">ExpGamingCore.Sync</a></li>
|
||||
@@ -110,6 +112,37 @@
|
||||
<td class="summary">Used as a way to view the structure of a gui, used for debuging</td>
|
||||
</tr>
|
||||
</table>
|
||||
<h2><a href="#Class_table">Class table </a></h2>
|
||||
<table class="function_list">
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#table.val_to_str">table.val_to_str (v)</a></td>
|
||||
<td class="summary">Returns a value in a form able to be read as a value, any value to string</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#table.key_to_str">table.key_to_str (k)</a></td>
|
||||
<td class="summary">Returns a value in a form able to be read as a key, any key to string</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#table.tostring">table.tostring (tbl)</a></td>
|
||||
<td class="summary">Returns a table in a form able to be read as a table</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#table.json">table.json (lua_table)</a></td>
|
||||
<td class="summary">Simmilar to table.tostring but converts a lua table to a json one</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#table.autokey">table.autokey (tbl, str)</a></td>
|
||||
<td class="summary">Returns the closest match to a key</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#table.alphanumsort">table.alphanumsort (tbl)</a></td>
|
||||
<td class="summary">Returns the list is a sorted way that would be expected by people (this is by key)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#table.keysort">table.keysort (tbl)</a></td>
|
||||
<td class="summary">Returns the list is a sorted way that would be expected by people (this is by key) (faster alterative than above)</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br/>
|
||||
<br/>
|
||||
@@ -129,7 +162,7 @@
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">tbl</span>
|
||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.2/manual.html#6.5">table</a></span>
|
||||
<span class="types"><a class="type" href="../modules/ExpGamingLib.html#table">table</a></span>
|
||||
table to be unpacked
|
||||
</li>
|
||||
</ul>
|
||||
@@ -155,7 +188,7 @@
|
||||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.2/manual.html#6.5">table</a></span>
|
||||
<span class="types"><a class="type" href="../modules/ExpGamingLib.html#table">table</a></span>
|
||||
the env table with _G keys removed
|
||||
</ol>
|
||||
|
||||
@@ -178,7 +211,7 @@
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">tbl</span>
|
||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.2/manual.html#6.5">table</a></span>
|
||||
<span class="types"><a class="type" href="../modules/ExpGamingLib.html#table">table</a></span>
|
||||
the table that will have its metatable set
|
||||
</li>
|
||||
<li><span class="parameter">callback</span>
|
||||
@@ -196,7 +229,7 @@
|
||||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.2/manual.html#6.5">table</a></span>
|
||||
<span class="types"><a class="type" href="../modules/ExpGamingLib.html#table">table</a></span>
|
||||
the new table with its metatable set
|
||||
</ol>
|
||||
|
||||
@@ -393,7 +426,7 @@
|
||||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.2/manual.html#6.5">table</a></span>
|
||||
<span class="types"><a class="type" href="../modules/ExpGamingLib.html#table">table</a></span>
|
||||
the table that describes the gui
|
||||
</ol>
|
||||
|
||||
@@ -404,6 +437,226 @@
|
||||
<pre class="example">Gui_tree(root) returns all children of gui recusivly</pre>
|
||||
</ul>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<h2 class="section-header has-description"><a name="Class_table"></a>Class table </h2>
|
||||
|
||||
<div class="section-description">
|
||||
Extents the table class
|
||||
</div>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
<a name = "table.val_to_str"></a>
|
||||
<strong>table.val_to_str (v)</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Returns a value in a form able to be read as a value, any value to string
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">v</span>
|
||||
value to convert
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.2/manual.html#6.4">string</a></span>
|
||||
the converted value
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
<h3>Usage:</h3>
|
||||
<ul>
|
||||
<pre class="example"><span class="global">table</span>.val_to_str{a=<span class="string">'foo'</span>} <span class="comment">-- return '"foo"'</span></pre>
|
||||
</ul>
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "table.key_to_str"></a>
|
||||
<strong>table.key_to_str (k)</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Returns a value in a form able to be read as a key, any key to string
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">k</span>
|
||||
key to convert
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.2/manual.html#6.4">string</a></span>
|
||||
the converted key
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
<h3>Usage:</h3>
|
||||
<ul>
|
||||
<pre class="example"><span class="global">table</span>.val_to_str{a=<span class="string">'foo'</span>} <span class="comment">-- return '["a"]'</span></pre>
|
||||
</ul>
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "table.tostring"></a>
|
||||
<strong>table.tostring (tbl)</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Returns a table in a form able to be read as a table
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">tbl</span>
|
||||
<span class="types"><a class="type" href="../modules/ExpGamingLib.html#table">table</a></span>
|
||||
table to convert
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.2/manual.html#6.4">string</a></span>
|
||||
the converted table
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
<h3>Usage:</h3>
|
||||
<ul>
|
||||
<pre class="example"><span class="global">table</span>.<span class="global">tostring</span>{k1=<span class="string">'foo'</span>,k2=<span class="string">'bar'</span>} <span class="comment">-- return '{["k1"]="foo",["k2"]="bar"}'</span></pre>
|
||||
</ul>
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "table.json"></a>
|
||||
<strong>table.json (lua_table)</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Simmilar to table.tostring but converts a lua table to a json one
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">lua_table</span>
|
||||
<span class="types"><a class="type" href="../modules/ExpGamingLib.html#table">table</a></span>
|
||||
the table to convert
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.2/manual.html#6.4">string</a></span>
|
||||
the table in a json format
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
<h3>Usage:</h3>
|
||||
<ul>
|
||||
<pre class="example">talbe.json{k1=<span class="string">'foo'</span>,k2=<span class="string">'bar'</span>} <span class="comment">-- return '{"k1":"foo","k2":"bar"}'</span></pre>
|
||||
</ul>
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "table.autokey"></a>
|
||||
<strong>table.autokey (tbl, str)</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Returns the closest match to a key
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">tbl</span>
|
||||
<span class="types"><a class="type" href="../modules/ExpGamingLib.html#table">table</a></span>
|
||||
the table that will be searched
|
||||
</li>
|
||||
<li><span class="parameter">str</span>
|
||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.2/manual.html#6.4">string</a></span>
|
||||
the string that will be looked for in the keys
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Usage:</h3>
|
||||
<ul>
|
||||
<pre class="example"><span class="global">table</span>.autokey({foo=<span class="number">1</span>,bar=<span class="number">2</span>},<span class="string">'f'</span>) <span class="comment">-- return 1</span></pre>
|
||||
</ul>
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "table.alphanumsort"></a>
|
||||
<strong>table.alphanumsort (tbl)</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Returns the list is a sorted way that would be expected by people (this is by key)
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">tbl</span>
|
||||
<span class="types"><a class="type" href="../modules/ExpGamingLib.html#table">table</a></span>
|
||||
the table to be sorted
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
<span class="types"><a class="type" href="../modules/ExpGamingLib.html#table">table</a></span>
|
||||
the sorted table
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
<h3>Usage:</h3>
|
||||
<ul>
|
||||
<pre class="example">tbl = <span class="global">table</span>.alphanumsort(tbl)</pre>
|
||||
</ul>
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "table.keysort"></a>
|
||||
<strong>table.keysort (tbl)</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Returns the list is a sorted way that would be expected by people (this is by key) (faster alterative than above)
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">tbl</span>
|
||||
<span class="types"><a class="type" href="../modules/ExpGamingLib.html#table">table</a></span>
|
||||
the table to be sorted
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
<span class="types"><a class="type" href="../modules/ExpGamingLib.html#table">table</a></span>
|
||||
the sorted table
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
<h3>Usage:</h3>
|
||||
<ul>
|
||||
<pre class="example">tbl = <span class="global">table</span>.alphanumsort(tbl)</pre>
|
||||
</ul>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
@@ -412,7 +665,7 @@
|
||||
</div> <!-- id="main" -->
|
||||
<div id="about">
|
||||
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
|
||||
<i style="float:right;">Last updated 2018-06-05 19:31:42 </i>
|
||||
<i style="float:right;">Last updated 2018-06-07 12:58:23 </i>
|
||||
</div> <!-- id="about" -->
|
||||
</div> <!-- id="container" -->
|
||||
</body>
|
||||
|
||||
@@ -42,12 +42,13 @@
|
||||
<ul class="nowrap">
|
||||
<li><strong>FSM</strong></li>
|
||||
<li><a href="../modules/ExpGamingCore.Commands.html">ExpGamingCore.Commands</a></li>
|
||||
<li><a href="../modules/modules.expgamingcore.gui.guiparts.center.html">modules.expgamingcore.gui.guiparts.center</a></li>
|
||||
<li><a href="../modules/modules.expgamingcore.gui.guiparts.inputs.html">modules.expgamingcore.gui.guiparts.inputs</a></li>
|
||||
<li><a href="../modules/modules.expgamingcore.gui.guiparts.left.html">modules.expgamingcore.gui.guiparts.left</a></li>
|
||||
<li><a href="../modules/modules.expgamingcore.gui.guiparts.popup.html">modules.expgamingcore.gui.guiparts.popup</a></li>
|
||||
<li><a href="../modules/modules.expgamingcore.gui.guiparts.toolbar.html">modules.expgamingcore.gui.guiparts.toolbar</a></li>
|
||||
<li><a href="../modules/modules.expgamingcore.gui.control.html">modules.expgamingcore.gui.control</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Gui.html">ExpGamingCore.Gui</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Gui.Center.html">ExpGamingCore.Gui.Center</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Gui.Inputs.html">ExpGamingCore.Gui.Inputs</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Gui.Left.html">ExpGamingCore.Gui.Left</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Gui.Popup.html">ExpGamingCore.Gui.Popup</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Gui.Test.html">ExpGamingCore.Gui.Test</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Gui.Toolbar.html">ExpGamingCore.Gui.Toolbar</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Ranking.html">ExpGamingCore.Ranking</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Server.html">ExpGamingCore.Server</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Sync.html">ExpGamingCore.Sync</a></li>
|
||||
@@ -447,7 +448,7 @@
|
||||
</div> <!-- id="main" -->
|
||||
<div id="about">
|
||||
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
|
||||
<i style="float:right;">Last updated 2018-06-05 19:31:42 </i>
|
||||
<i style="float:right;">Last updated 2018-06-07 12:58:23 </i>
|
||||
</div> <!-- id="about" -->
|
||||
</div> <!-- id="container" -->
|
||||
</body>
|
||||
|
||||
@@ -41,12 +41,13 @@
|
||||
<ul class="nowrap">
|
||||
<li><a href="../modules/FSM.html">FSM</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Commands.html">ExpGamingCore.Commands</a></li>
|
||||
<li><a href="../modules/modules.expgamingcore.gui.guiparts.center.html">modules.expgamingcore.gui.guiparts.center</a></li>
|
||||
<li><a href="../modules/modules.expgamingcore.gui.guiparts.inputs.html">modules.expgamingcore.gui.guiparts.inputs</a></li>
|
||||
<li><a href="../modules/modules.expgamingcore.gui.guiparts.left.html">modules.expgamingcore.gui.guiparts.left</a></li>
|
||||
<li><a href="../modules/modules.expgamingcore.gui.guiparts.popup.html">modules.expgamingcore.gui.guiparts.popup</a></li>
|
||||
<li><a href="../modules/modules.expgamingcore.gui.guiparts.toolbar.html">modules.expgamingcore.gui.guiparts.toolbar</a></li>
|
||||
<li><a href="../modules/modules.expgamingcore.gui.control.html">modules.expgamingcore.gui.control</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Gui.html">ExpGamingCore.Gui</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Gui.Center.html">ExpGamingCore.Gui.Center</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Gui.Inputs.html">ExpGamingCore.Gui.Inputs</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Gui.Left.html">ExpGamingCore.Gui.Left</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Gui.Popup.html">ExpGamingCore.Gui.Popup</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Gui.Test.html">ExpGamingCore.Gui.Test</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Gui.Toolbar.html">ExpGamingCore.Gui.Toolbar</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Ranking.html">ExpGamingCore.Ranking</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Server.html">ExpGamingCore.Server</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Sync.html">ExpGamingCore.Sync</a></li>
|
||||
@@ -553,7 +554,7 @@
|
||||
</div> <!-- id="main" -->
|
||||
<div id="about">
|
||||
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
|
||||
<i style="float:right;">Last updated 2018-06-05 19:31:42 </i>
|
||||
<i style="float:right;">Last updated 2018-06-07 12:58:23 </i>
|
||||
</div> <!-- id="about" -->
|
||||
</div> <!-- id="container" -->
|
||||
</body>
|
||||
|
||||
@@ -40,12 +40,13 @@
|
||||
<ul class="nowrap">
|
||||
<li><a href="../modules/FSM.html">FSM</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Commands.html">ExpGamingCore.Commands</a></li>
|
||||
<li><a href="../modules/modules.expgamingcore.gui.guiparts.center.html">modules.expgamingcore.gui.guiparts.center</a></li>
|
||||
<li><a href="../modules/modules.expgamingcore.gui.guiparts.inputs.html">modules.expgamingcore.gui.guiparts.inputs</a></li>
|
||||
<li><a href="../modules/modules.expgamingcore.gui.guiparts.left.html">modules.expgamingcore.gui.guiparts.left</a></li>
|
||||
<li><a href="../modules/modules.expgamingcore.gui.guiparts.popup.html">modules.expgamingcore.gui.guiparts.popup</a></li>
|
||||
<li><a href="../modules/modules.expgamingcore.gui.guiparts.toolbar.html">modules.expgamingcore.gui.guiparts.toolbar</a></li>
|
||||
<li><a href="../modules/modules.expgamingcore.gui.control.html">modules.expgamingcore.gui.control</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Gui.html">ExpGamingCore.Gui</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Gui.Center.html">ExpGamingCore.Gui.Center</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Gui.Inputs.html">ExpGamingCore.Gui.Inputs</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Gui.Left.html">ExpGamingCore.Gui.Left</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Gui.Popup.html">ExpGamingCore.Gui.Popup</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Gui.Test.html">ExpGamingCore.Gui.Test</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Gui.Toolbar.html">ExpGamingCore.Gui.Toolbar</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Ranking.html">ExpGamingCore.Ranking</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Server.html">ExpGamingCore.Server</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Sync.html">ExpGamingCore.Sync</a></li>
|
||||
@@ -214,7 +215,7 @@
|
||||
</div> <!-- id="main" -->
|
||||
<div id="about">
|
||||
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
|
||||
<i style="float:right;">Last updated 2018-06-05 19:31:42 </i>
|
||||
<i style="float:right;">Last updated 2018-06-07 12:58:23 </i>
|
||||
</div> <!-- id="about" -->
|
||||
</div> <!-- id="container" -->
|
||||
</body>
|
||||
|
||||
@@ -40,12 +40,13 @@
|
||||
<ul class="nowrap">
|
||||
<li><a href="../modules/FSM.html">FSM</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Commands.html">ExpGamingCore.Commands</a></li>
|
||||
<li><a href="../modules/modules.expgamingcore.gui.guiparts.center.html">modules.expgamingcore.gui.guiparts.center</a></li>
|
||||
<li><a href="../modules/modules.expgamingcore.gui.guiparts.inputs.html">modules.expgamingcore.gui.guiparts.inputs</a></li>
|
||||
<li><a href="../modules/modules.expgamingcore.gui.guiparts.left.html">modules.expgamingcore.gui.guiparts.left</a></li>
|
||||
<li><a href="../modules/modules.expgamingcore.gui.guiparts.popup.html">modules.expgamingcore.gui.guiparts.popup</a></li>
|
||||
<li><a href="../modules/modules.expgamingcore.gui.guiparts.toolbar.html">modules.expgamingcore.gui.guiparts.toolbar</a></li>
|
||||
<li><a href="../modules/modules.expgamingcore.gui.control.html">modules.expgamingcore.gui.control</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Gui.html">ExpGamingCore.Gui</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Gui.Center.html">ExpGamingCore.Gui.Center</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Gui.Inputs.html">ExpGamingCore.Gui.Inputs</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Gui.Left.html">ExpGamingCore.Gui.Left</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Gui.Popup.html">ExpGamingCore.Gui.Popup</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Gui.Test.html">ExpGamingCore.Gui.Test</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Gui.Toolbar.html">ExpGamingCore.Gui.Toolbar</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Ranking.html">ExpGamingCore.Ranking</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Server.html">ExpGamingCore.Server</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Sync.html">ExpGamingCore.Sync</a></li>
|
||||
@@ -294,7 +295,7 @@
|
||||
</div> <!-- id="main" -->
|
||||
<div id="about">
|
||||
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
|
||||
<i style="float:right;">Last updated 2018-06-05 19:31:42 </i>
|
||||
<i style="float:right;">Last updated 2018-06-07 12:58:23 </i>
|
||||
</div> <!-- id="about" -->
|
||||
</div> <!-- id="container" -->
|
||||
</body>
|
||||
|
||||
@@ -40,12 +40,13 @@
|
||||
<ul class="nowrap">
|
||||
<li><a href="../modules/FSM.html">FSM</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Commands.html">ExpGamingCore.Commands</a></li>
|
||||
<li><a href="../modules/modules.expgamingcore.gui.guiparts.center.html">modules.expgamingcore.gui.guiparts.center</a></li>
|
||||
<li><a href="../modules/modules.expgamingcore.gui.guiparts.inputs.html">modules.expgamingcore.gui.guiparts.inputs</a></li>
|
||||
<li><a href="../modules/modules.expgamingcore.gui.guiparts.left.html">modules.expgamingcore.gui.guiparts.left</a></li>
|
||||
<li><a href="../modules/modules.expgamingcore.gui.guiparts.popup.html">modules.expgamingcore.gui.guiparts.popup</a></li>
|
||||
<li><a href="../modules/modules.expgamingcore.gui.guiparts.toolbar.html">modules.expgamingcore.gui.guiparts.toolbar</a></li>
|
||||
<li><a href="../modules/modules.expgamingcore.gui.control.html">modules.expgamingcore.gui.control</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Gui.html">ExpGamingCore.Gui</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Gui.Center.html">ExpGamingCore.Gui.Center</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Gui.Inputs.html">ExpGamingCore.Gui.Inputs</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Gui.Left.html">ExpGamingCore.Gui.Left</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Gui.Popup.html">ExpGamingCore.Gui.Popup</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Gui.Test.html">ExpGamingCore.Gui.Test</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Gui.Toolbar.html">ExpGamingCore.Gui.Toolbar</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Ranking.html">ExpGamingCore.Ranking</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Server.html">ExpGamingCore.Server</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Sync.html">ExpGamingCore.Sync</a></li>
|
||||
@@ -158,30 +159,6 @@
|
||||
<td class="name" nowrap><a href="#arr_to_bool">arr_to_bool (tbl)</a></td>
|
||||
<td class="summary">For all string or number values in an array map them to a key = true table</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#key_to_str">key_to_str (k)</a></td>
|
||||
<td class="summary">Returns a value in a form able to be read as a key</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#tostring">tostring (tbl)</a></td>
|
||||
<td class="summary">Returns a table in a form able to be read as a table</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#json">json (lua_table)</a></td>
|
||||
<td class="summary">Simmilar to table.tostring but converts a lua table to a json one</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#autokey">autokey (tbl, str)</a></td>
|
||||
<td class="summary">Returns the closest match to a key</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#alphanumsort">alphanumsort (tbl)</a></td>
|
||||
<td class="summary">Returns the list is a sorted way that would be expected by people (this is by key)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#keysort">keysort (tbl)</a></td>
|
||||
<td class="summary">Returns the list is a sorted way that would be expected by people (this is by key) (faster alterative than above)</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br/>
|
||||
@@ -930,191 +907,6 @@ some_func(<span class="number">1</span>,<span class="number">2</span>) <span cla
|
||||
<span class="global">table</span>.array_to_dict_bool(a) <span class="comment">-- return {["v1"] = true, ["v2"]= true}</span></pre>
|
||||
</ul>
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "key_to_str"></a>
|
||||
<strong>key_to_str (k)</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Returns a value in a form able to be read as a key
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">k</span>
|
||||
key to convert
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.2/manual.html#6.4">string</a></span>
|
||||
the converted key
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
<h3>Usage:</h3>
|
||||
<ul>
|
||||
<pre class="example"><span class="keyword">local</span> a = <span class="string">'key'</span>
|
||||
<span class="global">table</span>.key_to_str(a) <span class="comment">-- return '["key"]'</span></pre>
|
||||
</ul>
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "tostring"></a>
|
||||
<strong>tostring (tbl)</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Returns a table in a form able to be read as a table
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">tbl</span>
|
||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.2/manual.html#6.5">table</a></span>
|
||||
table to convert
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.2/manual.html#6.4">string</a></span>
|
||||
the converted table
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
<h3>Usage:</h3>
|
||||
<ul>
|
||||
<pre class="example"><span class="keyword">local</span> a = {k1=<span class="string">'foo'</span>,k2=<span class="string">'bar'</span>}
|
||||
<span class="global">table</span>.<span class="global">tostring</span>(a) <span class="comment">-- return '{["k1"]="foo",["k2"]="bar"}'</span></pre>
|
||||
</ul>
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "json"></a>
|
||||
<strong>json (lua_table)</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Simmilar to table.tostring but converts a lua table to a json one
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">lua_table</span>
|
||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.2/manual.html#6.5">table</a></span>
|
||||
the table to convert
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.2/manual.html#6.4">string</a></span>
|
||||
the table in a json format
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
<h3>Usage:</h3>
|
||||
<ul>
|
||||
<pre class="example"><span class="keyword">local</span> a = {k1=<span class="string">'foo'</span>,k2=<span class="string">'bar'</span>}
|
||||
talbe.json(a) <span class="comment">-- return '{"k1":"foo","k2":"bar"}'</span></pre>
|
||||
</ul>
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "autokey"></a>
|
||||
<strong>autokey (tbl, str)</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Returns the closest match to a key
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">tbl</span>
|
||||
|
||||
</li>
|
||||
<li><span class="parameter">str</span>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Usage:</h3>
|
||||
<ul>
|
||||
<pre class="example">tbl = {foo=<span class="number">1</span>,bar=<span class="number">2</span>}
|
||||
<span class="global">table</span>.autokey(tbl,<span class="string">'f'</span>) <span class="comment">-- return 1</span></pre>
|
||||
</ul>
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "alphanumsort"></a>
|
||||
<strong>alphanumsort (tbl)</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Returns the list is a sorted way that would be expected by people (this is by key)
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">tbl</span>
|
||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.2/manual.html#6.5">table</a></span>
|
||||
the table to be sorted
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.2/manual.html#6.5">table</a></span>
|
||||
the sorted table
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
<h3>Usage:</h3>
|
||||
<ul>
|
||||
<pre class="example">tbl = <span class="global">table</span>.alphanumsort(tbl)</pre>
|
||||
</ul>
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "keysort"></a>
|
||||
<strong>keysort (tbl)</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Returns the list is a sorted way that would be expected by people (this is by key) (faster alterative than above)
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">tbl</span>
|
||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.2/manual.html#6.5">table</a></span>
|
||||
the table to be sorted
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.2/manual.html#6.5">table</a></span>
|
||||
the sorted table
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
<h3>Usage:</h3>
|
||||
<ul>
|
||||
<pre class="example">tbl = <span class="global">table</span>.alphanumsort(tbl)</pre>
|
||||
</ul>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
@@ -1123,7 +915,7 @@ some_func(<span class="number">1</span>,<span class="number">2</span>) <span cla
|
||||
</div> <!-- id="main" -->
|
||||
<div id="about">
|
||||
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
|
||||
<i style="float:right;">Last updated 2018-06-05 19:31:42 </i>
|
||||
<i style="float:right;">Last updated 2018-06-07 12:58:23 </i>
|
||||
</div> <!-- id="about" -->
|
||||
</div> <!-- id="container" -->
|
||||
</body>
|
||||
|
||||
@@ -40,12 +40,13 @@
|
||||
<ul class="nowrap">
|
||||
<li><a href="../modules/FSM.html">FSM</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Commands.html">ExpGamingCore.Commands</a></li>
|
||||
<li><a href="../modules/modules.expgamingcore.gui.guiparts.center.html">modules.expgamingcore.gui.guiparts.center</a></li>
|
||||
<li><a href="../modules/modules.expgamingcore.gui.guiparts.inputs.html">modules.expgamingcore.gui.guiparts.inputs</a></li>
|
||||
<li><a href="../modules/modules.expgamingcore.gui.guiparts.left.html">modules.expgamingcore.gui.guiparts.left</a></li>
|
||||
<li><a href="../modules/modules.expgamingcore.gui.guiparts.popup.html">modules.expgamingcore.gui.guiparts.popup</a></li>
|
||||
<li><a href="../modules/modules.expgamingcore.gui.guiparts.toolbar.html">modules.expgamingcore.gui.guiparts.toolbar</a></li>
|
||||
<li><a href="../modules/modules.expgamingcore.gui.control.html">modules.expgamingcore.gui.control</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Gui.html">ExpGamingCore.Gui</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Gui.Center.html">ExpGamingCore.Gui.Center</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Gui.Inputs.html">ExpGamingCore.Gui.Inputs</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Gui.Left.html">ExpGamingCore.Gui.Left</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Gui.Popup.html">ExpGamingCore.Gui.Popup</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Gui.Test.html">ExpGamingCore.Gui.Test</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Gui.Toolbar.html">ExpGamingCore.Gui.Toolbar</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Ranking.html">ExpGamingCore.Ranking</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Server.html">ExpGamingCore.Server</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Sync.html">ExpGamingCore.Sync</a></li>
|
||||
@@ -131,7 +132,7 @@
|
||||
</div> <!-- id="main" -->
|
||||
<div id="about">
|
||||
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
|
||||
<i style="float:right;">Last updated 2018-06-05 19:31:42 </i>
|
||||
<i style="float:right;">Last updated 2018-06-07 12:58:23 </i>
|
||||
</div> <!-- id="about" -->
|
||||
</div> <!-- id="container" -->
|
||||
</body>
|
||||
|
||||
@@ -1,167 +0,0 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
||||
<head>
|
||||
<title>Reference</title>
|
||||
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div id="container">
|
||||
|
||||
<div id="product">
|
||||
<div id="product_logo"></div>
|
||||
<div id="product_name"><big><b></b></big></div>
|
||||
<div id="product_description"></div>
|
||||
</div> <!-- id="product" -->
|
||||
|
||||
|
||||
<div id="main">
|
||||
|
||||
|
||||
<!-- Menu -->
|
||||
|
||||
<div id="navigation">
|
||||
<br/>
|
||||
<h1>ldoc</h1>
|
||||
|
||||
<ul>
|
||||
<li><a href="../index.html">Index</a></li>
|
||||
</ul>
|
||||
|
||||
<h2>Contents</h2>
|
||||
<ul>
|
||||
<li><a href="#Functions">Functions</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h2>Modules</h2>
|
||||
<ul class="nowrap">
|
||||
<li><a href="../modules/FSM.html">FSM</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Commands.html">ExpGamingCore.Commands</a></li>
|
||||
<li><a href="../modules/modules.expgamingcore.gui.guiparts.center.html">modules.expgamingcore.gui.guiparts.center</a></li>
|
||||
<li><a href="../modules/modules.expgamingcore.gui.guiparts.inputs.html">modules.expgamingcore.gui.guiparts.inputs</a></li>
|
||||
<li><a href="../modules/modules.expgamingcore.gui.guiparts.left.html">modules.expgamingcore.gui.guiparts.left</a></li>
|
||||
<li><a href="../modules/modules.expgamingcore.gui.guiparts.popup.html">modules.expgamingcore.gui.guiparts.popup</a></li>
|
||||
<li><a href="../modules/modules.expgamingcore.gui.guiparts.toolbar.html">modules.expgamingcore.gui.guiparts.toolbar</a></li>
|
||||
<li><strong>modules.expgamingcore.gui.control</strong></li>
|
||||
<li><a href="../modules/ExpGamingCore.Ranking.html">ExpGamingCore.Ranking</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Server.html">ExpGamingCore.Server</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Sync.html">ExpGamingCore.Sync</a></li>
|
||||
<li><a href="../modules/ExpGamingLib.html">ExpGamingLib</a></li>
|
||||
<li><a href="../modules/StdLib.Color.html">StdLib.Color</a></li>
|
||||
<li><a href="../modules/StdLib.Game.html">StdLib.Game</a></li>
|
||||
<li><a href="../modules/StdLib.String.html">StdLib.String</a></li>
|
||||
<li><a href="../modules/StdLib.Table.html">StdLib.Table</a></li>
|
||||
<li><a href="../modules/StdLib.Time.html">StdLib.Time</a></li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
|
||||
<h1>Module <code>modules.expgamingcore.gui.control</code></h1>
|
||||
<p>Add a white bar to any gui frame</p>
|
||||
<p></p>
|
||||
<h3>Usage:</h3>
|
||||
<ul>
|
||||
<pre class="example">Gui.bar(frame,100)
|
||||
</pre>
|
||||
</ul>
|
||||
|
||||
|
||||
<h2><a href="#Functions">Functions</a></h2>
|
||||
<table class="function_list">
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#Gui.set_dropdown_index">Gui.set_dropdown_index (dropdown, _item)</a></td>
|
||||
<td class="summary">Used to set the index of a drop down to a certian item</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#Gui.cam_link">Gui.cam_link (data)</a></td>
|
||||
<td class="summary">Adds a camera that updates every tick (or less depeading on how many are opening) it will move to follow an entity</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br/>
|
||||
<br/>
|
||||
|
||||
|
||||
<h2 class="section-header "><a name="Functions"></a>Functions</h2>
|
||||
|
||||
<dl class="function">
|
||||
<dt>
|
||||
<a name = "Gui.set_dropdown_index"></a>
|
||||
<strong>Gui.set_dropdown_index (dropdown, _item)</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Used to set the index of a drop down to a certian item
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">dropdown</span>
|
||||
the dropdown that is to be effected
|
||||
</li>
|
||||
<li><span class="parameter">_item</span>
|
||||
this is the item to look for
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
returns the dropdown if it was successful
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
<h3>Usage:</h3>
|
||||
<ul>
|
||||
<pre class="example">Gui.set_dropdown_index(dropdown,player.name)</pre>
|
||||
</ul>
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "Gui.cam_link"></a>
|
||||
<strong>Gui.cam_link (data)</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Adds a camera that updates every tick (or less depeading on how many are opening) it will move to follow an entity
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">data</span>
|
||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.2/manual.html#6.5">table</a></span>
|
||||
contains all other params given below
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
the camera that the function used be it made or given as a param
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
<h3>Usage:</h3>
|
||||
<ul>
|
||||
<li><pre class="example">Gui.cam_link{entity=game.player.character,frame=frame,width=<span class="number">50</span>,hight=<span class="number">50</span>,zoom=<span class="number">1</span>}</pre></li>
|
||||
<li><pre class="example">Gui.cam_link{entity=game.player.character,cam=frame.camera,surface=game.surfaces[<span class="string">'testing'</span>]}</pre></li>
|
||||
</ul>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
|
||||
</div> <!-- id="content" -->
|
||||
</div> <!-- id="main" -->
|
||||
<div id="about">
|
||||
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
|
||||
<i style="float:right;">Last updated 2018-06-05 19:31:42 </i>
|
||||
</div> <!-- id="about" -->
|
||||
</div> <!-- id="container" -->
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,36 +1,46 @@
|
||||
--[[
|
||||
Explosive Gaming
|
||||
|
||||
This file can be used with permission but this and the credit below must remain in the file.
|
||||
Contact a member of management on our discord to seek permission to use our code.
|
||||
Any changes that you may make to the code are yours but that does not make the script yours.
|
||||
Discord: https://discord.gg/r6dC2uK
|
||||
]]
|
||||
--- Adds a objective version to custom guis.
|
||||
-- @module ExpGamingCore.Gui
|
||||
-- @alias Gui
|
||||
-- @author Cooldude2606
|
||||
-- @license https://github.com/explosivegaming/scenario/blob/master/LICENSE
|
||||
|
||||
local Gui = {}
|
||||
local Gui_data = {}
|
||||
|
||||
-- only really used when parts of expcore are missing, or script debuging (ie to store the location of frames)
|
||||
function Gui._global(reset)
|
||||
global.exp_core = not reset and global.exp_core or {}
|
||||
global.exp_core.gui = not reset and global.exp_core.gui or {}
|
||||
return global.exp_core.gui
|
||||
end
|
||||
--- Stores all the on_player_joined_game event handlers for the guis
|
||||
-- @table events
|
||||
Gui.events = {join={},rank={}}
|
||||
|
||||
-- this is to enforce the read only propetry of the gui
|
||||
function Gui._add_data(key,value_key,value)
|
||||
if game then return end
|
||||
if not Gui_data[key] then Gui_data[key] = {} end
|
||||
Gui_data[key][value_key] = value
|
||||
end
|
||||
--- Used to set and get data about different guis
|
||||
-- @usage Gui.data[location] -- returns the gui data for that gui location ex center
|
||||
-- @usage Gui.data(location,gui_name,gui_data) -- adds gui data for a gui at a location
|
||||
-- @tparam string location the location to get/set the data, center left etc...
|
||||
-- @tparam[opt] string key the name of the gui to set the value of
|
||||
-- @param[opt] value the data that will be set can be any value but table advised
|
||||
-- @treturn[1] table all the gui data that is locationed in that location
|
||||
Gui.data = setmetatable({},{
|
||||
__call=function(tbl,location,key,value)
|
||||
if not location then return tbl end
|
||||
if not key then return rawget(tbl,location) or rawset(tbl,location,{}) and rawget(tbl,location) end
|
||||
if game then error('New guis cannot be added during runtime',2) end
|
||||
if not rawget(tbl,location) then rawset(tbl,location,{}) end
|
||||
rawset(rawget(tbl,location),key,value)
|
||||
end
|
||||
})
|
||||
|
||||
function Gui._get_data(key) return Gui_data[key] end
|
||||
|
||||
Gui.center = require(module_path..'/GuiParts/center')
|
||||
Gui.inputs = require(module_path..'/GuiParts/inputs')
|
||||
Gui.left = require(module_path..'/GuiParts/left')
|
||||
Gui.popup = require(module_path..'/GuiParts/popup')
|
||||
Gui.toolbar = require(module_path..'/GuiParts/toolbar')
|
||||
-- loaded the different gui parts, each is its own module for ldoc reasons
|
||||
local join, rank
|
||||
Gui.center, join, rank = require(module_path..'/src/center')
|
||||
table.insert(Gui.events.join,event) table.insert(Gui.events.rank,rank)
|
||||
Gui.inputs, event = require(module_path..'/src/inputs')
|
||||
table.insert(Gui.events.join,event) table.insert(Gui.events.rank,rank)
|
||||
Gui.left, event = require(module_path..'/src/left')
|
||||
table.insert(Gui.events.join,event) table.insert(Gui.events.rank,rank)
|
||||
Gui.popup, event = require(module_path..'/src/popup')
|
||||
table.insert(Gui.events.join,event) table.insert(Gui.events.rank,rank)
|
||||
Gui.toolbar, event = require(module_path..'/src/toolbar')
|
||||
table.insert(Gui.events.join,event) table.insert(Gui.events.rank,rank)
|
||||
join, rank = nil, nil
|
||||
|
||||
--- Add a white bar to any gui frame
|
||||
-- @usage Gui.bar(frame,100)
|
||||
@@ -50,7 +60,7 @@ function Gui.bar(frame,width)
|
||||
end
|
||||
|
||||
--- Used to set the index of a drop down to a certian item
|
||||
-- @usage Gui.set_dropdown_index(dropdown,player.name)
|
||||
-- @usage Gui.set_dropdown_index(dropdown,player.name) -- will select the index with the players name as the value
|
||||
-- @param dropdown the dropdown that is to be effected
|
||||
-- @param _item this is the item to look for
|
||||
-- @return returns the dropdown if it was successful
|
||||
@@ -64,43 +74,22 @@ function Gui.set_dropdown_index(dropdown,_item)
|
||||
return dropdown
|
||||
end
|
||||
|
||||
Gui.on_init=function(self)
|
||||
Gui.test = require(module_path..'/GuiParts/test')
|
||||
if not Server then return end
|
||||
Event.register(-1,function(event)
|
||||
Server.new_thread{
|
||||
name='camera-follow',
|
||||
data={cams={},cam_index=1,players={}}
|
||||
}:on_event('tick',function(self)
|
||||
local _cam = self.data.cams[self.data.cam_index]
|
||||
if not _cam then self.data.cam_index = 1 _cam = self.data.cams[self.data.cam_index] end
|
||||
if not _cam then return end
|
||||
if not _cam.cam.valid then table.remove(self.data.cams,self.data.cam_index)
|
||||
elseif not _cam.entity.valid then table.remove(self.data.cams,self.data.cam_index)
|
||||
else _cam.cam.position = _cam.entity.position if not _cam.surface then _cam.cam.surface_index = _cam.entity.surface.index end self.data.cam_index = self.data.cam_index+1
|
||||
end
|
||||
end):on_event('error',function(self,err)
|
||||
-- posible error handling if needed
|
||||
error(err)
|
||||
end):on_event(defines.events.on_player_respawned,function(self,event)
|
||||
if self.data.players[event.player_index] then
|
||||
local remove = {}
|
||||
for index,cam in pairs(self.data.players[event.player_index]) do
|
||||
Gui.cam_link{cam=cam,entity=Game.get_player(event).character}
|
||||
if not cam.valid then table.insert(remove,index) end
|
||||
end
|
||||
for _,index in pairs(remove) do
|
||||
table.remove(self.data.players[event.player_index],index)
|
||||
end
|
||||
end
|
||||
end):open()
|
||||
end)
|
||||
function Gui:on_init()
|
||||
if loaded_modules.Server then verbose('ExpGamingCore.Server is installed; Loading server src') require(module_path..'/src/server') end
|
||||
if loaded_modules.Ranking then
|
||||
verbose('ExpGamingCore.Ranking is installed; Loading ranking src')
|
||||
script.on_event('on_player_joined_game',function(event)
|
||||
for _,callback in pairs(Gui.events.rank) do callback(event) end
|
||||
end)
|
||||
end
|
||||
end
|
||||
|
||||
--- Adds a camera that updates every tick (or less depeading on how many are opening) it will move to follow an entity
|
||||
-- @usage Gui.cam_link{entity=game.player.character,frame=frame,width=50,hight=50,zoom=1}
|
||||
-- @usage Gui.cam_link{entity=game.player.character,cam=frame.camera,surface=game.surfaces['testing']}
|
||||
-- @tparam table data contains all other params given below
|
||||
function Gui:on_post()
|
||||
Gui.test = require(module_path..'/src/test')
|
||||
end
|
||||
|
||||
--- Prams for Gui.cam_link
|
||||
-- @table ParametersForCamLink
|
||||
-- @field entity this is the entity that the camera will follow
|
||||
-- @field cam a camera that you already have in the gui
|
||||
-- @field frame the frame to add the camera to, no effect if cam param is given
|
||||
@@ -109,6 +98,11 @@ end
|
||||
-- @field height the height to give the new camera
|
||||
-- @field surface this will over ride the surface that the camera follows on, allowing for a 'ghost surface' while keeping same position
|
||||
-- @field respawn_open if set to true then the camera will auto re link to the player after a respawn
|
||||
|
||||
--- Adds a camera that updates every tick (or less depeading on how many are opening) it will move to follow an entity
|
||||
-- @usage Gui.cam_link{entity=game.player.character,frame=frame,width=50,hight=50,zoom=1}
|
||||
-- @usage Gui.cam_link{entity=game.player.character,cam=frame.camera,surface=game.surfaces['testing']}
|
||||
-- @tparam table data contains all other params given below
|
||||
-- @return the camera that the function used be it made or given as a param
|
||||
function Gui.cam_link(data)
|
||||
if not data.entity or not data.entity.valid then return end
|
||||
@@ -126,21 +120,21 @@ function Gui.cam_link(data)
|
||||
data.cam.style.height = data.height or 100
|
||||
else return end
|
||||
if not Server or not Server._thread or not Server.get_thread('camera-follow') then
|
||||
if not Gui._global().cams then
|
||||
Gui._global().cams = {}
|
||||
Gui._global().cam_index = 1
|
||||
if not global().cams then
|
||||
global().cams = {}
|
||||
global().cam_index = 1
|
||||
end
|
||||
if data.cam then
|
||||
local surface = data.surface and data.surface.index or nil
|
||||
table.insert(Gui._global().cams,{cam=data.cam,entity=data.entity,surface=surface})
|
||||
table.insert(global().cams,{cam=data.cam,entity=data.entity,surface=surface})
|
||||
end
|
||||
if not Gui._global().players then
|
||||
Gui._global().players = {}
|
||||
if not global().players then
|
||||
global().players = {}
|
||||
end
|
||||
if data.respawn_open then
|
||||
if data.entity.player then
|
||||
if not Gui._global().players[data.entity.player.index] then Gui._global().players[data.entity.player.index] = {} end
|
||||
table.insert(Gui._global().players[data.entity.player.index],data.cam)
|
||||
if not global().players[data.entity.player.index] then global().players[data.entity.player.index] = {} end
|
||||
table.insert(global().players[data.entity.player.index],data.cam)
|
||||
end
|
||||
end
|
||||
else
|
||||
@@ -157,30 +151,34 @@ function Gui.cam_link(data)
|
||||
return data.cam
|
||||
end
|
||||
|
||||
Event.register(defines.events.on_tick, function(event)
|
||||
script.on_event('on_player_joined_game',function(event)
|
||||
for _,callback in pairs(Gui.events.join) do callback(event) end
|
||||
end)
|
||||
|
||||
script.on_event('on_tick', function(event)
|
||||
if Gui.left and ((event.tick+10)/(3600*game.speed)) % 15 == 0 then
|
||||
Gui.left.update()
|
||||
end
|
||||
if Gui._global().cams and is_type(Gui._global().cams,'table') and #Gui._global().cams > 0 then
|
||||
local _cam = Gui._global().cams[Gui._global().cam_index]
|
||||
if not _cam then Gui._global().cam_index = 1 _cam = Gui._global().cams[Gui._global().cam_index] end
|
||||
if global().cams and is_type(global().cams,'table') and #global().cams > 0 then
|
||||
local _cam = global().cams[global().cam_index]
|
||||
if not _cam then global().cam_index = 1 _cam = global().cams[global().cam_index] end
|
||||
if not _cam then return end
|
||||
if not _cam.cam.valid then table.remove(Gui._global().cams,Gui._global().cam_index)
|
||||
elseif not _cam.entity.valid then table.remove(Gui._global().cams,Gui._global().cam_index)
|
||||
else _cam.cam.position = _cam.entity.position if not _cam.surface then _cam.cam.surface_index = _cam.entity.surface.index end Gui._global().cam_index = Gui._global().cam_index+1
|
||||
if not _cam.cam.valid then table.remove(global().cams,global().cam_index)
|
||||
elseif not _cam.entity.valid then table.remove(global().cams,global().cam_index)
|
||||
else _cam.cam.position = _cam.entity.position if not _cam.surface then _cam.cam.surface_index = _cam.entity.surface.index end global().cam_index = global().cam_index+1
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
||||
Event.register(defines.events.on_player_respawned,function(event)
|
||||
if Gui._global().players and is_type(Gui._global().players,'table') and #Gui._global().players > 0 and Gui._global().players[event.player_index] then
|
||||
script.on_event('on_player_respawned',function(event)
|
||||
if global().players and is_type(global().players,'table') and #global().players > 0 and global().players[event.player_index] then
|
||||
local remove = {}
|
||||
for index,cam in pairs(Gui._global().players[event.player_index]) do
|
||||
for index,cam in pairs(global().players[event.player_index]) do
|
||||
Gui.cam_link{cam=cam,entity=Game.get_player(event).character}
|
||||
if not cam.valid then table.insert(remove,index) end
|
||||
end
|
||||
for _,index in pairs(remove) do
|
||||
table.remove(Gui._global().players[event.player_index],index)
|
||||
table.remove(global().players[event.player_index],index)
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
--[[
|
||||
Explosive Gaming
|
||||
--- Adds a uniform preset for guis in the center of the screen which allow for different tabs to be opened
|
||||
-- @module ExpGamingCore.Gui.Center
|
||||
-- @alias center
|
||||
-- @author Cooldude2606
|
||||
-- @license https://github.com/explosivegaming/scenario/blob/master/LICENSE
|
||||
|
||||
This file can be used with permission but this and the credit below must remain in the file.
|
||||
Contact a member of management on our discord to seek permission to use our code.
|
||||
Any changes that you may make to the code are yours but that does not make the script yours.
|
||||
Discord: https://discord.gg/r6dC2uK
|
||||
]]
|
||||
--- This is a submodule of ExpGamingCore.Gui but for ldoc reasons it is under its own module
|
||||
-- @function _comment
|
||||
|
||||
local center = {}
|
||||
center._center = {}
|
||||
@@ -21,7 +21,7 @@ function center.add(obj)
|
||||
setmetatable(obj,{__index=center._center})
|
||||
obj.tabs = {}
|
||||
obj._tabs = {}
|
||||
Gui._add_data('center',obj.name,obj)
|
||||
Gui.data('center',obj.name,obj)
|
||||
Gui.toolbar.add(obj.name,obj.caption,obj.tooltip,obj.open)
|
||||
return obj
|
||||
end
|
||||
@@ -43,8 +43,8 @@ end
|
||||
function center.open(player,center)
|
||||
local player = Game.get_player(player)
|
||||
Gui.center.clear(player)
|
||||
if not Gui._get_data('center')[center] then return false end
|
||||
Gui._get_data('center')[center].open{
|
||||
if not Gui.data.center[center] then return false end
|
||||
Gui.data.center[center].open{
|
||||
element={name=center},
|
||||
player_index=player.index
|
||||
}
|
||||
@@ -61,8 +61,8 @@ function center.open_tab(player,center,tab)
|
||||
local player = Game.get_player(player)
|
||||
if not Gui.center.open(player,center) then return false end
|
||||
local name = center..'_'..tab
|
||||
if not Gui._get_data('inputs_button')[name] then return false end
|
||||
Gui._get_data('inputs_button')[name].events[defines.events.on_gui_click]{
|
||||
if not Gui.data.inputs_button[name] then return false end
|
||||
Gui.data.inputs_button[name].events[defines.events.on_gui_click]{
|
||||
element=Gui.center.get_flow(player)[center].tab_bar.tab_bar_scroll.tab_bar_scroll_flow[name],
|
||||
}
|
||||
return true
|
||||
@@ -80,7 +80,7 @@ end
|
||||
-- not recomented for direct use see Gui.center.open
|
||||
function center._center.open(event)
|
||||
local player = Game.get_player(event)
|
||||
local _center = Gui._get_data('center')[event.element.name]
|
||||
local _center = Gui.data.center[event.element.name]
|
||||
local center_flow = center.get_flow(player)
|
||||
if center_flow[_center.name] then Gui.center.clear(player) return end
|
||||
local center_frame = center_flow.add{
|
||||
@@ -179,7 +179,7 @@ function center._center:add_tab(name,caption,tooltip,callback)
|
||||
local tab = event.element.parent.parent.parent.parent.tab.tab_scroll.tab_scroll_flow
|
||||
tab.clear()
|
||||
local frame_name = tab.parent.parent.parent.name
|
||||
local _center = Gui._get_data('center')[frame_name]
|
||||
local _center = Gui.data.center[frame_name]
|
||||
local _tab = _center._tabs[event.element.name]
|
||||
if is_type(_tab,'function') then
|
||||
for _,button in pairs(event.element.parent.children) do
|
||||
@@ -197,13 +197,10 @@ function center._center:add_tab(name,caption,tooltip,callback)
|
||||
end
|
||||
|
||||
-- used so that when gui close key is pressed this will close the gui
|
||||
Event.register(defines.events.on_gui_closed,function(event)
|
||||
script.on_event('on_gui_closed',function(event)
|
||||
if event.element and event.element.valid then event.element.destroy() end
|
||||
end)
|
||||
|
||||
-- when the player rank is changed it closses the center guis
|
||||
if defines.events.rank_change then
|
||||
Event.register(defines.events.rank_change,center.clear)
|
||||
end
|
||||
|
||||
return center
|
||||
-- second return is join event and third is rank change event
|
||||
return center, nil, center.clear
|
||||
@@ -1,11 +1,11 @@
|
||||
--[[
|
||||
Explosive Gaming
|
||||
--- Adds a clean way of making new inputs for a gui allowing for sliders and text inputs to be hanndleded with custom events
|
||||
-- @module ExpGamingCore.Gui.Inputs
|
||||
-- @alias inputs
|
||||
-- @author Cooldude2606
|
||||
-- @license https://github.com/explosivegaming/scenario/blob/master/LICENSE
|
||||
|
||||
This file can be used with permission but this and the credit below must remain in the file.
|
||||
Contact a member of management on our discord to seek permission to use our code.
|
||||
Any changes that you may make to the code are yours but that does not make the script yours.
|
||||
Discord: https://discord.gg/r6dC2uK
|
||||
]]
|
||||
--- This is a submodule of ExpGamingCore.Gui but for ldoc reasons it is under its own module
|
||||
-- @function _comment
|
||||
|
||||
local inputs = {}
|
||||
inputs._input = {}
|
||||
@@ -106,17 +106,17 @@ function inputs.add(obj)
|
||||
obj.data = {}
|
||||
obj.events = {}
|
||||
setmetatable(obj,{__index=inputs._input})
|
||||
Gui._add_data('inputs_'..type,obj.name,obj)
|
||||
Gui.data('inputs_'..type,obj.name,obj)
|
||||
return obj
|
||||
end
|
||||
|
||||
-- this just runs the events given to inputs
|
||||
function inputs._event_handler(event)
|
||||
if not event.element then return end
|
||||
local elements = Gui._get_data('inputs_'..event.element.type) or {}
|
||||
local elements = Gui.data['inputs_'..event.element.type] or {}
|
||||
local element = elements[event.element.name]
|
||||
if not element and event.element.type == 'sprite-button' then
|
||||
elements = Gui._get_data('inputs_button') or {}
|
||||
elements = Gui.data.inputs_button or {}
|
||||
element = elements[event.element.name]
|
||||
end
|
||||
if element then
|
||||
@@ -129,13 +129,13 @@ function inputs._event_handler(event)
|
||||
end
|
||||
end
|
||||
|
||||
Event.register(inputs.events.state,inputs._event_handler)
|
||||
Event.register(inputs.events.click,inputs._event_handler)
|
||||
Event.register(inputs.events.elem,inputs._event_handler)
|
||||
Event.register(inputs.events.state,inputs._event_handler)
|
||||
Event.register(inputs.events.text,inputs._event_handler)
|
||||
Event.register(inputs.events.slider,inputs._event_handler)
|
||||
Event.register(inputs.events.selection,inputs._event_handler)
|
||||
script.on_event(inputs.events.state,inputs._event_handler)
|
||||
script.on_event(inputs.events.click,inputs._event_handler)
|
||||
script.on_event(inputs.events.elem,inputs._event_handler)
|
||||
script.on_event(inputs.events.state,inputs._event_handler)
|
||||
script.on_event(inputs.events.text,inputs._event_handler)
|
||||
script.on_event(inputs.events.slider,inputs._event_handler)
|
||||
script.on_event(inputs.events.selection,inputs._event_handler)
|
||||
|
||||
-- the folwing functions are just to make inputs easier but if what you want is not include use inputs.add(obj)
|
||||
--- Used to define a button, can have many function
|
||||
@@ -154,10 +154,10 @@ function inputs.add_button(name,display,tooltip,callbacks)
|
||||
}
|
||||
button.data._callbacks = callbacks
|
||||
button:on_event('click',function(event)
|
||||
local elements = Gui._get_data('inputs_'..event.element.type) or {}
|
||||
local elements = Gui.data['inputs_'..event.element.type] or {}
|
||||
local button = elements[event.element.name]
|
||||
if not button and event.element.type == 'sprite-button' then
|
||||
elements = Gui._get_data('inputs_button') or {}
|
||||
elements = Gui.data.inputs_button or {}
|
||||
button = elements[event.element.name]
|
||||
end
|
||||
local player = Game.get_player(event)
|
||||
@@ -195,7 +195,7 @@ function inputs.add_elem_button(name,elem_type,tooltip,callback)
|
||||
}
|
||||
button.data._callback = callback
|
||||
button:on_event('elem',function(event)
|
||||
local button = Gui._get_data('inputs_'..event.element.type)[event.element.name]
|
||||
local button = Gui.data['inputs_'..event.element.type][event.element.name]
|
||||
local player = Game.get_player(event)
|
||||
local element = event.element or {elem_type=nil,elem_value=nil}
|
||||
local elem = {type=element.elem_type,value=element.elem_value}
|
||||
@@ -229,7 +229,7 @@ function inputs.add_checkbox(name,radio,display,default,callback_true,callback_f
|
||||
checkbox.data._true = callback_true
|
||||
checkbox.data._false = callback_false
|
||||
checkbox:on_event('state',function(event)
|
||||
local checkbox = Gui._get_data('inputs_'..event.element.type)[event.element.name]
|
||||
local checkbox = Gui.data['inputs_'..event.element.type][event.element.name]
|
||||
local player = Game.get_player(event)
|
||||
local state = event.element.state
|
||||
if state then
|
||||
@@ -254,7 +254,7 @@ function inputs.reset_radio(elements)
|
||||
if #elements > 0 then
|
||||
for _,element in pairs(elements) do
|
||||
if element.valid then
|
||||
local _elements = Gui._get_data('inputs_'..element.type) or {}
|
||||
local _elements = Gui.data['inputs_'..element.type] or {}
|
||||
local _element = _elements[element.name]
|
||||
local player = Game.get_player(element.player_index)
|
||||
local state = false
|
||||
@@ -265,7 +265,7 @@ function inputs.reset_radio(elements)
|
||||
end
|
||||
else
|
||||
if elements.valid then
|
||||
local _elements = Gui._get_data('inputs_'..elements.type) or {}
|
||||
local _elements = Gui.data['inputs_'..elements.type] or {}
|
||||
local _element = _elements[elements.name]
|
||||
local player = Game.get_player(elements.player_index)
|
||||
local state = false
|
||||
@@ -292,7 +292,7 @@ function inputs.add_text(name,box,text,callback)
|
||||
}
|
||||
textbox.data._callback = callback
|
||||
textbox:on_event('text',function(event)
|
||||
local textbox = Gui._get_data('inputs_'..event.element.type)[event.element.name]
|
||||
local textbox = Gui.data['inputs_'..event.element.type][event.element.name]
|
||||
local player = Game.get_player(event)
|
||||
local element = event.element
|
||||
local callback = textbox.data._callback
|
||||
@@ -325,7 +325,7 @@ function inputs.add_slider(name,orientation,min,max,start_callback,callback)
|
||||
slider.data._start = start_callback
|
||||
slider.data._callback = callback
|
||||
slider:on_event('slider',function(event)
|
||||
local slider = Gui._get_data('inputs_'..event.element.type)[event.element.name]
|
||||
local slider = Gui.data['inputs_'..event.element.type][event.element.name]
|
||||
local player = Game.get_player(event)
|
||||
local value = event.element.slider_value
|
||||
local data = slider.data
|
||||
@@ -356,7 +356,7 @@ function inputs.add_drop_down(name,items,index,callback)
|
||||
drop_down.data._index = index
|
||||
drop_down.data._callback = callback
|
||||
drop_down:on_event('selection',function(event)
|
||||
local drop_down = Gui._get_data('inputs_'..event.element.type)[event.element.name]
|
||||
local drop_down = Gui.data['inputs_'..event.element.type][event.element.name]
|
||||
local player = Game.get_player(event)
|
||||
local element = event.element
|
||||
local items = element.items
|
||||
@@ -370,6 +370,7 @@ function inputs.add_drop_down(name,items,index,callback)
|
||||
return drop_down
|
||||
end
|
||||
|
||||
return inputs
|
||||
-- second return is join event and third is rank change event
|
||||
return inputs, nil, nil
|
||||
|
||||
-- to see examples look at GuiParts/test.lua
|
||||
@@ -1,18 +1,18 @@
|
||||
--[[
|
||||
Explosive Gaming
|
||||
--- Adds a organiser for left gui ellements which will automaticaly update there information and have open requirements
|
||||
-- @module ExpGamingCore.Gui.Left
|
||||
-- @alias left
|
||||
-- @author Cooldude2606
|
||||
-- @license https://github.com/explosivegaming/scenario/blob/master/LICENSE
|
||||
|
||||
This file can be used with permission but this and the credit below must remain in the file.
|
||||
Contact a member of management on our discord to seek permission to use our code.
|
||||
Any changes that you may make to the code are yours but that does not make the script yours.
|
||||
Discord: https://discord.gg/r6dC2uK
|
||||
]]
|
||||
--- This is a submodule of ExpGamingCore.Gui but for ldoc reasons it is under its own module
|
||||
-- @function _comment
|
||||
|
||||
local left = {}
|
||||
left._left = {}
|
||||
|
||||
-- used for debugging
|
||||
function left.override_open(state)
|
||||
Gui._global().over_ride_left_can_open = state
|
||||
global().over_ride_left_can_open = state
|
||||
end
|
||||
--- Used to add a left gui frame
|
||||
-- @usage Gui.left.add{name='foo',caption='Foo',tooltip='just testing',open_on_join=true,can_open=function,draw=function}
|
||||
@@ -23,7 +23,7 @@ function left.add(obj)
|
||||
if not is_type(obj.name,'string') then return end
|
||||
verbose('Created Left Gui: '..obj.name)
|
||||
setmetatable(obj,{__index=left._left})
|
||||
Gui._add_data('left',obj.name,obj)
|
||||
Gui.data('left',obj.name,obj)
|
||||
Gui.toolbar.add(obj.name,obj.caption,obj.tooltip,obj.toggle)
|
||||
return obj
|
||||
end
|
||||
@@ -36,7 +36,7 @@ function left.update(frame,players)
|
||||
if not Server or not Server._thread then
|
||||
local players = is_type(players,'table') and #players > 0 and {unpack(players)} or is_type(players,'table') and {players} or Game.get_player(players) and {Game.get_player(players)} or game.connected_players
|
||||
for _,player in pairs(players) do
|
||||
local frames = Gui._get_data('left') or {}
|
||||
local frames = Gui.data.left or {}
|
||||
if frame then frames = {[frame]=frames[frame]} or {} end
|
||||
for name,left in pairs(frames) do
|
||||
if _left then
|
||||
@@ -46,7 +46,7 @@ function left.update(frame,players)
|
||||
end
|
||||
end
|
||||
else
|
||||
local frames = Gui._get_data('left') or {}
|
||||
local frames = Gui.data.left or {}
|
||||
if frame then frames = {[frame]=frames[frame]} or {} end
|
||||
local players = is_type(players,'table') and #players > 0 and {unpack(players)} or is_type(players,'table') and {players} or Game.get_player(players) and {Game.get_player(players)} or game.connected_players
|
||||
Server.new_thread{
|
||||
@@ -72,7 +72,7 @@ end
|
||||
-- @usage Gui.left.open('foo')
|
||||
-- @tparam string left_name this is the gui that you want to open
|
||||
function left.open(left_name)
|
||||
local _left = Gui._get_data('left')[left_name]
|
||||
local _left = Gui.data.left[left_name]
|
||||
if not _left then return end
|
||||
if not Server or not Server._thread then
|
||||
for _,player in pairs(game.connected_players) do
|
||||
@@ -95,7 +95,7 @@ end
|
||||
-- @usage Gui.left.close('foo')
|
||||
-- @tparam string left_name this is the gui that you want to close
|
||||
function left.close(left_name)
|
||||
local _left = Gui._get_data('left')[left_name]
|
||||
local _left = Gui.data.left[left_name]
|
||||
if not _left then return end
|
||||
if not Server or not Server._thread then
|
||||
for _,player in pairs(game.connected_players) do
|
||||
@@ -117,7 +117,7 @@ end
|
||||
-- this is used to draw the gui for the first time (these guis are never destoryed), used by the script
|
||||
function left._left.open(event)
|
||||
local player = Game.get_player(event)
|
||||
local _left = Gui._get_data('left')[event.element.name]
|
||||
local _left = Gui.data.left[event.element.name]
|
||||
local left_flow = mod_gui.get_frame_flow(player)
|
||||
local frame = nil
|
||||
if left_flow[_left.name] then
|
||||
@@ -134,7 +134,7 @@ end
|
||||
-- this is called when the toolbar button is pressed
|
||||
function left._left.toggle(event)
|
||||
local player = Game.get_player(event)
|
||||
local _left = Gui._get_data('left')[event.element.name]
|
||||
local _left = Gui.data.left[event.element.name]
|
||||
local left_flow = mod_gui.get_frame_flow(player)
|
||||
if not left_flow[_left.name] then _left.open(event) end
|
||||
local left = left_flow[_left.name]
|
||||
@@ -143,7 +143,7 @@ function left._left.toggle(event)
|
||||
local success, err = pcall(_left.can_open,player)
|
||||
if not success then error(err)
|
||||
elseif err == true then open = true
|
||||
elseif Gui._global().over_ride_left_can_open then
|
||||
elseif global().over_ride_left_can_open then
|
||||
if is_type(Ranking,'table') and Ranking._presets and Ranking._presets().meta.rank_count > 0 then
|
||||
if Ranking.get_rank(player):allowed(_left.name) then open = true
|
||||
else open = {gui.unauthorized} end
|
||||
@@ -164,14 +164,13 @@ function left._left.toggle(event)
|
||||
elseif open ~= true then player_return({'gui.cant-open',open},defines.textcolor.crit,player) player.play_sound{path='utility/cannot_build'} end
|
||||
end
|
||||
|
||||
-- draws the left guis when a player first joins, fake_event is just because i am lazy
|
||||
Event.register(defines.events.on_player_joined_game,function(event)
|
||||
-- second return is join event and third is rank change event
|
||||
return left, function(event)
|
||||
-- draws the left guis when a player first joins, fake_event is just because i am lazy
|
||||
local player = Game.get_player(event)
|
||||
local frames = Gui._get_data('left') or {}
|
||||
local frames = Gui.data.left or {}
|
||||
for name,left in pairs(frames) do
|
||||
local fake_event = {player_index=player.index,element={name=name}}
|
||||
left.open(fake_event)
|
||||
end
|
||||
end)
|
||||
|
||||
return left
|
||||
end, nil
|
||||
@@ -1,11 +1,11 @@
|
||||
--[[
|
||||
Explosive Gaming
|
||||
--- Adds a location for popups which can be dismissed by a player and created from other scripts
|
||||
-- @module ExpGamingCore.Gui.Popup
|
||||
-- @alias popup
|
||||
-- @author Cooldude2606
|
||||
-- @license https://github.com/explosivegaming/scenario/blob/master/LICENSE
|
||||
|
||||
This file can be used with permission but this and the credit below must remain in the file.
|
||||
Contact a member of management on our discord to seek permission to use our code.
|
||||
Any changes that you may make to the code are yours but that does not make the script yours.
|
||||
Discord: https://discord.gg/r6dC2uK
|
||||
]]
|
||||
--- This is a submodule of ExpGamingCore.Gui but for ldoc reasons it is under its own module
|
||||
-- @function _comment
|
||||
|
||||
local popup = {}
|
||||
popup._popup = {}
|
||||
@@ -32,7 +32,7 @@ function popup.add(obj)
|
||||
verbose('Created Popup Gui: '..obj.name)
|
||||
setmetatable(obj,{__index=popup._popup})
|
||||
local name = obj.name; obj.name = nil
|
||||
Gui._add_data('popup',name,obj)
|
||||
Gui.data('popup',name,obj)
|
||||
obj.name = name
|
||||
return obj
|
||||
end
|
||||
@@ -50,7 +50,7 @@ end
|
||||
-- @param data this is the data that is sent to the draw function
|
||||
-- @tparam[opt=game.connected_players] table players the players to open the popup for
|
||||
function popup.open(style,data,players)
|
||||
local _popup = Gui._get_data('popup')[style]
|
||||
local _popup = Gui.data.popup[style]
|
||||
local players = players or game.connected_players
|
||||
local data = data or {}
|
||||
if not _popup then return end
|
||||
@@ -107,6 +107,5 @@ function popup._popup:add_left(obj)
|
||||
self.left = Gui.left.add(obj)
|
||||
end
|
||||
|
||||
Event.register(defines.events.on_player_joined_game,popup.flow)
|
||||
|
||||
return popup
|
||||
-- second return is join event and third is rank change event
|
||||
return popup, popup.flow, nil
|
||||
39
modules/ExpGamingCore/Gui/src/server.lua
Normal file
39
modules/ExpGamingCore/Gui/src/server.lua
Normal file
@@ -0,0 +1,39 @@
|
||||
--- Adds a objective version to custom guis.
|
||||
-- @submodule ExpGamingCore.Gui
|
||||
-- @alias Gui
|
||||
-- @author Cooldude2606
|
||||
-- @license https://github.com/explosivegaming/scenario/blob/master/LICENSE
|
||||
|
||||
--- This file will be loaded when ExpGamingCore.Commands is present
|
||||
-- @function _comment
|
||||
|
||||
--- Adds a server thread that allows the camera follows to be toggled off and on
|
||||
-- @function __comment
|
||||
script.on_event(-1,function(event)
|
||||
Server.new_thread{
|
||||
name='camera-follow',
|
||||
data={cams={},cam_index=1,players={}}
|
||||
}:on_event('tick',function(self)
|
||||
local _cam = self.data.cams[self.data.cam_index]
|
||||
if not _cam then self.data.cam_index = 1 _cam = self.data.cams[self.data.cam_index] end
|
||||
if not _cam then return end
|
||||
if not _cam.cam.valid then table.remove(self.data.cams,self.data.cam_index)
|
||||
elseif not _cam.entity.valid then table.remove(self.data.cams,self.data.cam_index)
|
||||
else _cam.cam.position = _cam.entity.position if not _cam.surface then _cam.cam.surface_index = _cam.entity.surface.index end self.data.cam_index = self.data.cam_index+1
|
||||
end
|
||||
end):on_event('error',function(self,err)
|
||||
-- posible error handling if needed
|
||||
error(err)
|
||||
end):on_event(defines.events.on_player_respawned,function(self,event)
|
||||
if self.data.players[event.player_index] then
|
||||
local remove = {}
|
||||
for index,cam in pairs(self.data.players[event.player_index]) do
|
||||
Gui.cam_link{cam=cam,entity=Game.get_player(event).character}
|
||||
if not cam.valid then table.insert(remove,index) end
|
||||
end
|
||||
for _,index in pairs(remove) do
|
||||
table.remove(self.data.players[event.player_index],index)
|
||||
end
|
||||
end
|
||||
end):open()
|
||||
end)
|
||||
@@ -1,4 +1,10 @@
|
||||
-- this is just testing all the diffrent inputs to open test use /c Gui.test()
|
||||
--- Used to test all gui elements and parts can be used in game via Gui.test()
|
||||
-- @module ExpGamingCore.Gui.Test
|
||||
-- @author Cooldude2606
|
||||
-- @license https://github.com/explosivegaming/scenario/blob/master/LICENSE
|
||||
|
||||
--- This is a submodule of ExpGamingCore.Gui but for ldoc reasons it is under its own module
|
||||
-- @function _comment
|
||||
|
||||
local gui_tset_close = Gui.inputs.add{
|
||||
name='gui-test-close',
|
||||
@@ -90,9 +96,13 @@ local drop_test = Gui.inputs.add_drop_down('test-drop',table.keys(defines.color)
|
||||
player.chat_color = defines.color[selected]
|
||||
end)
|
||||
|
||||
local function test_gui(event)
|
||||
if not game.player and not event.player_index then return end
|
||||
local player = game.player or Game.get_player(event)
|
||||
--- The funcation that is called when calling Gui.test
|
||||
-- @function Gui.test
|
||||
-- @usage Gui.test() -- draws test gui
|
||||
-- @param[opt=game.player] player a pointer to a player to draw the test gui for
|
||||
local function test_gui(player)
|
||||
local player = game.player or Game.get_player(player) or nil
|
||||
if not player then return end
|
||||
if mod_gui.get_frame_flow(player)['gui-test'] then mod_gui.get_frame_flow(player)['gui-test'].destroy() end
|
||||
local frame = mod_gui.get_frame_flow(player).add{type='frame',name='gui-test',direction='vertical'}
|
||||
gui_tset_close:draw(frame)
|
||||
@@ -1,11 +1,11 @@
|
||||
--[[
|
||||
Explosive Gaming
|
||||
--- Adds a toolbar to the top left of the screen
|
||||
-- @module ExpGamingCore.Gui.Toolbar
|
||||
-- @alias toolbar
|
||||
-- @author Cooldude2606
|
||||
-- @license https://github.com/explosivegaming/scenario/blob/master/LICENSE
|
||||
|
||||
This file can be used with permission but this and the credit below must remain in the file.
|
||||
Contact a member of management on our discord to seek permission to use our code.
|
||||
Any changes that you may make to the code are yours but that does not make the script yours.
|
||||
Discord: https://discord.gg/r6dC2uK
|
||||
]]
|
||||
--- This is a submodule of ExpGamingCore.Gui but for ldoc reasons it is under its own module
|
||||
-- @function _comment
|
||||
|
||||
local toolbar = {}
|
||||
|
||||
@@ -20,7 +20,7 @@ function toolbar.add(name,caption,tooltip,callback)
|
||||
verbose('Created Toolbar Button: '..name)
|
||||
local button = Gui.inputs.add{type='button',name=name,caption=caption,tooltip=tooltip}
|
||||
button:on_event(Gui.inputs.events.click,callback)
|
||||
Gui._add_data('toolbar',name,button)
|
||||
Gui.data('toolbar',name,button)
|
||||
return button
|
||||
end
|
||||
|
||||
@@ -32,8 +32,8 @@ function toolbar.draw(player)
|
||||
if not player then return end
|
||||
local toolbar_frame = mod_gui.get_button_flow(player)
|
||||
toolbar_frame.clear()
|
||||
if not Gui._get_data('toolbar') then return end
|
||||
for name,button in pairs(Gui._get_data('toolbar')) do
|
||||
if not Gui.data.toolbar then return end
|
||||
for name,button in pairs(Gui.data.toolbar) do
|
||||
if is_type(Ranking,'table') and Ranking._presets and Ranking._presets().meta.rank_count > 0 then
|
||||
local rank = Ranking.get_rank(player)
|
||||
if rank:allowed(name) then
|
||||
@@ -43,9 +43,5 @@ function toolbar.draw(player)
|
||||
end
|
||||
end
|
||||
|
||||
if defines.events.rank_change then
|
||||
Event.register(defines.events.rank_change,toolbar.draw)
|
||||
end
|
||||
Event.register(defines.events.on_player_joined_game,toolbar.draw)
|
||||
|
||||
return toolbar
|
||||
-- second return is join event and third is rank change event
|
||||
return toolbar, toolbar.draw, toolbar.draw
|
||||
@@ -427,10 +427,19 @@ script.on_event('on_tick',function(event)
|
||||
end
|
||||
end)
|
||||
|
||||
Ranking.on_init=function(self)
|
||||
if loaded_modules.Server then require(module_path..'/src/server') end
|
||||
require(module_path..'/src/core')
|
||||
require(module_path..'/src/config')
|
||||
_G.Ranking = Ranking
|
||||
verbose('Loading rank core...')
|
||||
require(module_path..'/src/core')
|
||||
verbose('Loading rank configs...')
|
||||
require(module_path..'/src/config')
|
||||
_G.Ranking = nil
|
||||
|
||||
function Ranking:on_init()
|
||||
if loaded_modules.Server then verbose('ExpGamingCore.Server is installed; Loading server src') require(module_path..'/src/server') end
|
||||
end
|
||||
|
||||
function Ranking:on_post()
|
||||
-- other modules can creat ranks during init and this will then set up the meta data
|
||||
-- sets up the power system, the lower the power the closer to root, root is 0
|
||||
-- there must be a rank with is_root flag set and one rank with is_default flag set, if multiple found then first found is used
|
||||
local root = Ranking.get_rank(Ranking.meta.root)
|
||||
|
||||
@@ -461,8 +461,8 @@ script.on_event(-2,function(event)
|
||||
for uuid,thread in pairs(Server.threads) do setmetatable(thread,{__index=Server._thread}) end
|
||||
end)
|
||||
|
||||
Server.on_init=function(self)
|
||||
if loaded_modules.commands then require(module_path..'/src/commands') end
|
||||
function Server:on_init()
|
||||
if loaded_modules.commands then verbose('ExpGamingCore.Commands is installed; Loading commands src') require(module_path..'/src/commands') end
|
||||
end
|
||||
|
||||
return Server
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
--- Description - A small description that will be displayed on the doc
|
||||
--- Adds a thread system and event listening and a admin bypass (recommend to disable /c and use optional /interface)
|
||||
-- @submodule ExpGamingCore.Server
|
||||
-- @alias Server
|
||||
-- @author Cooldude2606
|
||||
|
||||
@@ -292,11 +292,12 @@ script.on_event('on_tick',function(event)
|
||||
end)
|
||||
|
||||
function Sync:on_init()
|
||||
-- updates installed mods
|
||||
if loaded_modules.Gui then verbose('ExpGamingCore.Gui is installed; Loading gui src') require(module_path..'/src/gui') end
|
||||
if loaded_modules.Ranking then verbose('ExpGamingCore.Ranking is installed; Loading ranking src') require(module_path..'/src/ranking') end
|
||||
end
|
||||
|
||||
function Sync:on_post()
|
||||
Sync.info{mods=table.keys(loaded_modules)}
|
||||
-- optinal dependies
|
||||
if loaded_modules.Gui then verbose('ExpGamingCore.Gui is installed; Loading gui lib') require(module_path..'/src/gui') end
|
||||
if loaded_modules.Ranking then verbose('ExpGamingCore.Ranking is installed; Loading ranking lib') require(module_path..'/src/ranking') end
|
||||
end
|
||||
|
||||
return Sync
|
||||
@@ -41,7 +41,7 @@ script.on_event('rank_change',function(event)
|
||||
local rank = Ranking.get_rank(event.new_rank)
|
||||
local player = Game.get_player(event)
|
||||
local by_player_name = Game.get_player(event.by_player_index) or '<server>'
|
||||
local global = global('Ranking')
|
||||
local global = global.Ranking
|
||||
if rank.group.name == 'Jail' and global.last_change ~= player.name then
|
||||
Sync.emit_embeded{
|
||||
title='Player Jail',
|
||||
|
||||
@@ -154,6 +154,130 @@ function ExpLib.gui_tree(root)
|
||||
return tree
|
||||
end
|
||||
|
||||
--- Extents the table class
|
||||
-- @type table
|
||||
-- @alias table
|
||||
|
||||
--- Returns a value in a form able to be read as a value, any value to string
|
||||
-- @usage table.val_to_str{a='foo'} -- return '"foo"'
|
||||
-- @param v value to convert
|
||||
-- @treturn string the converted value
|
||||
function table.val_to_str(v)
|
||||
if "string" == type( v ) then
|
||||
v = string.gsub(v,"\n","\\n")
|
||||
if string.match(string.gsub(v,"[^'\"]",""),'^"+$') then
|
||||
return "'"..v.."'"
|
||||
end
|
||||
return '"'..string.gsub(v,'"', '\\"' )..'"'
|
||||
else
|
||||
return "table" == type( v) and table.tostring(v) or
|
||||
"function" == type(v) and '"cant-display-function"' or
|
||||
"userdata" == type(v) and '"cant-display-userdata"' or
|
||||
tostring(v)
|
||||
end
|
||||
end
|
||||
|
||||
--- Returns a value in a form able to be read as a key, any key to string
|
||||
-- @usage table.val_to_str{a='foo'} -- return '["a"]'
|
||||
-- @param k key to convert
|
||||
-- @treturn string the converted key
|
||||
function table.key_to_str (k)
|
||||
if "string" == type(k) and string.match(k,"^[_%player][_%player%d]*$") then
|
||||
return k
|
||||
else
|
||||
return "["..table.val_to_str(k).."]"
|
||||
end
|
||||
end
|
||||
|
||||
--- Returns a table in a form able to be read as a table
|
||||
-- @usage table.tostring{k1='foo',k2='bar'} -- return '{["k1"]="foo",["k2"]="bar"}'
|
||||
-- @tparam table tbl table to convert
|
||||
-- @treturn string the converted table
|
||||
function table.tostring(tbl)
|
||||
local result, done = {}, {}
|
||||
for k, v in ipairs(tbl) do
|
||||
table.insert(result,table.val_to_str(v))
|
||||
done[k] = true
|
||||
end
|
||||
for k, v in pairs(tbl) do
|
||||
if not done[k] then
|
||||
table.insert(result,
|
||||
table.key_to_str(k).."="..table.val_to_str(v))
|
||||
end
|
||||
end
|
||||
return "{"..table.concat(result,",") .."}"
|
||||
end
|
||||
|
||||
--- Simmilar to table.tostring but converts a lua table to a json one
|
||||
-- @usage talbe.json{k1='foo',k2='bar'} -- return '{"k1":"foo","k2":"bar"}'
|
||||
-- @tparam table lua_table the table to convert
|
||||
-- @treturn string the table in a json format
|
||||
function table.json(lua_table)
|
||||
local result, done, only_indexs = {}, {}, true
|
||||
for key,value in ipairs(lua_table) do
|
||||
done[key] = true
|
||||
if type(value) == 'table' then table.insert(result,table.json(value,true))
|
||||
elseif type(value) == 'string' then table.insert(result,'"'..value..'"')
|
||||
elseif type(value) == 'number' then table.insert(result,value)
|
||||
elseif type(value) == 'boolean' then table.insert(result,tostring(value))
|
||||
else table.insert(result,'null')
|
||||
end
|
||||
end
|
||||
for key,value in pairs(lua_table) do
|
||||
if not done[key] then
|
||||
only_indexs = false
|
||||
if type(value) == 'table' then table.insert(result,'"'..key..'":'..table.json(value,true))
|
||||
elseif type(value) == 'string' then table.insert(result,'"'..key..'":"'..value..'"')
|
||||
elseif type(value) == 'number' then table.insert(result,'"'..key..'":'..value)
|
||||
elseif type(value) == 'boolean' then table.insert(result,'"'..key..'":'..tostring(value))
|
||||
else table.insert(result,'"'..key..'":null')
|
||||
end
|
||||
end
|
||||
end
|
||||
if only_indexs then return "["..table.concat(result,",").."]"
|
||||
else return "{"..table.concat(result,",").."}"
|
||||
end
|
||||
end
|
||||
|
||||
--- Returns the closest match to a key
|
||||
-- @usage table.autokey({foo=1,bar=2},'f') -- return 1
|
||||
-- @tparam table tbl the table that will be searched
|
||||
-- @tparam string str the string that will be looked for in the keys
|
||||
function table.autokey(tbl,str)
|
||||
local _return = {}
|
||||
for key,value in pairs(tbl) do
|
||||
if string.contains(string.lower(key),string.lower(str)) then table.insert(_return,value) end
|
||||
end
|
||||
return _return[1] or false
|
||||
end
|
||||
|
||||
--- Returns the list is a sorted way that would be expected by people (this is by key)
|
||||
-- @usage tbl = table.alphanumsort(tbl)
|
||||
-- @tparam table tbl the table to be sorted
|
||||
-- @treturn table the sorted table
|
||||
function table.alphanumsort(tbl)
|
||||
local o = table.keys(tbl)
|
||||
local function padnum(d) local dec, n = string.match(d, "(%.?)0*(.+)")
|
||||
return #dec > 0 and ("%.12f"):format(d) or ("%s%03d%s"):format(dec, #n, n) end
|
||||
table.sort(o, function(a,b)
|
||||
return tostring(a):gsub("%.?%d+",padnum)..("%3d"):format(#b)
|
||||
< tostring(b):gsub("%.?%d+",padnum)..("%3d"):format(#a) end)
|
||||
local _tbl = {}
|
||||
for _,k in pairs(o) do _tbl[k] = tbl[k] end
|
||||
return _tbl
|
||||
end
|
||||
|
||||
--- Returns the list is a sorted way that would be expected by people (this is by key) (faster alterative than above)
|
||||
-- @usage tbl = table.alphanumsort(tbl)
|
||||
-- @tparam table tbl the table to be sorted
|
||||
-- @treturn table the sorted table
|
||||
function table.keysort(tbl)
|
||||
local o = table.keys(tbl,true)
|
||||
local _tbl = {}
|
||||
for _,k in pairs(o) do _tbl[k] = tbl[k] end
|
||||
return _tbl
|
||||
end
|
||||
|
||||
-- bypasses the module sandbox and places functions into _G
|
||||
ExpLib:unpack_to_G()
|
||||
return ExpLib
|
||||
@@ -394,128 +394,4 @@ function table.arr_to_bool(tbl)
|
||||
end
|
||||
end
|
||||
return newtbl
|
||||
end
|
||||
|
||||
-- Any thing below here i (cooldude2606) have added and was not here by default
|
||||
--- Returns a value in a form able to be read as a value
|
||||
-- @usage local a = 'value'
|
||||
-- table.val_to_str(a) -- return '"value"'
|
||||
-- @param v value to convert
|
||||
-- @treturn string the converted value
|
||||
function table.val_to_str(v)
|
||||
if "string" == type( v ) then
|
||||
v = string.gsub(v,"\n","\\n")
|
||||
if string.match(string.gsub(v,"[^'\"]",""),'^"+$') then
|
||||
return "'"..v.."'"
|
||||
end
|
||||
return '"'..string.gsub(v,'"', '\\"' )..'"'
|
||||
else
|
||||
return "table" == type( v) and table.tostring(v) or
|
||||
"function" == type(v) and '"cant-display-function"' or
|
||||
"userdata" == type(v) and '"cant-display-userdata"' or
|
||||
tostring(v)
|
||||
end
|
||||
end
|
||||
|
||||
--- Returns a value in a form able to be read as a key
|
||||
-- @usage local a = 'key'
|
||||
-- table.key_to_str(a) -- return '["key"]'
|
||||
-- @param k key to convert
|
||||
-- @treturn string the converted key
|
||||
function table.key_to_str (k)
|
||||
if "string" == type(k) and string.match(k,"^[_%player][_%player%d]*$") then
|
||||
return k
|
||||
else
|
||||
return "["..table.val_to_str(k).."]"
|
||||
end
|
||||
end
|
||||
|
||||
--- Returns a table in a form able to be read as a table
|
||||
-- @usage local a = {k1='foo',k2='bar'}
|
||||
-- table.tostring(a) -- return '{["k1"]="foo",["k2"]="bar"}'
|
||||
-- @tparam table tbl table to convert
|
||||
-- @treturn string the converted table
|
||||
function table.tostring(tbl)
|
||||
local result, done = {}, {}
|
||||
for k, v in ipairs(tbl) do
|
||||
table.insert(result,table.val_to_str(v))
|
||||
done[k] = true
|
||||
end
|
||||
for k, v in pairs(tbl) do
|
||||
if not done[k] then
|
||||
table.insert(result,
|
||||
table.key_to_str(k).."="..table.val_to_str(v))
|
||||
end
|
||||
end
|
||||
return "{"..table.concat(result,",") .."}"
|
||||
end
|
||||
|
||||
--- Simmilar to table.tostring but converts a lua table to a json one
|
||||
-- @usage local a = {k1='foo',k2='bar'}
|
||||
-- talbe.json(a) -- return '{"k1":"foo","k2":"bar"}'
|
||||
-- @tparam table lua_table the table to convert
|
||||
-- @treturn string the table in a json format
|
||||
function table.json(lua_table)
|
||||
local result, done, only_indexs = {}, {}, true
|
||||
for key,value in ipairs(lua_table) do
|
||||
done[key] = true
|
||||
if type(value) == 'table' then table.insert(result,table.json(value,true))
|
||||
elseif type(value) == 'string' then table.insert(result,'"'..value..'"')
|
||||
elseif type(value) == 'number' then table.insert(result,value)
|
||||
elseif type(value) == 'boolean' then table.insert(result,tostring(value))
|
||||
else table.insert(result,'null')
|
||||
end
|
||||
end
|
||||
for key,value in pairs(lua_table) do
|
||||
if not done[key] then
|
||||
only_indexs = false
|
||||
if type(value) == 'table' then table.insert(result,'"'..key..'":'..table.json(value,true))
|
||||
elseif type(value) == 'string' then table.insert(result,'"'..key..'":"'..value..'"')
|
||||
elseif type(value) == 'number' then table.insert(result,'"'..key..'":'..value)
|
||||
elseif type(value) == 'boolean' then table.insert(result,'"'..key..'":'..tostring(value))
|
||||
else table.insert(result,'"'..key..'":null')
|
||||
end
|
||||
end
|
||||
end
|
||||
if only_indexs then return "["..table.concat(result,",").."]"
|
||||
else return "{"..table.concat(result,",").."}"
|
||||
end
|
||||
end
|
||||
|
||||
--- Returns the closest match to a key
|
||||
-- @usage tbl = {foo=1,bar=2}
|
||||
-- table.autokey(tbl,'f') -- return 1
|
||||
function table.autokey(tbl,str)
|
||||
local _return = {}
|
||||
for key,value in pairs(tbl) do
|
||||
if string.contains(string.lower(key),string.lower(str)) then table.insert(_return,value) end
|
||||
end
|
||||
return _return[1] or false
|
||||
end
|
||||
|
||||
--- Returns the list is a sorted way that would be expected by people (this is by key)
|
||||
-- @usage tbl = table.alphanumsort(tbl)
|
||||
-- @tparam table tbl the table to be sorted
|
||||
-- @treturn table the sorted table
|
||||
function table.alphanumsort(tbl)
|
||||
local o = table.keys(tbl)
|
||||
local function padnum(d) local dec, n = string.match(d, "(%.?)0*(.+)")
|
||||
return #dec > 0 and ("%.12f"):format(d) or ("%s%03d%s"):format(dec, #n, n) end
|
||||
table.sort(o, function(a,b)
|
||||
return tostring(a):gsub("%.?%d+",padnum)..("%3d"):format(#b)
|
||||
< tostring(b):gsub("%.?%d+",padnum)..("%3d"):format(#a) end)
|
||||
local _tbl = {}
|
||||
for _,k in pairs(o) do _tbl[k] = tbl[k] end
|
||||
return _tbl
|
||||
end
|
||||
|
||||
--- Returns the list is a sorted way that would be expected by people (this is by key) (faster alterative than above)
|
||||
-- @usage tbl = table.alphanumsort(tbl)
|
||||
-- @tparam table tbl the table to be sorted
|
||||
-- @treturn table the sorted table
|
||||
function table.keysort(tbl)
|
||||
local o = table.keys(tbl,true)
|
||||
local _tbl = {}
|
||||
for _,k in pairs(o) do _tbl[k] = tbl[k] end
|
||||
return _tbl
|
||||
end
|
||||
@@ -11,7 +11,7 @@ return {
|
||||
['string']='/modules/FactorioStdLib/String',
|
||||
['Ranking']='/modules/ExpGamingCore/Ranking',
|
||||
['commands']='/modules/ExpGamingCore/Commands',
|
||||
--['Gui']='/modules/ExpGamingCore/Gui',
|
||||
['Gui']='/modules/ExpGamingCore/Gui',
|
||||
['Server']='/modules/ExpGamingCore/Server',
|
||||
['Sync']='/modules/ExpGamingCore/Sync',
|
||||
}
|
||||
Reference in New Issue
Block a user