diff --git a/README.md b/README.md
index 2c9d02e7..8ff71f05 100644
--- a/README.md
+++ b/README.md
@@ -44,7 +44,7 @@ Explosive Gaming (often ExpGaming) is a server hosting community with a strong f
## Contributing
-All are welcome to make pull requests and issues for this scenario, if you are in any doubt please ask someone in our [discord]. If you do not know lua and don't feel like learning you can always make a [feature request]. Please keep in mind while making code changes:
+All are welcome to make pull requests and issues for this scenario, if you are in any doubt please ask someone in our [discord]. If you do not know lua and don't feel like learning you can always make a [feature request]. All our docs can be found [here][docs]. Please keep in mind while making code changes:
* New features should have the branch names: `feature/feature-name`
* New features are merged into `dev` after it has been completed.
@@ -111,6 +111,7 @@ All are welcome to make pull requests and issues for this scenario, if you are i
The Explosive Gaming codebase is licensed under the [GNU General Public License v3.0](LICENSE)
+[docs]: https://explosivegaming.github.io/scenario/
[issues]: https://github.com/explosivegaming/scenario/issues/new/choose
[website]: https://explosivegaming.nl
[discord]: https://discord.explosivegaming.nl
diff --git a/config/_file_loader.lua b/config/_file_loader.lua
index c4a5bba6..e9be5b99 100644
--- a/config/_file_loader.lua
+++ b/config/_file_loader.lua
@@ -39,12 +39,12 @@ return {
'modules.addons.discord-alerts',
'modules.addons.chat-reply',
-- GUI
- 'modules.gui.rocket-info',
- 'modules.gui.science-info',
- 'modules.gui.warp-list',
- 'modules.gui.task-list',
- 'modules.gui.player-list',
- 'modules.commands.debug',
+ --'modules.gui.rocket-info',
+ --'modules.gui.science-info',
+ --'modules.gui.warp-list',
+ --'modules.gui.task-list',
+ --'modules.gui.player-list',
+ --'modules.commands.debug',
-- Config Files
'config.expcore-commands.auth_admin', -- commands tagged with admin_only are blocked for non admins
'config.expcore-commands.auth_roles', -- commands must be allowed via the role config
diff --git a/docs/addons/Advanced-Start.html b/docs/addons/Advanced-Start.html
index 0b56fc11..99ffc5b4 100644
--- a/docs/addons/Advanced-Start.html
+++ b/docs/addons/Advanced-Start.html
@@ -74,6 +74,7 @@
+
@@ -348,7 +349,7 @@
generated by LDoc
- Last updated 2019-08-09 18:11:22 UTC
+ Last updated 2019-09-22 17:34:57 UTC
diff --git a/docs/addons/Chat-Popups.html b/docs/addons/Chat-Popups.html
index 75114dcc..b06d2672 100644
--- a/docs/addons/Chat-Popups.html
+++ b/docs/addons/Chat-Popups.html
@@ -74,6 +74,7 @@
+
@@ -349,7 +350,7 @@
generated by LDoc
- Last updated 2019-08-09 18:11:22 UTC
+ Last updated 2019-09-22 17:34:57 UTC
diff --git a/docs/addons/Chat-Reply.html b/docs/addons/Chat-Reply.html
index be18394a..d45ea3c6 100644
--- a/docs/addons/Chat-Reply.html
+++ b/docs/addons/Chat-Reply.html
@@ -74,6 +74,7 @@
+
@@ -376,7 +377,7 @@
generated by LDoc
- Last updated 2019-08-09 18:11:22 UTC
+ Last updated 2019-09-22 17:34:57 UTC
diff --git a/docs/addons/Compilatron.html b/docs/addons/Compilatron.html
index 3ad91922..6eb7d3fe 100644
--- a/docs/addons/Compilatron.html
+++ b/docs/addons/Compilatron.html
@@ -75,6 +75,7 @@
+
@@ -585,7 +586,7 @@
generated by LDoc
- Last updated 2019-08-09 18:11:22 UTC
+ Last updated 2019-09-22 17:34:57 UTC
diff --git a/docs/addons/Damage-Popups.html b/docs/addons/Damage-Popups.html
index 42cd4094..95607966 100644
--- a/docs/addons/Damage-Popups.html
+++ b/docs/addons/Damage-Popups.html
@@ -74,6 +74,7 @@
+
@@ -349,7 +350,7 @@
generated by LDoc
- Last updated 2019-08-09 18:11:22 UTC
+ Last updated 2019-09-22 17:34:57 UTC
diff --git a/docs/addons/Death-Logger.html b/docs/addons/Death-Logger.html
index 01b1f797..3ab0419f 100644
--- a/docs/addons/Death-Logger.html
+++ b/docs/addons/Death-Logger.html
@@ -74,6 +74,7 @@
+
@@ -404,7 +405,7 @@
generated by LDoc
- Last updated 2019-08-09 18:11:22 UTC
+ Last updated 2019-09-22 17:34:57 UTC
diff --git a/docs/addons/Discord-Alerts.html b/docs/addons/Discord-Alerts.html
index cce518e8..7e7065bc 100644
--- a/docs/addons/Discord-Alerts.html
+++ b/docs/addons/Discord-Alerts.html
@@ -74,6 +74,7 @@
+
@@ -460,7 +461,7 @@
generated by LDoc
- Last updated 2019-08-09 18:11:22 UTC
+ Last updated 2019-09-22 17:34:57 UTC
diff --git a/docs/addons/Player-Colours.html b/docs/addons/Player-Colours.html
index d17bb676..e2995d38 100644
--- a/docs/addons/Player-Colours.html
+++ b/docs/addons/Player-Colours.html
@@ -74,6 +74,7 @@
+
@@ -404,7 +405,7 @@
generated by LDoc
- Last updated 2019-08-09 18:11:22 UTC
+ Last updated 2019-09-22 17:34:57 UTC
diff --git a/docs/addons/Pollution-Grading.html b/docs/addons/Pollution-Grading.html
index bfc08f0d..f257ab61 100644
--- a/docs/addons/Pollution-Grading.html
+++ b/docs/addons/Pollution-Grading.html
@@ -74,6 +74,7 @@
+
@@ -320,7 +321,7 @@
generated by LDoc
- Last updated 2019-08-09 18:11:22 UTC
+ Last updated 2019-09-22 17:34:57 UTC
diff --git a/docs/addons/Scorched-Earth.html b/docs/addons/Scorched-Earth.html
index 09d37fe9..6f6fc337 100644
--- a/docs/addons/Scorched-Earth.html
+++ b/docs/addons/Scorched-Earth.html
@@ -74,6 +74,7 @@
+
@@ -404,7 +405,7 @@
generated by LDoc
- Last updated 2019-08-09 18:11:22 UTC
+ Last updated 2019-09-22 17:34:57 UTC
diff --git a/docs/addons/Spawn-Area.html b/docs/addons/Spawn-Area.html
index 3ba5ee0d..b2b11a94 100644
--- a/docs/addons/Spawn-Area.html
+++ b/docs/addons/Spawn-Area.html
@@ -74,6 +74,7 @@
+
@@ -376,7 +377,7 @@
generated by LDoc
- Last updated 2019-08-09 18:11:22 UTC
+ Last updated 2019-09-22 17:34:57 UTC
diff --git a/docs/commands/Admin-Chat.html b/docs/commands/Admin-Chat.html
index e8b3303d..aafc0e4e 100644
--- a/docs/commands/Admin-Chat.html
+++ b/docs/commands/Admin-Chat.html
@@ -84,6 +84,7 @@
+
@@ -388,7 +389,7 @@
generated by LDoc
- Last updated 2019-08-09 18:11:22 UTC
+ Last updated 2019-09-22 17:34:57 UTC
diff --git a/docs/commands/Bonus.html b/docs/commands/Bonus.html
index 4b41076e..9db97cf7 100644
--- a/docs/commands/Bonus.html
+++ b/docs/commands/Bonus.html
@@ -84,6 +84,7 @@
+
@@ -500,7 +501,7 @@
generated by LDoc
- Last updated 2019-08-09 18:11:22 UTC
+ Last updated 2019-09-22 17:34:57 UTC
diff --git a/docs/commands/Cheat-Mode.html b/docs/commands/Cheat-Mode.html
index cb0d0a09..1e4cc198 100644
--- a/docs/commands/Cheat-Mode.html
+++ b/docs/commands/Cheat-Mode.html
@@ -84,6 +84,7 @@
+
@@ -361,7 +362,7 @@
generated by LDoc
- Last updated 2019-08-09 18:11:22 UTC
+ Last updated 2019-09-22 17:34:57 UTC
diff --git a/docs/commands/Clear-Inventory.html b/docs/commands/Clear-Inventory.html
index 27f45940..03e6c886 100644
--- a/docs/commands/Clear-Inventory.html
+++ b/docs/commands/Clear-Inventory.html
@@ -84,6 +84,7 @@
+
@@ -388,7 +389,7 @@
generated by LDoc
- Last updated 2019-08-09 18:11:22 UTC
+ Last updated 2019-09-22 17:34:57 UTC
diff --git a/docs/commands/Debug.html b/docs/commands/Debug.html
index e2f78d24..edfcdbb1 100644
--- a/docs/commands/Debug.html
+++ b/docs/commands/Debug.html
@@ -84,6 +84,7 @@
+
@@ -365,7 +366,7 @@
generated by LDoc
- Last updated 2019-08-09 18:11:22 UTC
+ Last updated 2019-09-22 17:34:57 UTC
diff --git a/docs/commands/Find.html b/docs/commands/Find.html
index c727cd0e..586d8d34 100644
--- a/docs/commands/Find.html
+++ b/docs/commands/Find.html
@@ -84,6 +84,7 @@
+
@@ -360,7 +361,7 @@
generated by LDoc
- Last updated 2019-08-09 18:11:22 UTC
+ Last updated 2019-09-22 17:34:57 UTC
diff --git a/docs/commands/Help.html b/docs/commands/Help.html
index d5178346..25a8f115 100644
--- a/docs/commands/Help.html
+++ b/docs/commands/Help.html
@@ -84,6 +84,7 @@
+
@@ -404,7 +405,7 @@
generated by LDoc
- Last updated 2019-08-09 18:11:22 UTC
+ Last updated 2019-09-22 17:34:57 UTC
diff --git a/docs/commands/Home.html b/docs/commands/Home.html
index a1ba8bce..e88d2da7 100644
--- a/docs/commands/Home.html
+++ b/docs/commands/Home.html
@@ -84,6 +84,7 @@
+
@@ -458,7 +459,7 @@
generated by LDoc
- Last updated 2019-08-09 18:11:22 UTC
+ Last updated 2019-09-22 17:34:57 UTC
diff --git a/docs/commands/Interface.html b/docs/commands/Interface.html
index c38850c0..2cf6091a 100644
--- a/docs/commands/Interface.html
+++ b/docs/commands/Interface.html
@@ -84,6 +84,7 @@
+
@@ -416,7 +417,7 @@
generated by LDoc
- Last updated 2019-08-09 18:11:22 UTC
+ Last updated 2019-09-22 17:34:57 UTC
diff --git a/docs/commands/Jail.html b/docs/commands/Jail.html
index 2f087f4c..1d41e418 100644
--- a/docs/commands/Jail.html
+++ b/docs/commands/Jail.html
@@ -84,6 +84,7 @@
+
@@ -611,7 +612,7 @@
generated by LDoc
- Last updated 2019-08-09 18:11:22 UTC
+ Last updated 2019-09-22 17:34:57 UTC
diff --git a/docs/commands/Kill.html b/docs/commands/Kill.html
index 33cd787e..6b7e21d8 100644
--- a/docs/commands/Kill.html
+++ b/docs/commands/Kill.html
@@ -84,6 +84,7 @@
+
@@ -389,7 +390,7 @@
generated by LDoc
- Last updated 2019-08-09 18:11:22 UTC
+ Last updated 2019-09-22 17:34:57 UTC
diff --git a/docs/commands/Me.html b/docs/commands/Me.html
index ee42acca..a071c0c1 100644
--- a/docs/commands/Me.html
+++ b/docs/commands/Me.html
@@ -84,6 +84,7 @@
+
@@ -360,7 +361,7 @@
generated by LDoc
- Last updated 2019-08-09 18:11:22 UTC
+ Last updated 2019-09-22 17:34:57 UTC
diff --git a/docs/commands/Rainbow.html b/docs/commands/Rainbow.html
index b7f2a851..dc82cc79 100644
--- a/docs/commands/Rainbow.html
+++ b/docs/commands/Rainbow.html
@@ -84,6 +84,7 @@
+
@@ -388,7 +389,7 @@
generated by LDoc
- Last updated 2019-08-09 18:11:22 UTC
+ Last updated 2019-09-22 17:34:57 UTC
diff --git a/docs/commands/Repair.html b/docs/commands/Repair.html
index 19e506ca..29437a17 100644
--- a/docs/commands/Repair.html
+++ b/docs/commands/Repair.html
@@ -83,6 +83,7 @@
+
@@ -321,7 +322,7 @@
generated by LDoc
- Last updated 2019-08-09 18:11:22 UTC
+ Last updated 2019-09-22 17:34:57 UTC
diff --git a/docs/commands/Reports.html b/docs/commands/Reports.html
index c0f17772..65f2d825 100644
--- a/docs/commands/Reports.html
+++ b/docs/commands/Reports.html
@@ -84,6 +84,7 @@
+
@@ -585,7 +586,7 @@
generated by LDoc
- Last updated 2019-08-09 18:11:22 UTC
+ Last updated 2019-09-22 17:34:57 UTC
diff --git a/docs/commands/Roles.html b/docs/commands/Roles.html
index d9a1f285..e0d338c1 100644
--- a/docs/commands/Roles.html
+++ b/docs/commands/Roles.html
@@ -84,6 +84,7 @@
+
@@ -557,7 +558,7 @@
generated by LDoc
- Last updated 2019-08-09 18:11:22 UTC
+ Last updated 2019-09-22 17:34:57 UTC
diff --git a/docs/commands/Spawn.html b/docs/commands/Spawn.html
index bb58d8a9..f8ef4787 100644
--- a/docs/commands/Spawn.html
+++ b/docs/commands/Spawn.html
@@ -84,6 +84,7 @@
+
@@ -389,7 +390,7 @@
generated by LDoc
- Last updated 2019-08-09 18:11:22 UTC
+ Last updated 2019-09-22 17:34:57 UTC
diff --git a/docs/commands/Tag.html b/docs/commands/Tag.html
index 43fab495..ac1dd9e2 100644
--- a/docs/commands/Tag.html
+++ b/docs/commands/Tag.html
@@ -84,6 +84,7 @@
+
@@ -443,7 +444,7 @@
generated by LDoc
- Last updated 2019-08-09 18:11:22 UTC
+ Last updated 2019-09-22 17:34:57 UTC
diff --git a/docs/commands/Teleport.html b/docs/commands/Teleport.html
index 42089cc1..efe6fe04 100644
--- a/docs/commands/Teleport.html
+++ b/docs/commands/Teleport.html
@@ -84,6 +84,7 @@
+
@@ -484,7 +485,7 @@
generated by LDoc
- Last updated 2019-08-09 18:11:22 UTC
+ Last updated 2019-09-22 17:34:57 UTC
diff --git a/docs/commands/Warnings.html b/docs/commands/Warnings.html
index 0bb7d855..4d8a95a6 100644
--- a/docs/commands/Warnings.html
+++ b/docs/commands/Warnings.html
@@ -84,6 +84,7 @@
+
@@ -569,7 +570,7 @@
generated by LDoc
- Last updated 2019-08-09 18:11:22 UTC
+ Last updated 2019-09-22 17:34:57 UTC
diff --git a/docs/config.ld b/docs/config.ld
index f5a7a308..d3b5fe24 100644
--- a/docs/config.ld
+++ b/docs/config.ld
@@ -1,5 +1,5 @@
file = '../'
-dir = '../doc'
+dir = '../docs'
project = 'ExpGaming Scenario'
title = 'ExpGaming Scenario'
description = 'Explosive Gaming\'s server scenario for 0.17'
@@ -10,8 +10,8 @@ not_luadoc = true
no_lua_ref = true
template_escape = ">"
topics = {"../README.md", "../LICENSE"}
-style = '../doc'
-template = '../doc'
+style = '../docs'
+template = '../docs'
no_space_before_args = true
merge=true
@@ -23,8 +23,8 @@ new_type("gui", "Guis", true)
new_type("config", "Configs", true, "Settings")
new_type("dep", "Dependencies", false)
-new_type("element", "Elements", false)
new_type("setting", "Settings", false)
+new_type("element", "Elements", false, "Properties / Events")
new_type("event", "Events", false, "Event Parameters")
new_type("command", "Commands", false, "Command Parameters")
diff --git a/docs/configs/Advanced-Start.html b/docs/configs/Advanced-Start.html
index 46ef69a1..981debc7 100644
--- a/docs/configs/Advanced-Start.html
+++ b/docs/configs/Advanced-Start.html
@@ -89,6 +89,7 @@
+
@@ -506,7 +507,7 @@
generated by LDoc
- Last updated 2019-08-09 18:11:22 UTC
+ Last updated 2019-09-22 17:34:57 UTC
diff --git a/docs/configs/Bonuses.html b/docs/configs/Bonuses.html
index e1806bce..f42ddc42 100644
--- a/docs/configs/Bonuses.html
+++ b/docs/configs/Bonuses.html
@@ -81,6 +81,7 @@
+
@@ -237,7 +238,7 @@
generated by LDoc
- Last updated 2019-08-09 18:11:22 UTC
+ Last updated 2019-09-22 17:34:57 UTC
diff --git a/docs/configs/Chat-Reply.html b/docs/configs/Chat-Reply.html
index c8ef6dfa..37c2a42d 100644
--- a/docs/configs/Chat-Reply.html
+++ b/docs/configs/Chat-Reply.html
@@ -90,6 +90,7 @@
+
@@ -485,7 +486,7 @@
generated by LDoc
- Last updated 2019-08-09 18:11:22 UTC
+ Last updated 2019-09-22 17:34:57 UTC
diff --git a/docs/configs/Commands-Auth-Admin.html b/docs/configs/Commands-Auth-Admin.html
index ffc290aa..48724dfc 100644
--- a/docs/configs/Commands-Auth-Admin.html
+++ b/docs/configs/Commands-Auth-Admin.html
@@ -89,6 +89,7 @@
+
@@ -294,7 +295,7 @@
generated by LDoc
- Last updated 2019-08-09 18:11:22 UTC
+ Last updated 2019-09-22 17:34:57 UTC
diff --git a/docs/configs/Commands-Auth-Roles.html b/docs/configs/Commands-Auth-Roles.html
index 1f3c18d9..dc9614f2 100644
--- a/docs/configs/Commands-Auth-Roles.html
+++ b/docs/configs/Commands-Auth-Roles.html
@@ -89,6 +89,7 @@
+
@@ -320,7 +321,7 @@
generated by LDoc
- Last updated 2019-08-09 18:11:22 UTC
+ Last updated 2019-09-22 17:34:57 UTC
diff --git a/docs/configs/Commands-Auth-Runtime-Disable.html b/docs/configs/Commands-Auth-Runtime-Disable.html
index f68dc361..c68b216a 100644
--- a/docs/configs/Commands-Auth-Runtime-Disable.html
+++ b/docs/configs/Commands-Auth-Runtime-Disable.html
@@ -90,6 +90,7 @@
+
@@ -442,7 +443,7 @@
generated by LDoc
- Last updated 2019-08-09 18:11:22 UTC
+ Last updated 2019-09-22 17:34:57 UTC
diff --git a/docs/configs/Commands-Parse-Roles.html b/docs/configs/Commands-Parse-Roles.html
index d18424fa..f432ec70 100644
--- a/docs/configs/Commands-Parse-Roles.html
+++ b/docs/configs/Commands-Parse-Roles.html
@@ -89,6 +89,7 @@
+
@@ -354,7 +355,7 @@
generated by LDoc
- Last updated 2019-08-09 18:11:22 UTC
+ Last updated 2019-09-22 17:34:57 UTC
diff --git a/docs/configs/Commands-Parse.html b/docs/configs/Commands-Parse.html
index 2f413722..d3c7c295 100644
--- a/docs/configs/Commands-Parse.html
+++ b/docs/configs/Commands-Parse.html
@@ -89,6 +89,7 @@
+
@@ -338,7 +339,7 @@ see ./expcore/commands.lua for more details
generated by LDoc
- Last updated 2019-08-09 18:11:22 UTC
+ Last updated 2019-09-22 17:34:57 UTC
diff --git a/docs/configs/Compilatron.html b/docs/configs/Compilatron.html
index 5bf4b1ba..daeb3b5e 100644
--- a/docs/configs/Compilatron.html
+++ b/docs/configs/Compilatron.html
@@ -89,6 +89,7 @@
+
@@ -354,7 +355,7 @@
generated by LDoc
- Last updated 2019-08-09 18:11:22 UTC
+ Last updated 2019-09-22 17:34:57 UTC
diff --git a/docs/configs/Death-Logger.html b/docs/configs/Death-Logger.html
index 76aec8f5..60c66414 100644
--- a/docs/configs/Death-Logger.html
+++ b/docs/configs/Death-Logger.html
@@ -89,6 +89,7 @@
+
@@ -416,7 +417,7 @@
generated by LDoc
- Last updated 2019-08-09 18:11:22 UTC
+ Last updated 2019-09-22 17:34:57 UTC
diff --git a/docs/configs/Discord-Alerts.html b/docs/configs/Discord-Alerts.html
index 03ca2c6d..6cbff49c 100644
--- a/docs/configs/Discord-Alerts.html
+++ b/docs/configs/Discord-Alerts.html
@@ -81,6 +81,7 @@
+
@@ -237,7 +238,7 @@
generated by LDoc
- Last updated 2019-08-09 18:11:22 UTC
+ Last updated 2019-09-22 17:34:57 UTC
diff --git a/docs/configs/File-Loader.html b/docs/configs/File-Loader.html
index 58c755b1..f83ad879 100644
--- a/docs/configs/File-Loader.html
+++ b/docs/configs/File-Loader.html
@@ -81,6 +81,7 @@
+
@@ -240,7 +241,7 @@
generated by LDoc
- Last updated 2019-08-09 18:11:22 UTC
+ Last updated 2019-09-22 17:34:57 UTC
diff --git a/docs/configs/Permission-Groups.html b/docs/configs/Permission-Groups.html
index 7043ae72..8a41a0bb 100644
--- a/docs/configs/Permission-Groups.html
+++ b/docs/configs/Permission-Groups.html
@@ -89,6 +89,7 @@
+
@@ -295,7 +296,7 @@
generated by LDoc
- Last updated 2019-08-09 18:11:22 UTC
+ Last updated 2019-09-22 17:34:57 UTC
diff --git a/docs/configs/Player-List.html b/docs/configs/Player-List.html
index c6e1c748..abbd67bc 100644
--- a/docs/configs/Player-List.html
+++ b/docs/configs/Player-List.html
@@ -90,6 +90,7 @@
+
@@ -812,7 +813,7 @@
generated by LDoc
- Last updated 2019-08-09 18:11:22 UTC
+ Last updated 2019-09-22 17:34:57 UTC
diff --git a/docs/configs/Pollution-Grading.html b/docs/configs/Pollution-Grading.html
index 9eb9892f..55ce2814 100644
--- a/docs/configs/Pollution-Grading.html
+++ b/docs/configs/Pollution-Grading.html
@@ -89,6 +89,7 @@
+
@@ -384,7 +385,7 @@
generated by LDoc
- Last updated 2019-08-09 18:11:22 UTC
+ Last updated 2019-09-22 17:34:57 UTC
diff --git a/docs/configs/Popup-Messages.html b/docs/configs/Popup-Messages.html
index 39690dd2..2a98b0b2 100644
--- a/docs/configs/Popup-Messages.html
+++ b/docs/configs/Popup-Messages.html
@@ -89,6 +89,7 @@
+
@@ -414,7 +415,7 @@
generated by LDoc
- Last updated 2019-08-09 18:11:22 UTC
+ Last updated 2019-09-22 17:34:57 UTC
diff --git a/docs/configs/Preset-Player-Colours.html b/docs/configs/Preset-Player-Colours.html
index 9d37a9a8..5933597f 100644
--- a/docs/configs/Preset-Player-Colours.html
+++ b/docs/configs/Preset-Player-Colours.html
@@ -89,6 +89,7 @@
+
@@ -324,7 +325,7 @@
generated by LDoc
- Last updated 2019-08-09 18:11:22 UTC
+ Last updated 2019-09-22 17:34:57 UTC
diff --git a/docs/configs/Repair.html b/docs/configs/Repair.html
index 8625da88..1c90a44e 100644
--- a/docs/configs/Repair.html
+++ b/docs/configs/Repair.html
@@ -89,6 +89,7 @@
+
@@ -414,7 +415,7 @@
generated by LDoc
- Last updated 2019-08-09 18:11:22 UTC
+ Last updated 2019-09-22 17:34:57 UTC
diff --git a/docs/configs/Rockets.html b/docs/configs/Rockets.html
index 9be2580d..4478572f 100644
--- a/docs/configs/Rockets.html
+++ b/docs/configs/Rockets.html
@@ -89,6 +89,7 @@
+
@@ -834,7 +835,7 @@
generated by LDoc
- Last updated 2019-08-09 18:11:22 UTC
+ Last updated 2019-09-22 17:34:57 UTC
diff --git a/docs/configs/Roles.html b/docs/configs/Roles.html
index c1aebec6..f503d293 100644
--- a/docs/configs/Roles.html
+++ b/docs/configs/Roles.html
@@ -89,6 +89,7 @@
+
@@ -292,7 +293,7 @@
generated by LDoc
- Last updated 2019-08-09 18:11:22 UTC
+ Last updated 2019-09-22 17:34:57 UTC
diff --git a/docs/configs/Science.html b/docs/configs/Science.html
index d279267e..fc973191 100644
--- a/docs/configs/Science.html
+++ b/docs/configs/Science.html
@@ -89,6 +89,7 @@
+
@@ -354,7 +355,7 @@
generated by LDoc
- Last updated 2019-08-09 18:11:22 UTC
+ Last updated 2019-09-22 17:34:57 UTC
diff --git a/docs/configs/Scorched-Earth.html b/docs/configs/Scorched-Earth.html
index 508bde53..b8e6ad74 100644
--- a/docs/configs/Scorched-Earth.html
+++ b/docs/configs/Scorched-Earth.html
@@ -89,6 +89,7 @@
+
@@ -388,7 +389,7 @@
generated by LDoc
- Last updated 2019-08-09 18:11:22 UTC
+ Last updated 2019-09-22 17:34:57 UTC
diff --git a/docs/configs/Spawn-Area.html b/docs/configs/Spawn-Area.html
index 9b9a9a5a..8ac57876 100644
--- a/docs/configs/Spawn-Area.html
+++ b/docs/configs/Spawn-Area.html
@@ -89,6 +89,7 @@
+
@@ -744,7 +745,7 @@
generated by LDoc
- Last updated 2019-08-09 18:11:22 UTC
+ Last updated 2019-09-22 17:34:57 UTC
diff --git a/docs/configs/Tasks.html b/docs/configs/Tasks.html
index 6072ae03..44ef1e74 100644
--- a/docs/configs/Tasks.html
+++ b/docs/configs/Tasks.html
@@ -89,6 +89,7 @@
+
@@ -384,7 +385,7 @@
generated by LDoc
- Last updated 2019-08-09 18:11:22 UTC
+ Last updated 2019-09-22 17:34:57 UTC
diff --git a/docs/configs/Warnings.html b/docs/configs/Warnings.html
index f3edf5aa..1a874b76 100644
--- a/docs/configs/Warnings.html
+++ b/docs/configs/Warnings.html
@@ -89,6 +89,7 @@
+
@@ -355,7 +356,7 @@
generated by LDoc
- Last updated 2019-08-09 18:11:22 UTC
+ Last updated 2019-09-22 17:34:57 UTC
diff --git a/docs/configs/Warps.html b/docs/configs/Warps.html
index 8800c822..a8b05959 100644
--- a/docs/configs/Warps.html
+++ b/docs/configs/Warps.html
@@ -89,6 +89,7 @@
+
@@ -684,7 +685,7 @@
generated by LDoc
- Last updated 2019-08-09 18:11:22 UTC
+ Last updated 2019-09-22 17:34:57 UTC
diff --git a/docs/control/Jail.html b/docs/control/Jail.html
index 5f68c34b..4e10b7c8 100644
--- a/docs/control/Jail.html
+++ b/docs/control/Jail.html
@@ -73,6 +73,7 @@
+
@@ -1208,7 +1209,7 @@
generated by LDoc
- Last updated 2019-08-09 18:11:22 UTC
+ Last updated 2019-09-22 17:34:57 UTC
diff --git a/docs/control/Production.html b/docs/control/Production.html
index ccfd8f5f..115f41c1 100644
--- a/docs/control/Production.html
+++ b/docs/control/Production.html
@@ -73,6 +73,7 @@
+
@@ -1329,7 +1330,7 @@
generated by LDoc
- Last updated 2019-08-09 18:11:22 UTC
+ Last updated 2019-09-22 17:34:57 UTC
diff --git a/docs/control/Reports.html b/docs/control/Reports.html
index ddcdfb3e..f8c8e04b 100644
--- a/docs/control/Reports.html
+++ b/docs/control/Reports.html
@@ -73,6 +73,7 @@
+
@@ -1110,7 +1111,7 @@
generated by LDoc
- Last updated 2019-08-09 18:11:22 UTC
+ Last updated 2019-09-22 17:34:57 UTC
diff --git a/docs/control/Rockets.html b/docs/control/Rockets.html
index 431f9815..9c23440e 100644
--- a/docs/control/Rockets.html
+++ b/docs/control/Rockets.html
@@ -72,6 +72,7 @@
+
@@ -984,7 +985,7 @@
generated by LDoc
- Last updated 2019-08-09 18:11:22 UTC
+ Last updated 2019-09-22 17:34:57 UTC
diff --git a/docs/control/Tasks.html b/docs/control/Tasks.html
index 7fa706cc..b09d725e 100644
--- a/docs/control/Tasks.html
+++ b/docs/control/Tasks.html
@@ -72,6 +72,7 @@
+
@@ -1039,7 +1040,7 @@
generated by LDoc
- Last updated 2019-08-09 18:11:22 UTC
+ Last updated 2019-09-22 17:34:57 UTC
diff --git a/docs/control/Warnings.html b/docs/control/Warnings.html
index c1ac81e7..e2f72325 100644
--- a/docs/control/Warnings.html
+++ b/docs/control/Warnings.html
@@ -72,6 +72,7 @@
+
@@ -1465,7 +1466,7 @@
generated by LDoc
- Last updated 2019-08-09 18:11:22 UTC
+ Last updated 2019-09-22 17:34:57 UTC
diff --git a/docs/control/Warps.html b/docs/control/Warps.html
index 5fa18a14..1a650f00 100644
--- a/docs/control/Warps.html
+++ b/docs/control/Warps.html
@@ -73,6 +73,7 @@
+
@@ -1413,7 +1414,7 @@
generated by LDoc
- Last updated 2019-08-09 18:11:22 UTC
+ Last updated 2019-09-22 17:34:57 UTC
diff --git a/docs/core/Commands.html b/docs/core/Commands.html
index 683bf908..37d28eb4 100644
--- a/docs/core/Commands.html
+++ b/docs/core/Commands.html
@@ -61,6 +61,7 @@
+
@@ -1972,7 +1973,7 @@
generated by LDoc
- Last updated 2019-08-09 18:11:22 UTC
+ Last updated 2019-09-22 17:34:57 UTC
diff --git a/docs/core/Common-Library.html b/docs/core/Common-Library.html
index 44c6136e..e4c5c30d 100644
--- a/docs/core/Common-Library.html
+++ b/docs/core/Common-Library.html
@@ -57,6 +57,7 @@
+
@@ -357,6 +358,22 @@
format_chat_player_name(player[, raw_string=false]) |
Returns the players name in the players color |
+
+ | get_file_path([offset=0]) |
+ Returns a desync safe file path for the current file |
+
+
+ | array_insert(tbl[, start_index], values) |
+ Much faster method for inserting items into an array |
+
+
+ | table_insert(tbl[, start_index], tbl2) |
+ Much faster method for inserting keys into a table |
+
+
+ | resolve_value(value) |
+ Used to resolve a value that could also be a function returning that value |
+
@@ -2402,6 +2419,318 @@
+
+
+
+
+
+
+
+
+
Returns a desync safe file path for the current file
+
+
+
+
Parameters:
+
+
+
+
+
+
+
+ -
+
+ offset
+
+ :
+
+ (number)
+
+ the offset in the stack to get, 0 is current file
+
+ (default: 0)
+
+
+
+
+
+
+
+
+
Returns:
+
+ -
+ (string)
+ the file path
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Much faster method for inserting items into an array
+
+
+
+
Parameters:
+
+
+
+
+
+
+
+ -
+
+ tbl
+
+ :
+
+ (table)
+
+ the table that will have the values added to it
+
+
+
+
+
+
+
+ -
+
+ start_index
+
+ :
+
+ (number)
+
+ the index at which values will be added, nil means end of the array
+
+ (optional)
+
+
+
+
+
+
+ -
+
+ values
+
+ :
+
+ (table)
+
+ the new values that will be added to the table
+
+
+
+
+
+
+
+
+
+
Returns:
+
+ -
+ (table)
+ the table that was passed as the first argument
+
+
+
+
+
+
+
+
+
+
Usage:
+
local tbl = {}
+local values = {}
+for i = 1,1000 do tbl[i] = i values[i] = i end
+Common.array_insert(tbl,500,values) -- around 0.4ms
+
+
+
+
+
+
+
+
+
+
+
Much faster method for inserting keys into a table
+
+
+
+
Parameters:
+
+
+
+
+
+
+
+ -
+
+ tbl
+
+ :
+
+ (table)
+
+ the table that will have keys added to it
+
+
+
+
+
+
+
+ -
+
+ start_index
+
+ :
+
+ (number)
+
+ the index at which values will be added, nil means end of the array, numbered indexs only
+
+ (optional)
+
+
+
+
+
+
+ -
+
+ tbl2
+
+ :
+
+ (table)
+
+ the table that may contain both string and numbered keys
+
+
+
+
+
+
+
+
+
+
Returns:
+
+ -
+ (table)
+ the table passed as the first argument
+
+
+
+
+
+
+
+
+
+
Usage:
+
local tbl = {}
+local tbl2 = {}
+for i = 1,100 do tbl[i] = i tbl['_'..i] = i tbl2[i] = i tbl2['__'..i] = i end
+Common.table_insert(tbl,50,tbl2)
+
+
+
+
+
+
+
+
+
+
+
Used to resolve a value that could also be a function returning that value
+
+
+
+
Parameters:
+
+
+
+
+
+
+
+ -
+
+ value
+
+ :
+
+ (any)
+
+ the value which you want to test is not nil and if it is a function then call the function
+
+
+
+
+
+
+
+
+
+
Returns:
+
+ -
+ (any)
+ the value given or returned by value if it is a function
+
+
+
+
+
+
+
+
+
+
Usage:
+
local value = Common.resolve_value(self.defaut_value,self)
+
+
@@ -2418,7 +2747,7 @@
generated by LDoc
- Last updated 2019-08-09 18:11:22 UTC
+ Last updated 2019-09-22 17:34:57 UTC
diff --git a/docs/core/Gui.html b/docs/core/Gui.html
index cc61f4e7..67827252 100644
--- a/docs/core/Gui.html
+++ b/docs/core/Gui.html
@@ -41,22 +41,17 @@
Sections
@@ -71,6 +66,7 @@
+
@@ -216,22 +212,17 @@
Jump to Section
@@ -251,11 +242,7 @@
Gui core
- Core Module - Gui
- - This file is used to require all the different elements of the gui module
- - each module has an outline here but for more details see their separate files in ./gui
- - please read the files for more documentation that cant be shown here
- - please note there is a rework planned but not started
+ Core Module - Gui
@@ -263,6 +250,69 @@
+ Usage
+ local button =
+Gui.new_concept() :save_as('button') :new_event('on_click',defines.events.on_gui_click) :new_property('tooltip') :new_property('caption',function(properties,value) properties.caption = value
+ properties.sprite = nil
+ properties.type = 'button'
+end)
+:new_property('sprite',function(properties,value) properties.image = value
+ properties.caption = nil
+ properties.type = 'sprite-button'
+end)
+:define_draw(function(properties,parent,element) if properties.type == 'button' then
+ element = parent.add{
+ type = properties.type,
+ name = properties.name,
+ caption = properties.caption,
+ tooltip = properties.tooltip
+ }
+
+ else
+ element = parent.add{
+ type = properties.type,
+ name = properties.name,
+ sprite = properties.sprite,
+ tooltip = properties.tooltip
+ }
+
+ end
+
+ return element, parent
+end)
+ local custom_button =
+Gui.new_concept('button') :set_caption('Custom Button') :set_tooltip('Only admins can press this button') :on_click(function(event) if not event.player.admin then
+ event.player.print('You must be admin to use this button')
+ end
+end)
+:new_event('on_admin_clicked',defines.events.on_gui_click,function(event) return event.player.admin end)
+:on_admin_clicked(function(event) game.print(event.player.name..' pressed my admin button')
+end)
+ custom_button:draw(game.player.gui.left)
@@ -270,461 +320,69 @@
-
+
- | expcore.gui.core |
+ button |
+ Clickable elements that fire on_gui_click when clicked. |
- | expcore.gui.instances |
+ checkbox |
+ Clickable elements with a cross in the middle that can be turned off or on. |
- | expcore.gui.elements.buttons |
+ dropdown |
+ A drop down list of other elements. |
- | expcore.gui.elements.checkbox |
+ elem_button |
+ A button that lets the player pick one of an: item, entity, tile, or signal similar to the filter-select window. |
- | expcore.gui.elements.dropdown |
+ empty |
+ A empty widget that just exists. |
- | expcore.gui.elements.slider |
+ flow |
+ Invisible containers that lay out children either horizontally or vertically. |
- | expcore.gui.elements.text |
+ frame |
+ Grey semi-transparent boxes that contain other elements. |
- | expcore.gui.elements.elem-button |
+ frame |
+ A piece of text. |
- | expcore.gui.elements.progress-bar |
+ line |
+ A vertical or horizontal line. |
- | expcore.gui.concepts.toolbar |
+ progress_bar |
+ Indicate progress by displaying a partially filled bar. |
- | expcore.gui.concepts.left |
+ scroll |
+ Similar to a flow but includes the ability to show and use scroll bars. |
- | expcore.gui.concepts.center |
+ slider |
+ A number picker. |
- | expcore.gui.concepts.popups |
+ table |
+ An invisible container that lays out children in a specific number of columns. |
-
-
-
-
-
-
-
-
- | expcore.gui.core |
+ text_box |
+ A multi-line text box that supports selection and copy-paste. |
- | expcore.gui.prototype |
-
-
- | expcore.gui.concepts.toolbar |
-
-
- | utils.game |
-
-
- | CenterFrames.get_flow(player) |
- Gets the center flow for a player |
-
-
- | CenterFrames.clear_flow(player) |
- Clears the center flow for a player |
-
-
- | CenterFrames.draw_frame(player, name) |
- Draws the center frame for a player, if already open then will do nothing |
-
-
- | CenterFrames.redraw_frame(player, name) |
- Draws the center frame for a player, if already open then will destroy it and redraw |
-
-
- | CenterFrames.toggle_frame(player, name[, state]) |
- Toggles if the frame is currently open or not, will open if closed and close if open |
-
-
- | CenterFrames.new_frame(permission_name) |
- Creates a new center frame define |
-
-
- | CenterFrames._prototype:set_auto_focus([state=true]) |
- Sets the frame to be the current active gui when opened and closes all other frames |
-
-
- | CenterFrames._prototype:draw_frame(player) |
- Draws this frame to the player, if already open does nothing (will call on_draw to draw to the frame) |
-
-
- | CenterFrames._prototype:redraw_frame(player) |
- Draws this frame to the player, if already open it will remove it and redraw it (will call on_draw to draw to the frame) |
-
-
- | CenterFrames._prototype:toggle_frame(player) |
- Toggles if the frame is open, if open it will close it and if closed it will open it |
-
-
- | CenterFrames._prototype:event_handler([action=update]) |
- Creates an event handler that will trigger one of its functions, use with Event.add |
-
-
-
-
-
-
-
-
-
-
- | expcore.gui.core |
-
-
- | expcore.gui.prototype |
-
-
- | expcore.gui.concepts.toolbar |
-
-
- | expcore.gui.elements.buttons |
-
-
- | mod-gui |
-
-
- | utils.game |
-
-
- | utils.event |
-
-
- | LeftFrames.get_flow(player) |
- Gets the left frame flow for a player |
-
-
- | LeftFrames.get_frame(name, player) |
- Gets one frame from the left flow by its name |
-
-
- | LeftFrames.get_open(player) |
- Gets all open frames for a player, if non are open it will remove the close all button |
-
-
- | LeftFrames.toggle_frame(name, player[, state]) |
- Toggles the visibility of a left frame, or sets its visibility state |
-
-
- | LeftFrames.new_frame(permission_name) |
- Creates a new left frame define |
-
-
- | LeftFrames._prototype:set_open_by_default([state=true]) |
- Sets if the frame is visible when a player joins, can also be a function to return a boolean |
-
-
- | LeftFrames._prototype:set_direction(direction) |
- Sets the direction of the frame, either vertical or horizontal |
-
-
- | LeftFrames._prototype:_internal_draw(player) |
- Creates the gui for the first time, used internally |
-
-
- | LeftFrames._prototype:get_frame(player) |
- Gets the frame for this define from the left frame flow |
-
-
- | LeftFrames._prototype:is_open(player) |
- Returns if the player currently has this define visible |
-
-
- | LeftFrames._prototype:toggle(player) |
- Toggles the visibility of the left frame |
-
-
- | LeftFrames._prototype:update(player) |
- Updates the contents of the left frame, first tries update callback, other wise will clear and redraw |
-
-
- | LeftFrames._prototype:update_all([update_offline=false]) |
- Updates the frame for all players, see update |
-
-
- | LeftFrames._prototype:redraw(player) |
- Redraws the frame by calling on_draw, will always clear the frame |
-
-
- | LeftFrames._prototype:redraw_all([update_offline=false]) |
- Redraws the frame for all players, see redraw |
-
-
- | LeftFrames._prototype:event_handler([action=update]) |
- Creates an event handler that will trigger one of its functions, use with Event.add |
-
-
-
-
-
-
-
-
-
-
- | expcore.gui.core |
-
-
- | expcore.gui.prototype |
-
-
- | utils.game |
-
-
- | utils.event |
-
-
- | expcore.gui.elements.progress-bar |
-
-
- | expcore.gui.elements.buttons |
-
-
- | mod-gui |
-
-
- | resources.color_presets |
-
-
- | utils.global |
-
-
- | PopupFrames.get_flow(player) |
- Gets the left flow that contains the popup frames |
-
-
- | PopupFrames.open(define_name, player[, open_time], ...) |
- Opens a popup for the player, can give the amount of time it is open as well as params for the draw function |
-
-
- | PopupFrames.close_progress |
- Progress bar which when depleted will close the popup frame |
-
-
- | PopupFrames.close_button |
- A button which can be used to close the gui before the timer runs out |
-
-
- | PopupFrames.new_popup([name]) |
- Creates a new popup frame define |
-
-
- | PopupFrames._prototype:set_default_open_time(amount) |
- Sets the default open time for the popup, will be used if non is provided with open |
-
-
- | PopupFrames._prototype:open(player[, open_time], ...) |
- Opens this define for a player, can be given open time and any other params for the draw function |
-
-
-
-
-
-
-
-
-
-
- | expcore.gui.core |
-
-
- | expcore.gui.elements.buttons |
-
-
- | expcore.roles |
-
-
- | utils.event |
-
-
- | utils.game |
-
-
- | mod-gui |
-
-
- | Toolbar.new_button([name]) |
- Adds a new button to the toolbar |
-
-
- | Toolbar.add_button(button) |
- Adds an existing buttton to the toolbar |
-
-
- | Toolbar.update(player) |
- Updates the player's toolbar with an new buttons or expected change in auth return |
-
-
-
-
-
-
-
-
-
-
- | utils.gui |
-
-
- | utils.game |
-
-
- | new_define(prototype[, debug_name]) |
- Used to create new element defines from a class prototype, please use the own given by the class |
-
-
- | get_define(name[, internal]) |
- Gets an element define give the uid, debug name or a copy of the element define |
-
-
- | categorize_by_player(element) |
- A categorize function to be used with add_store, each player has their own value |
-
-
- | categorize_by_force(element) |
- A categorize function to be used with add_store, each force has its own value |
-
-
- | categorize_by_surface(element) |
- A categorize function to be used with add_store, each surface has its own value |
-
-
- | draw(name, element) |
- Draws a copy of the element define to the parent element, see draw_to |
-
-
- | toggle_enabled(element) |
- Will toggle the enabled state of an element |
-
-
- | toggle_visible(element) |
- Will toggle the visiblity of an element |
-
-
- | set_padding(element[, up=0][, down=0][, left=0][, right=0]) |
- Sets the padding for a gui element |
-
-
- | set_padding_style(style[, up=0][, down=0][, left=0][, right=0]) |
- Sets the padding for a gui style |
-
-
- | create_alignment(element[, name][, horizontal_align='right'][, vertical_align='center']) |
- Allows the creation of an alignment flow to place elements into |
-
-
- | destroy_if_valid(element) |
- Destroies an element but tests for it being present and valid first |
-
-
- | create_scroll_table(element, table_size, maximal_height[, name='scroll']) |
- Creates a scroll area with a table inside, table can be any size |
-
-
- | create_header(element, caption[, tooltip][, right_align][, name='header']) |
- Creates a header section with a label and button area |
-
-
-
-
-
-
-
-
-
-
- | mod-gui |
-
-
- | expcore.gui.core |
-
-
- | expcore.gui.prototype |
-
-
- | Button.new_button([name]) |
- Creates a new button element define |
-
-
- | Button._prototype:set_sprites(sprite[, hovered_sprite][, clicked_sprite]) |
- Adds sprites to a button making it a sprite button |
-
-
- | Button._prototype:set_click_filter(filter[, ...]) |
- Adds a click / mouse button filter to the button |
-
-
- | Button._prototype:set_key_filter(filter[, ...]) |
- Adds a control key filter to the button |
-
-
-
-
-
-
-
-
-
-
- | expcore.gui.core |
-
-
- | expcore.gui.prototype |
-
-
- | expcore.store |
-
-
- | utils.game |
-
-
- | Checkbox.new_checkbox([name]) |
- Creates a new checkbox element define |
-
-
- | Checkbox.new_radiobutton([name]) |
- Creates a new radiobutton element define, has all functions checkbox has |
-
-
- | Checkbox._prototype_radiobutton:add_as_option(option_set, option_name) |
- Adds this radiobutton to be an option in the given option set (only one can be true at a time) |
-
-
- | Checkbox._prototype_radiobutton:get_store(category, internal) |
- Gets the stored value of the radiobutton or the option set if present |
-
-
- | Checkbox._prototype_radiobutton:set_store(category, value, internal) |
- Sets the stored value of the radiobutton or the option set if present |
-
-
- | Checkbox.new_option_set(name, callback, categorize) |
- Registers a new option set that can be linked to radiobuttons (only one can be true at a time) |
-
-
- | Checkbox.draw_option_set(name, element) |
- Draws all radiobuttons that are part of an option set at once (Gui.draw will not work) |
-
-
- | Checkbox.reset_radiobuttons(element[, exclude][, recursive=false]) |
- Sets all radiobutton in a element to false (unless excluded) and can act recursively |
+ text_field |
+ Boxes of text the user can type in. |
@@ -735,70 +393,16 @@
- | expcore.gui.core |
+ set_dropdown_value(element, value) |
+ Selects the index of a dropdown with this value |
- | expcore.gui.prototype |
+ get_dropdown_value(element) |
+ Gets the selected item value of a dropdown |
- | utils.game |
-
-
- | Dropdown.new_dropdown([name]) |
- Creates a new dropdown element define |
-
-
- | Dropdown.new_list_box([name]) |
- Creates a new list box element define |
-
-
- | Dropdown._prototype:new_static_options(options[, ...], the) |
- Adds new static options to the dropdown which will trigger the general callback |
-
-
- | Dropdown._prototype:new_dynamic_options(callback) |
- Adds a callback which should return a table of values to be added as options for the dropdown (appended after static options) |
-
-
- | Dropdown._prototype:add_option_callback(option, callback) |
- Adds a case specific callback which will only run when that option is selected (general case still triggered) |
-
-
- | Dropdown.select_value(element, value) |
- Selects the option from a dropdown or list box given the value rather than key |
-
-
- | Dropdown.get_selected_value(element) |
- Returns the currently selected value rather than index |
-
-
-
-
-
-
-
-
-
-
- | expcore.gui.core |
-
-
- | expcore.gui.prototype |
-
-
- | utils.game |
-
-
- | ElemButton.new_elem_button([name]) |
- Creates a new elem button element define |
-
-
- | ElemButton._prototype.set_type |
- Sets the type of the elem button, the type is required so this must be called at least once |
-
-
- | ElemButton._prototype:set_default(value) |
- Sets the default value for the elem button, this may be a function or a string |
+ add_dropdown_items(element[, start_index], new_items) |
+ Adds the given items into the list of items for this dropdown |
@@ -809,306 +413,240 @@
- | expcore.gui.core |
+ progress_bar:increment(element[, amount=1]) |
+ Will increase the progress of a progress bar based on this concept, if the concept has an instance store then element acts as the category, if you have a combined store it will NOT update all instances |
- | expcore.gui.prototype |
+ progress_bar:decrement(element[, amount=1]) |
+ Will decrease the progress of a progress bar based on this concept, if the concept has an instance store then element acts as the category, if you have a combined store it will NOT update all instances |
- | utils.global |
+ progress_bar:reset(element) |
+ Resets the progress back to 0% for this element, if the concept has an instance store then element acts as the category, if you have a combined store it will NOT update all instances |
- | utils.game |
+ increment_progress_bar(element[, amount=0.01]) |
+ Increment any progress bar by the given percentage |
- | ProgressBar.set_maximum(element, amount) |
- Sets the maximum value that represents the end value of the progress bar |
-
-
- | ProgressBar.increment(element[, amount=1]) |
- Increases the value of the progressbar, if a define is given all of its instances have incremented |
-
-
- | ProgressBar.decrement(element[, amount=1]) |
- Decreases the value of the progressbar, if a define is given all of its instances have decremented |
-
-
- | ProgressBar.new_progressbar([name]) |
- Creates a new progressbar element define |
-
-
- | ProgressBar._prototype:set_default_maximum(amount) |
- Sets the maximum value that represents the end value of the progress bar |
-
-
- | ProgressBar._prototype:use_count_down([state=true]) |
- Will set the progress bar to start at 1 and trigger when it hits 0 |
-
-
- | ProgressBar._prototype:increment([amount=1][, category]) |
- Increases the value of the progressbar |
-
-
- | ProgressBar._prototype:increment_filtered([amount=1], filter) |
- Increases the value of the progressbar, if the filter condition is met, does not work with store |
-
-
- | ProgressBar._prototype:decrement([amount=1][, category]) |
- Decreases the value of the progressbar |
-
-
- | ProgressBar._prototype:decrement_filtered([amount=1], filter) |
- Decreases the value of the progressbar, if the filter condition is met, does not work with store |
-
-
- | ProgressBar._prototype:add_element(element[, maximum]) |
- Adds an element into the list of instances that will are waiting to complete, does not work with store
- note use store if you want persistent data, this only stores the elements not the values which they have |
-
-
- | ProgressBar._prototype:reset_element(element) |
- Resets an element, or its store, to be back at the start, either 1 or 0 |
-
-
- | ProgressBar._prototype:event_counter([filter]) |
- Event handler factory that counts up by 1 every time the event triggers, can filter which elements have incremented |
-
-
- | ProgressBar._prototype:event_countdown([filter]) |
- Event handler factory that counts down by 1 every time the event triggers, can filter which elements have decremented |
+ decrement_progress_bar(element[, amount=0.01]) |
+ Decrement any progress bar by the given percentage |
-
+
- | expcore.gui.core |
+ require_concept(concept_name) |
+ Loads a concept from the concepts file |
- | expcore.gui.prototype |
+ require_style(style_name) |
+ Loads a set of concepts from the styles file |
- | expcore.gui.instances |
+ get_concept(name) |
+ Gets a gui concept from name, id, or its self |
- | utils.game |
+ Prototype:save_as(save_name) |
+ Used to save the concept to the main gui module to allow access from other files |
- | Slider.new_slider([name]) |
- Creates a new slider element define |
+ new_concept([base_concept]) |
+ Returns a new gui concept, option to provide a base concept to copy properties and draw functions from |
- | Slider._prototype:set_range([min][, max]) |
- Sets the range of a slider, if not used will use default values for a slider |
-
-
- | Slider._prototype:draw_label(element) |
- Draws a new label and links its value to the value of this slider, if no store then it will only show one value per player |
-
-
- | Slider._prototype:enable_auto_draw_label([state=true]) |
- Enables auto draw of the label, the label will share the same parent element as the slider |
+ draw_concept(concept, parent) |
+ Used to draw a concept to a parent element |
-
+
- | expcore.gui.core |
+ get_player_from_element(element) |
+ Gets the player who owns this element |
- | expcore.gui.prototype |
+ valid(element) |
+ Simple check for if an element is valid |
- | utils.game |
+ destroy(element) |
+ Destroies and element if it is valid |
- | Text.new_text_field([name]) |
- Creates a new text field element define |
+ toggle_enabled(element) |
+ Toggles the enabled state of an element |
- | Text.new_text_box([name]) |
- Creates a new text box element define |
+ toggle_visible(element) |
+ Toggles the visible state of an element |
- | Text._prototype_box:set_selectable([state=true]) |
- Sets the text box to be selectable |
-
-
- | Text._prototype_box:set_word_wrap([state=true]) |
- Sets the text box to have word wrap |
-
-
- | Text._prototype_box:set_read_only([state=true]) |
- Sets the text box to be read only |
+ set_padding(element[, up=0][, down=0][, left=0][, right=0]) |
+ Sets the padding for a gui element |
-
+
- | utils.global |
+ categorize_by_player(element) |
+ A categorize function to be used with add_store, each player has their own category |
- | Instances.has_categories(name) |
- Returns if a instance group has a categorise function; must be registered |
+ categorize_by_force(element) |
+ A categorize function to be used with add_store, each force has its own category |
- | Instances.is_registered(name) |
- Returns if the given name is a registered instance group |
-
-
- | Instances.register(name[, categorise]) |
- Registers the name of an instance group to allow for storing element instances |
-
-
- | Instances.add_element(name, element) |
- Adds an element to the instance group under the correct category; must be registered |
-
-
- | Instances.get_elements_raw(name[, category]) |
- Gets all element instances without first removing any invalid ones; used internally and must be registered |
-
-
- | Instances.get_valid_elements(name[, category][, callback]) |
- Gets all valid element instances and has the option of running a callback on those that are valid |
-
-
- | Instances.unregistered_add_element(name, category, element) |
- A version of add_element that does not require the group to be registered |
-
-
- | Instances.unregistered_get_elements(name, category[, callback]) |
- A version of get_elements that does not require the group to be registered |
+ categorize_by_surface(element) |
+ A categorize function to be used with add_store, each surface has its own category |
-
+
- | utils.game |
+ Prototype:clone(concept_name) |
+ Used to copy all the settings from one concept to another and removing links to the orginal |
- | expcore.store |
+ Prototype:define_clone(clone_callback) |
+ Use to add your own callbacks to the clone function, for example adding to a local table |
- | expcore.gui.instances |
+ Prototype:save_as(save_name) |
+ Used to save the concept to the main gui module to allow access from other files |
- | Constructor.event(event_name) |
- Creates a new function to add functions to an event handler |
+ Prototype:debug(name) |
+ Sets a debug name that can be used with error handlers |
- | Constructor.extend(new_prototype) |
- Extents a prototype with the base functions of all gui prototypes, no metatables |
+ Prototype:new_event(event_name[, factorio_event][, event_condition]) |
+ Adds a new event trigger to the concept which can be linked to a factorio event |
- | Constructor.store(sync, callback) |
- Creates a new function which adds a store to a gui define |
+ Prototype:on_custom_event(handler) |
+ Adds a custom event handler, replace with the name of the event |
- | Constructor.setter(value_type, key[, second_key]) |
- Creates a setter function that checks the type when a value is set |
+ Prototype:raise_event(event_name[, event={}][, from_factorio=false]) |
+ Raises a custom event, folowing keys included automaticlly: concept, event name, game tick, player from player_index, element if valid |
- | Prototype:uid() |
- Gets the uid for the element define |
+ Prototype:new_property(property_name[, setter_callback][, default]) |
+ Adds a new property to the concept, such as caption, tooltip, or some custom property you want to control |
- | Prototype.debug_name |
- Sets a debug alias for the define |
+ Prototype:set_custom_property(value) |
+ Sets a new value for a property, triggers setter method if provided, replace with property name |
- | Prototype.set_caption |
- Sets the caption for the element define |
+ Prototype:define_draw(draw_callback) |
+ Used to define how the concept is turned into an ingame element or "instance" as we may refer to them |
- | Prototype.set_tooltip |
- Sets the tooltip for the element define |
-
-
- | Prototype.set_pre_authenticator |
- Sets an authenticator that blocks the draw function if check fails |
-
-
- | Prototype.set_post_authenticator |
- Sets an authenticator that disables the element if check fails |
-
-
- | Prototype.on_draw |
- Registers a callback to the on_draw event |
-
-
- | Prototype.on_style_update |
- Registers a callback to the on_style_update event |
-
-
- | Prototype:set_style(style[, callback]) |
- Sets the style for the element define |
-
-
- | Prototype:set_embedded_flow(state) |
- Sets the element to be drawn inside a nameless flow, can be given a name using a function |
-
-
- | Prototype:raise_event(event_name, ...) |
- Raises a custom event for this define, any number of params can be given |
-
-
- | Prototype:draw_to(element) |
- The main function for defines, when called will draw an instance of this define to the given element
- what is drawn is based on the data in draw_data which is set using other functions |
-
-
- | Prototype:get_store(category) |
- Gets the value in this elements store, category needed if categorize function used |
-
-
- | Prototype:set_store(category, value) |
- Sets the value in this elements store, category needed if categorize function used |
-
-
- | Prototype:clear_store([category]) |
- Sets the value in this elements store to nil, category needed if categorize function used |
+ Prototype:draw(parent_element) |
+ Calls all the draw functions in order to create this concept in game; will also store and sync the instance if stores are used |
-
+
- | expcore.gui |
+ Prototype:define_instance_store([category_callback]) |
+ Adds an instance store to the concept; when a new instance is made it is stored so you can access it later |
- | expcore.common |
+ Prototype.get_instances([category]) |
+ Gets all insatnces in a category, category may be nil to return all |
- | resources.color_presets |
+ Prototype.add_instance(element[, category]) |
+ Adds an instance to this concept, used automatically during concept:draw |
- | utils.event |
+ Prototype.update_instances([category], update_callback) |
+ Applies an update function to all instances, simialr use to what table.forEach would be |
+
+
+
+
+
+
+
+
+
+
+ | Prototype:define_data_store([category_callback]) |
+ Adds a data store to this concept which allows you to store synced/percistent data between instances |
- | expcore.store |
+ Prototype.get_data([category]) |
+ Gets the data that is stored for this category |
+
+
+ | Prototype.set_data([category], value) |
+ Sets the data that is stored for this category |
+
+
+ | Prototype.clear_data([category]) |
+ Clears the data that is stored for this category |
+
+
+ | Prototype.update_data([category], update_callback) |
+ Updates the data that is stored for this category |
+
+
+
+
+
+
+
+
+
+
+ | Prototype:define_combined_store([category_callback], sync_callback) |
+ Used to add a both instance and data store which are linked together, new instances are synced to the current value, changing the stored value will change all instances |
+
+
+ | Prototype.sync_instance(element) |
+ Will sync an instance to match the stored value based on the given sync callback |
+
+
+
+
+
+
+
+
+
+
+ | run_tests(player[, category]) |
+ Runs a set of gui tests to ensure that the system is working |
@@ -1117,451 +655,23 @@
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- -
-
-
-
- -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Gets the center flow for a player
+
Clickable elements that fire on_gui_click when clicked.
-
Parameters:
+
Properties / Events:
@@ -1571,13 +681,90 @@
-
- player
+ on_click
:
- (LuaPlayer)
- the player to get the flow for
+ fired when the player clicks the button
+
+
+
+
+
+
+
+ -
+
+ on_left_click
+
+ :
+
+
+ fired when the player clicks with the right mouse button
+
+
+
+
+
+
+
+ -
+
+ on_left_click
+
+ :
+
+
+ fired when the player clicks with the right mouse button
+
+
+
+
+
+
+
+ -
+
+ caption
+
+ :
+
+ (string or LocalisedString)
+
+ the message that is shown on the button
+
+
+
+
+
+
+
+ -
+
+ tooltip
+
+ :
+
+ (string or LocalisedString)
+
+ the tooltip that shows when a player hovers over the button
+
+
+
+
+
+
+
+ -
+
+ sprite
+
+ :
+
+ (SpritePath)
+
+ upto three sprites in the order: default, hovered, clicked
@@ -1587,13 +774,6 @@
- Returns:
-
@@ -1601,24 +781,41 @@
+ Usage:
+
local basic_button =
+Gui.new_concept('button')
+:set_caption('Basic Button')
+:set_tooltip('Basic button')
+:on_click(function(event)
+ event.player.print('You pressed basic button!')
+end)
+
local sprite_button =
+Gui.new_concept('button')
+:set_sprite('utility/warning_icon')
+:set_tooltip('Sprite button')
+:on_click(function(event)
+ event.player.print('You pressed sprite button!')
+end)
-
-
-
Clears the center flow for a player
+
Clickable elements with a cross in the middle that can be turned off or on.
-
Parameters:
+
Properties / Events:
@@ -1628,63 +825,28 @@
-
- player
+ on_state_changed
:
- (LuaPlayer)
- the player to clear the flow for
+ fired when the state of the element is changed
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Draws the center frame for a player, if already open then will do nothing
-
-
-
-
Parameters:
-
-
-
-
-
- player
+ caption
:
- (LuaPlayer)
+ (string or LocalisedString)
- the player that will have the frame drawn
+ the message that is shown next to the checkbox
@@ -1694,70 +856,13 @@
-
- name
+ tooltip
:
- (string)
+ (string or LocalisedString)
- the name of the hui that will drawn
-
-
-
-
-
-
-
-
-
-
Returns:
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Draws the center frame for a player, if already open then will destroy it and redraw
-
-
-
-
Parameters:
-
-
-
-
-
-
-
- -
-
- player
-
- :
-
- (LuaPlayer)
-
- the player that will have the frame drawn
+ the tooltip that shows when a player hovers over the checkbox
@@ -1767,1007 +872,30 @@
-
- name
-
- :
-
- (string)
-
- the name of the hui that will drawn
-
-
-
-
-
-
-
-
-
-
Returns:
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Toggles if the frame is currently open or not, will open if closed and close if open
-
-
-
-
Parameters:
-
-
-
-
-
-
-
- -
-
- player
-
- :
-
- (LuaPlayer)
-
- the player that will have the frame toggled
-
-
-
-
-
-
-
- -
-
- name
-
- :
-
- (string)
-
- the name of the hui that will be toggled
-
-
-
-
-
-
-
- -
-
- state
-
- :
-
- (boolean)
-
- when set will force a state for the frame
-
- (optional)
-
-
-
-
-
-
-
-
-
Returns:
-
- -
- (boolean)
- if the frame if no open or closed
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Creates a new center frame define
-
-
-
-
Parameters:
-
-
-
-
-
-
-
- -
-
- permission_name
-
- :
-
- (string)
-
- the name that can be used with the permission system
-
-
-
-
-
-
-
-
-
-
Returns:
-
- -
- (table)
- the new center frame define
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Sets the frame to be the current active gui when opened and closes all other frames
-
-
-
-
Parameters:
-
-
-
-
-
-
-
- -
-
- state
-
- :
-
- (boolean)
-
- when true will auto close other frames and set this frame as player.opened
-
- (default: true)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Draws this frame to the player, if already open does nothing (will call on_draw to draw to the frame)
-
-
-
-
Parameters:
-
-
-
-
-
-
-
- -
-
- player
-
- :
-
- (LuaPlayer)
-
- the player to draw the frame for
-
-
-
-
-
-
-
-
-
-
Returns:
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Draws this frame to the player, if already open it will remove it and redraw it (will call on_draw to draw to the frame)
-
-
-
-
Parameters:
-
-
-
-
-
-
-
- -
-
- player
-
- :
-
- (LuaPlayer)
-
- the player to draw the frame for
-
-
-
-
-
-
-
-
-
-
Returns:
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Toggles if the frame is open, if open it will close it and if closed it will open it
-
-
-
-
Parameters:
-
-
-
-
-
-
-
- -
-
- player
-
- :
-
- (LuaPlayer)
-
- the player to draw the frame for
-
-
-
-
-
-
-
-
-
-
Returns:
-
- -
- (boolean)
- with the gui frame is now open
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Creates an event handler that will trigger one of its functions, use with Event.add
-
-
-
-
Parameters:
-
-
-
-
-
-
-
- -
-
- action
-
- :
-
- (string)
-
- the action to take on this event
-
- (default: update)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- -
-
-
-
- -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Gets the left frame flow for a player
-
-
-
-
Parameters:
-
-
-
-
-
-
-
- -
-
- player
-
- :
-
- (LuaPlayer)
-
- the player to get the flow of
-
-
-
-
-
-
-
-
-
-
Returns:
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Gets one frame from the left flow by its name
-
-
-
-
Parameters:
-
-
-
-
-
-
-
- -
-
- name
-
- :
-
- (string)
-
- the name of the gui frame to get
-
-
-
-
-
-
-
- -
-
- player
-
- :
-
- (LuaPlayer)
-
- the player to get the frame of
-
-
-
-
-
-
-
-
-
-
Returns:
-
- -
- (LuaGuiElement)
- the frame in the left frame flow with that name
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Gets all open frames for a player, if non are open it will remove the close all button
-
-
-
-
Parameters:
-
-
-
-
-
-
-
- -
-
- player
-
- :
-
- (LuaPlayer)
-
- the player to get the flow of
-
-
-
-
-
-
-
-
-
-
Returns:
-
- -
- (table)
- contains all the open (and registered) frames for the player
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Toggles the visibility of a left frame, or sets its visibility state
-
-
-
-
Parameters:
-
-
-
-
-
-
-
- -
-
- name
-
- :
-
- (string)
-
- the name of the gui frame to toggle
-
-
-
-
-
-
-
- -
-
- player
-
- :
-
- (LuaPlayer)
-
- the player to get the frame of
-
-
-
-
-
-
-
- -
-
- state
-
- :
-
- (boolean)
-
- when given will be the state that the visibility is set to
-
- (optional)
-
-
-
-
-
-
-
-
-
Returns:
-
- -
- (boolean)
- the new state of the visibility
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Creates a new left frame define
-
-
-
-
Parameters:
-
-
-
-
-
-
-
- -
-
- permission_name
-
- :
-
- (string)
-
- the name that can be used with the permission system
-
-
-
-
-
-
-
-
-
-
Returns:
-
- -
- (table)
- the new left frame define
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Sets if the frame is visible when a player joins, can also be a function to return a boolean
-
-
-
-
Parameters:
-
-
-
-
-
-
-
- -
-
- state
+ default
:
(boolean or function)
- the default state of the visibility, can be a function
- state param - player LuaPlayer - the player that has joined the game
- state param - define_name string - the define name for the frame
- state return - boolean - false will hide the frame
+ the default state of this checkbox, or a function which returns the default state
+
+
+
+
+
+
+
+ -
+
+ use_radio
+
+ :
+
+ (boolean)
+
+ setting to true will use radio buttons rather than checkboxs
- (default: true)
@@ -2783,24 +911,312 @@
+ Usage:
+
local basic_checkbox =
+Gui.new_concept('checkbox')
+:set_caption('Basic Checkbox')
+:set_tooltip('Basic checkbox')
+:on_state_changed(function(event)
+ event.player.print('Basic checkbox is now: '..tostring(event.element.state))
+end)
-
-
-
Sets the direction of the frame, either vertical or horizontal
+
A drop down list of other elements.
-
Parameters:
+
Properties / Events:
+
+
+
+
+
+
+
+ -
+
+ on_selection_changed
+
+ :
+
+
+ fired when the selected value is changed
+
+
+
+
+
+
+
+ -
+
+ default
+
+ :
+
+ (string, LocalisedString or function)
+
+ the option which is selected by default, or a function which returns the default
+
+
+
+
+
+
+
+ -
+
+ use_list_box
+
+ :
+
+ (boolean)
+
+ when true a list box will be used rather than a dropdown menu
+
+
+
+
+
+
+
+ -
+
+ static_items
+
+ :
+
+ (nil or table)
+
+ when called with a table the values will be added as items for the dropdown, if called with nil then all items are cleared
+
+
+
+
+
+
+
+ -
+
+ dynamic_items
+
+ :
+
+ (function)
+
+ the given function will be called to return a list of items and optional start index to add items to the dropdown when it is first drawn
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Usage:
+
local static_dropdown =
+Gui.new_concept('dropdown')
+:set_static_items{'Option 1','Option 2','Option 3'}
+:on_selection_changed(function(event)
+ local value = Gui.get_dropdown_value(event.element)
+ event.player.print('Static dropdown is now: '..value)
+end)
+
local dynamic_dropdown =
+Gui.new_concept('dropdown')
+:set_dynamic_items(function(element)
+ local items = {}
+ for _,player in pairs(game.connected_players) do
+ items[#items+1] = player.name
+ end
+ return items
+end)
+:on_selection_changed(function(event)
+ local value = Gui.get_dropdown_value(event.element)
+ event.player.print('Dynamic dropdown is now: '..value)
+end)
+
+
+
+
-
+
+
+
+
-
+
+
+
A button that lets the player pick one of an: item, entity, tile, or signal similar to the filter-select window.
+
+
+
+
Properties / Events:
+
+
+
+
+
+
+
+ -
+
+ on_selection_changed
+
+ :
+
+
+ fired when the selected value is changed
+
+
+
+
+
+
+
+ -
+
+ default
+
+ :
+
+ (string, SignalID or function)
+
+ the option which is selected by default, or a function which returns the default
+
+
+
+
+
+
+
+ -
+
+ elem_type
+
+ :
+
+ (string)
+
+ the type of elem selection that this is, default is item selection
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Usage:
+
local basic_elem_button =
+Gui.new_concept('elem_button')
+:on_selection_changed(function(event)
+ event.player.print('Basic elem button is now: '..event.element.elem_value)
+end)
+
+
+
+
-
+
+
+
+
-
+
+
+
A empty widget that just exists.
+
The root GUI element screen is an empty-widget.
+
+
+
Properties / Events:
+
+
+
+
+
+
+
+ -
+
+ style
+
+ :
+
+ (string)
+
+ the style that the element will have
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Usage:
+
local draggable_space =
+Gui.new_concept('empty')
+:set_style('draggable_space')
+
+
+
+
-
+
+
+
+
-
+
+
+
Invisible containers that lay out children either horizontally or vertically.
+
The root GUI elements (top, left and center; see LuaGui) are flows.
+
+
+
Properties / Events:
@@ -2816,7 +1232,7 @@
(string)
- the direction to have the elements be added to the frame
+ the direction that children will be added
@@ -2833,24 +1249,34 @@
+ Usage:
+
local basic_flow =
+Gui.new_concept('flow')
+:define_draw(function(properties,parent,element)
+ element.add{
+ type = 'label',
+ caption = 'Hello, World!'
+ }
+end)
-
-
-
Creates the gui for the first time, used internally
-
+
Grey semi-transparent boxes that contain other elements.
+
They have a caption, and, just like flows, they lay out children either horizontally or vertically.
-
Parameters:
+
Properties / Events:
@@ -2860,445 +1286,30 @@
-
- player
+ title
:
- (LuaPlayer)
+ (string or LocalisedString)
- the player to draw the frame to
+ the title that will show in the frame
-
-
-
-
-
-
Returns:
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Gets the frame for this define from the left frame flow
-
-
-
-
Parameters:
-
-
-
-
-
- player
-
- :
-
- (LuaPlayer)
-
- the player to get the frame of
-
-
-
-
-
-
-
-
-
-
Returns:
-
- -
- (LuaGuiElement)
- the frame in the left frame flow for this define
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Returns if the player currently has this define visible
-
-
-
-
Parameters:
-
-
-
-
-
-
-
- -
-
- player
-
- :
-
- (LuaPlayer)
-
- the player to get the frame of
-
-
-
-
-
-
-
-
-
-
Returns:
-
- -
- (boolean)
- true if it is open/visible
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Toggles the visibility of the left frame
-
-
-
-
Parameters:
-
-
-
-
-
-
-
- -
-
- player
-
- :
-
- (LuaPlayer)
-
- the player to toggle the frame of
-
-
-
-
-
-
-
-
-
-
Returns:
-
- -
- (boolean)
- the new state of the visibility
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Updates the contents of the left frame, first tries update callback, other wise will clear and redraw
-
-
-
-
Parameters:
-
-
-
-
-
-
-
- -
-
- player
-
- :
-
- (LuaPlayer)
-
- the player to update the frame of
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Updates the frame for all players, see update
-
-
-
-
Parameters:
-
-
-
-
-
-
-
- -
-
- update_offline
-
- :
-
- (boolean)
-
- when true will update the frame for offline players
-
- (default: false)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Redraws the frame by calling on_draw, will always clear the frame
-
-
-
-
Parameters:
-
-
-
-
-
-
-
- -
-
- player
-
- :
-
- (LuaPlayer)
-
- the player to update the frame of
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Redraws the frame for all players, see redraw
-
-
-
-
Parameters:
-
-
-
-
-
-
-
- -
-
- update_offline
-
- :
-
- (boolean)
-
- when true will update the frame for offline players
-
- (default: false)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Creates an event handler that will trigger one of its functions, use with Event.add
-
-
-
-
Parameters:
-
-
-
-
-
-
-
- -
-
- action
+ direction
:
(string)
- the action to take on this event
+ the direction that children will be added
- (default: update)
@@ -3314,252 +1325,35 @@
-
-
-
-
-
-
- -
-
-
-
- -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
Usage:
+
local basic_frame =
+Gui.new_concept('frame')
+:set_title('Basic Frame')
+:define_draw(function(properties,parent,element)
+ element.add{
+ type = 'label',
+ caption = 'Hello, World!'
+ }
+end)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Gets the left flow that contains the popup frames
+
A piece of text.
-
Parameters:
+
Properties / Events:
@@ -3569,13 +1363,45 @@
-
- player
+ caption
:
- (LuaPlayer)
+ (string or LocalisedString)
- the player to get the flow for
+ the caption that will show in the label
+
+
+
+
+
+
+
+ -
+
+ description
+
+ :
+
+ (string or LocalisedString)
+
+ the description that will show on the label
+
+
+
+
+
+
+
+ -
+
+ rich_text
+
+ :
+
+ (defines.rich_text_setting)
+
+ how this element handles rich text
@@ -3585,13 +1411,6 @@
- Returns:
-
- -
- (LuaGuiElement)
- the left flow that contains the popup frames
-
-
@@ -3599,24 +1418,29 @@
+ Usage:
+
local basic_label =
+Gui.new_concept('label')
+:set_caption('Hello, World!')
-
-
-
Opens a popup for the player, can give the amount of time it is open as well as params for the draw function
+
A vertical or horizontal line.
-
Parameters:
+
Properties / Events:
@@ -3626,29 +1450,66 @@
-
- define_name
+ direction
:
(string)
- the name of the define that you want to open for the player
+ the direction that children will be added
+
+
+
+
+
+
+
+
+
+
+
+
+
Usage:
+
local basic_line =
+Gui.new_concept('line')
+
+
+
+
-
+
+
+
+
-
+
+
+
Indicate progress by displaying a partially filled bar.
+
+
+
+
Properties / Events:
+
+
+
+
-
- player
+ on_completion
:
- (LuaPlayer)
- the player to open the popup for
+ fired when increment reaches the maxium value set by set_maximum
@@ -3658,15 +1519,30 @@
-
- open_time
+ tooltip
+
+ :
+
+ (string or LocalisedString)
+
+ the tooltip that will show for this element
+
+
+
+
+
+
+
+ -
+
+ maximum
:
(number)
- the minimum number of ticks you want the popup open for, 0 means no limit, nil will take default
+ the maxium amount an instance can be increased, default 100
- (optional)
@@ -3675,13 +1551,29 @@
-
- ...
+ delay_completion
:
- (any)
+ (boolean)
- the other params that you want to pass to your on_draw event
+ when true the progress will be completed untill after the maximum rather than at the maximum
+
+
+
+
+
+
+
+ -
+
+ inverted
+
+ :
+
+ (boolean)
+
+ although this will NOT effect how you use the functions it will make the element start full and reduce as you call increase, note issues with 0 detections
@@ -3691,37 +1583,83 @@
- Returns:
+
+
+
+
+
+
+
+ Usage:
+
local basic_progress_bar =
+Gui.new_concept('progress_bar')
+:set_tooltip('Basic progress bar')
+:set_maximum(5)
+:new_event('on_click',defines.events.on_gui_click)
+:on_click(function(event)
+ event.concept:increment(event.element)
+end)
+:set_delay_completion(true)
+:on_completion(function(event)
+ event.concept:reset(event.element)
+end)
+
+
+
+
-
+
+
+
+
-
+
+
+
Similar to a flow but includes the ability to show and use scroll bars.
+
+
+
+
Properties / Events:
+
- -
- (LuaGuiElement)
- the frame that was drawn, the inner gui flow which contains the content
+
+
+
+
+
+
-
+
+ horizontal_scroll
+
+ :
+
+ (string)
+
+ the horizontal scroll policy for this scroll pane
+
+
+
+
+
+
+ -
+
+ vertical_scroll
+
+ :
+
+ (string)
+
+ the vertical scroll policy for this scroll pane
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Progress bar which when depleted will close the popup frame
-
-
-
@@ -3732,23 +1670,122 @@
+
Usage:
+
local basic_scroll =
+Gui.new_concept('scroll')
+:define_draw(function(properties,parent,element)
+ element.style.hieght = 50
+ for i = 1,10 do
+ element.add{
+ type = 'label',
+ caption = i
+ }
+ end
+end)
-
-
-
A button which can be used to close the gui before the timer runs out
+
A number picker.
+
Properties / Events:
+
+
+
+
+
+
+
+ -
+
+ on_value_changed
+
+ :
+
+
+ fired when the value of the slider is changed
+
+
+
+
+
+
+
+ -
+
+ value_step
+
+ :
+
+ (number)
+
+ the minimum amount by which the value of the slider can be changed
+
+
+
+
+
+
+
+ -
+
+ default
+
+ :
+
+ (number or function)
+
+ the default value of the slider or a function which returns the default value
+
+
+
+
+
+
+
+ -
+
+ discrete_slider
+
+ :
+
+ (boolean)
+
+ makes this slider a discrete slider, this means that the slider button will stop at the same interval as the values do
+
+
+
+
+
+
+
+ -
+
+ range
+
+ :
+
+ (number or function)
+
+ accepts two params the minimum and the maximum for this slider, or a single function to return both
+
+
+
+
+
+
@@ -3759,20 +1796,571 @@
+
Usage:
+
local basic_slider =
+Gui.new_concept('slider')
+:set_range(1,10)
+:on_value_changed(function(event)
+ event.player.print('Basic slider is now: '..event.element.slider_value)
+end)
+
local discrete_slider =
+Gui.new_concept('slider')
+:set_range(1,10)
+:set_value_step(1)
+:set_discrete_slider(true)
+:on_value_changed(function(event)
+ event.player.print('Interval slider is now: '..event.element.slider_value)
+end)
-
-
-
Creates a new popup frame define
+
An invisible container that lays out children in a specific number of columns.
+
Column width is given by the largest element contained in that row.
+
+
+
Properties / Events:
+
+
+
+
+
+
+
+ -
+
+ column_count
+
+ :
+
+ (number or function)
+
+ the column count of the table or a function that returns the count being given then parent element
+
+
+
+
+
+
+
+ -
+
+ vertical_lines
+
+ :
+
+ (boolean)
+
+ when true vertical lines will be drawn on the table
+
+
+
+
+
+
+
+ -
+
+ horizontal_lines
+
+ :
+
+ (boolean)
+
+ when true horizontal lines will be drawn on the table
+
+
+
+
+
+
+
+ -
+
+ header_lines
+
+ :
+
+ (boolean)
+
+ when true horizontal lines will be drawn under the first row
+
+
+
+
+
+
+
+ -
+
+ vertical_centering
+
+ :
+
+ (boolean)
+
+ when true element will be vertically centered with in the table
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Usage:
+
local basic_table =
+Gui.new_concept('table')
+:set_column_count(5)
+:define_draw(function(properties,parent,element)
+ for i = 1,25 do
+ element.add{
+ type = 'lable',
+ caption = i
+ }
+ end
+end)
+
+
+
+
-
+
+
+
+
-
+
+
+
A multi-line text box that supports selection and copy-paste.
+
+
+
+
Properties / Events:
+
+
+
+
+
+
+
+ -
+
+ on_text_changed
+
+ :
+
+
+ fired when the text within the text box is changed
+
+
+
+
+
+
+
+ -
+
+ tooltip
+
+ :
+
+ (string or LocalisedString)
+
+ the tooltip that shows when a player hovers over the text box
+
+
+
+
+
+
+
+ -
+
+ default
+
+ :
+
+ (string or function)
+
+ the default text that will appear in the text box, or a function that returns it
+
+
+
+
+
+
+
+ -
+
+ rich_text
+
+ :
+
+ (defines.rich_text_setting)
+
+ how this element handles rich text
+
+
+
+
+
+
+
+ -
+
+ clear_on_rmb
+
+ :
+
+ (boolean)
+
+ if the text box will be cleared and forcused on a right click
+
+
+
+
+
+
+
+ -
+
+ is_selectable
+
+ :
+
+ (boolean)
+
+ when true the text inside the box can be selected
+
+
+
+
+
+
+
+ -
+
+ has_word_wrap
+
+ :
+
+ (boolean)
+
+ when true the text will wrap onto the next line if it reachs the end
+
+
+
+
+
+
+
+ -
+
+ is_read_only
+
+ :
+
+ (boolean)
+
+ when true the text inside the box can not be edited by the player
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Usage:
+
local basic_text_box =
+Gui.new_concept('text_box')
+:set_default('I am the text that will show in the text box')
+
local editible_text_box =
+Gui.new_concept('text_box')
+:set_is_read_only(false)
+:set_default('I am the text that will show in the text box')
+:on_confirmation(function(event)
+ event.player.print('Editible text box is now: '..event.element.text)
+end)
+
+
+
+
-
+
+
+
+
-
+
+
+
Boxes of text the user can type in.
+
+
+
+
Properties / Events:
+
+
+
+
+
+
+
+ -
+
+ on_text_changed
+
+ :
+
+
+ fired when the text within the text field is changed
+
+
+
+
+
+
+
+ -
+
+ on_confirmation
+
+ :
+
+
+ fired when the player presses enter with the text field forcused
+
+
+
+
+
+
+
+ -
+
+ tooltip
+
+ :
+
+ (string or LocalisedString)
+
+ the tooltip that shows when a player hovers over the text field
+
+
+
+
+
+
+
+ -
+
+ default
+
+ :
+
+ (string or function)
+
+ the default text that will appear in the text field, or a function that returns it
+
+
+
+
+
+
+
+ -
+
+ rich_text
+
+ :
+
+ (defines.rich_text_setting)
+
+ how this element handles rich text
+
+
+
+
+
+
+
+ -
+
+ clear_on_rmb
+
+ :
+
+ (boolean)
+
+ if the text field will be cleared and forcused on a right click
+
+
+
+
+
+
+
+ -
+
+ lose_forcus
+
+ :
+
+ (boolean)
+
+ if the text field will lose forcus after the confirmation event
+
+
+
+
+
+
+
+ -
+
+ is_number
+
+ :
+
+ (boolean)
+
+ if this text field contains a number value, can be ignored if is_decimal or is_negitive is used
+
+
+
+
+
+
+
+ -
+
+ is_decimal
+
+ :
+
+ (boolean)
+
+ if this text field contains a decimal value
+
+
+
+
+
+
+
+ -
+
+ is_negative
+
+ :
+
+ (boolean)
+
+ if this text field contains a negative value
+
+
+
+
+
+
+
+ -
+
+ is_password
+
+ :
+
+ (boolean)
+
+ if this text field contains a password value
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Usage:
+
local basic_text_field =
+Gui.new_concept('text_field')
+:on_confirmation(function(event)
+ event.player.print('Basic text field is now: '..event.element.text)
+end)
+
local better_text_field =
+Gui.new_concept('text_field')
+:set_clear_on_rmb(true)
+:set_lose_forcus(true)
+:on_confirmation(function(event)
+ event.player.print('Better text field is now: '..event.element.text)
+end)
+
local decimal_text_field =
+Gui.new_concept('text_field')
+:set_is_decimal(true)
+:on_confirmation(function(event)
+ event.player.print('Decimal text field is now: '..event.element.text)
+end)
+
+
+
+
+
+
+ -
+
+
+
+ -
+
+
+
Selects the index of a dropdown with this value
@@ -3786,18 +2374,186 @@
-
- name
+ element
:
- (string)
+ (LuaGuiElement)
- the optional debug name that can be added
+ the dropdown that you want to set the selection for
+
+
+
+
+
+
+
+
-
+
+ value
+
+ :
+
+ (string or LocalisedString)
+
+ the value that you want selected
+
+
+
+
+
+
+
+
+
+
Returns:
+
+ -
+ (boolean)
+ if an item with this value was found
+
+
+
+
+
+
+
+
+
+
Usage:
+
Gui.set_dropdown_value(element,'foo')
+
+
+
+
-
+
+
+
+
-
+
+
+
Gets the selected item value of a dropdown
+
+
+
+
Parameters:
+
+
+
+
+
+
+
+ -
+
+ element
+
+ :
+
+ (LuaGuiElement)
+
+ the dropdown that you want the selected value of
+
+
+
+
+
+
+
+
+
+
Returns:
+
+
+
+
+
+
+
+
+
Usage:
+
local selected_value = Gui.get_dropdown_value(element)
+
+
+
+
-
+
+
+
+
-
+
+
+
Adds the given items into the list of items for this dropdown
+
+
+
+
Parameters:
+
+
+
+
+
+
+
+ -
+
+ element
+
+ :
+
+ (LuaGuiElement)
+
+ the dropdown that you want to add the items to
+
+
+
+
+
+
+
+ -
+
+ start_index
+
+ :
+
+ (number)
+
+ the index at which the items will be added, if not given appened to the end
(optional)
+
+
+
+ -
+
+ new_items
+
+ :
+
+ (table)
+
+ the list of new items that you want to add
+
+
+
+
@@ -3807,7 +2563,7 @@
-
(table)
- the new popup frame define
+ the list of items that the element now has
@@ -3817,20 +2573,28 @@
+
Usage:
+
Gui.add_dropdown_items(element,{'foo','bar'})
+
Gui.add_dropdown_items(element,1,{'foo','bar'})
+
+
+
-
-
-
Sets the default open time for the popup, will be used if non is provided with open
+
Will increase the progress of a progress bar based on this concept, if the concept has an instance store then element acts as the category, if you have a combined store it will NOT update all instances
@@ -3842,6 +2606,22 @@
+
-
+
+ element
+
+ :
+
+ (LuaGuiElement or string)
+
+ either the element that is changed or the category that is being changed (only if an instance store is defined)
+
+
+
+
+
+
+
-
amount
@@ -3850,8 +2630,9 @@
(number)
- the number of ticks, by default, the popup will be open for
+ the amount that will bar will increase, note that this amount must be less than the max
+ (default: 1)
@@ -3863,8 +2644,8 @@
Returns:
-
- (table)
- the define to allow for chaining
+ (number or nil)
+ the new value of the element, use this to sync a data store, if the return is nil then either a instance store was used or the new value may have changed
@@ -3874,20 +2655,25 @@
+
Usage:
+
local new_value = progress_bar:increment(element)
+
progress_bar:increment(category)
-
-
-
Opens this define for a player, can be given open time and any other params for the draw function
+
Will decrease the progress of a progress bar based on this concept, if the concept has an instance store then element acts as the category, if you have a combined store it will NOT update all instances
@@ -3901,13 +2687,13 @@
-
- player
+ element
:
- (LuaPlayer)
+ (LuaGuiElement or string)
- the player to open the popup for
+ either the element that is changed or the category that is being changed (only if an instance store is defined)
@@ -3917,30 +2703,76 @@
-
- open_time
+ amount
:
(number)
- the minimum number of ticks you want the popup open for, 0 means no limit, nil will take default
+ the amount that will bar will decrease, note that this amount must be less than the max
- (optional)
+ (default: 1)
+
+
+
+
+
+
Returns:
+
+ -
+ (number)
+ the new value of the element, use this to sync a data store, if the return is nil then either a instance store was used or the new value may have changed
+
+
+
+
+
+
+
+
+
+
Usage:
+
local new_value = progress_bar:decrement(element)
+
progress_bar:decrement(category)
+
+
+
+
-
+
+
+
+
-
+
+
+
Resets the progress back to 0% for this element, if the concept has an instance store then element acts as the category, if you have a combined store it will NOT update all instances
+
+
+
+
Parameters:
+
+
+
+
-
- ...
+ element
:
- (any)
+ (LuaGuiElement or string)
- the other params that you want to pass to your on_draw event
+ either the element that is changed or the category that is being changed (only if an instance store is defined)
@@ -3953,190 +2785,58 @@
Returns:
-
+ (number or nil)
+ the new value of the element, use this to sync a data store, if the return is nil then either a instance store was used or the new value may have changed
+
+
+
+
+
+
+
+
+
+ Usage:
+
local new_value = progress_bar:reset(element)
+
progress_bar:reset(category)
+
+
+
+
-
+
+
+
+
-
+
+
+
Increment any progress bar by the given percentage
+
+
+
+
Parameters:
+
+
+
+
+
+
+
+ -
+
+ element
+
+ :
+
(LuaGuiElement)
- the frame that was drawn, the inner gui flow which contains the content
+
+ the progress bar that you want to update
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- -
-
-
-
- -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Adds a new button to the toolbar
-
-
-
-
Parameters:
-
-
@@ -4144,15 +2844,15 @@
-
- name
+ amount
:
- (string)
+ (number)
- when given allows an alias to the button for the permission system
+ the percentage that you want to increment the progress bar by
- (optional)
+ (default: 0.01)
@@ -4164,309 +2864,8 @@
Returns:
-
- (table)
- the button define
-
-
-
-
-
-
-
-
-
-
-
-
- -
-
-
-
- -
-
-
-
Adds an existing buttton to the toolbar
-
-
-
-
Parameters:
-
-
-
-
-
-
-
- -
-
- button
-
- :
-
- (table)
-
- the button define for the button to be added
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Updates the player's toolbar with an new buttons or expected change in auth return
-
-
-
-
Parameters:
-
-
-
-
-
-
-
- -
-
- player
-
- :
-
- (LuaPlayer)
-
- the player to update the toolbar for
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- -
-
-
-
- -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Used to create new element defines from a class prototype, please use the own given by the class
-
-
-
-
Parameters:
-
-
-
-
-
-
-
- -
-
- prototype
-
- :
-
- (table)
-
- the class prototype that will be used for the element define
-
-
-
-
-
-
-
- -
-
- debug_name
-
- :
-
- (string)
-
- the name that you want to see while debuging
-
- (optional)
-
-
-
-
-
-
-
-
-
Returns:
-
- -
- (table)
- the new element define with all functions accessed via __index metamethod
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Gets an element define give the uid, debug name or a copy of the element define
-
-
-
-
Parameters:
-
-
-
-
-
-
-
- -
-
- name
-
- :
-
- (string or table)
-
- the uid, debug name or define for the element define to get
-
-
-
-
-
-
-
- -
-
- internal
-
- :
-
(boolean)
-
- when true the error trace is one level higher (used internally)
-
- (optional)
-
-
-
-
-
-
-
-
-
Returns:
-
- -
- (table)
- the element define that was found or an error
+ true if the bar is now full
@@ -4476,20 +2875,23 @@
+
Usage:
+
Gui.increment_progress_bar(element,0.1)
-
-
-
A categorize function to be used with add_store, each player has their own value
+
Decrement any progress bar by the given percentage
@@ -4509,11 +2911,28 @@
(
LuaGuiElement)
- the element that will be converted to a string
+ the progress bar that you want to update
+
+
+
+
-
+
+ amount
+
+ :
+
+ (number)
+
+ the percentage that you want to decrement the progress bar by
+
+ (default: 0.01)
+
+
+
@@ -4522,8 +2941,8 @@
Returns:
-
- (string)
- the player's name who owns this element
+ (boolean)
+ true if the bar is now empty
@@ -4533,20 +2952,26 @@
+
Usage:
+
Gui.decrement_progress_bar(element,0.1)
+
+
+
-
-
-
A categorize function to be used with add_store, each force has its own value
+
Loads a concept from the concepts file
@@ -4560,13 +2985,13 @@
-
- element
+ concept_name
:
- (LuaGuiElement)
+ (string)
- the element that will be converted to a string
+ the name of the concept to require
@@ -4576,13 +3001,6 @@
-
Returns:
-
- -
- (string)
- the player's force name who owns this element
-
-
@@ -4590,20 +3008,23 @@
+
Usage:
+
Gui.require_concept('frame') --- @dep Gui.concept.frame
-
-
-
A categorize function to be used with add_store, each surface has its own value
+
Loads a set of concepts from the styles file
@@ -4617,13 +3038,13 @@
-
- element
+ style_name
:
- (LuaGuiElement)
+ (string)
- the element that will be converted to a string
+ the name of the style to require
@@ -4633,13 +3054,6 @@
-
Returns:
-
- -
- (string)
- the player's surface name who owns this element
-
-
@@ -4647,20 +3061,23 @@
+
Usage:
+
Gui.require_concept('expgaming') --- @dep Gui.style.frame
-
-
-
Draws a copy of the element define to the parent element, see draw_to
+
Gets a gui concept from name, id, or its self
@@ -4678,9 +3095,172 @@
:
- (
string or table)
+ (
string, number or table)
- the uid, debug name or define for the element define to draw
+ the name, id, or the concept you want to get
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Usage:
+
local button = Gui.get_concept('Button')
+
+
+
+
-
+
+
+
+
-
+
+
+
Used to save the concept to the main gui module to allow access from other files
+
+
+
+
Parameters:
+
+
+
+
+
+
+
+ -
+
+ save_name
+
+ :
+
+ (string)
+
+ the new name of the concept
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Usage:
+
button:save_as('button')
+
Gui.concepts.button
+Gui.get_concept('button')
+
+
+
+
-
+
+
+
+
-
+
+
+
Returns a new gui concept, option to provide a base concept to copy properties and draw functions from
+
+
+
+
Parameters:
+
+
+
+
+
+
+
+ -
+
+ base_concept
+
+ :
+
+ (string, number or table)
+
+ the concept that you want to copy the details of
+
+ (optional)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Usage:
+
local button = Gui.new_concept('Button')
+
+
+
+
-
+
+
+
+
-
+
+
+
Used to draw a concept to a parent element
+
+
+
+
Parameters:
+
+
+
+
+
+
+
+ -
+
+ concept
+
+ :
+
+ (string, number or table)
+
+ the name of the concept that you want to draw
@@ -4690,13 +3270,13 @@
-
- element
+ parent
:
- (LuaGuiEelement)
+ (LuaGuiElement)
- the parent element that it the define will be drawn to
+ the element that will act as a parent for the new element
@@ -4710,7 +3290,7 @@
-
(LuaGuiElement)
- the new element that was created
+ the element that was created
@@ -4720,6 +3300,192 @@
+ Usage:
+
Gui.draw_concept('Button',element)
+
+
+
+
+
+
+ -
+
+
+
+ -
+
+
+
Gets the player who owns this element
+
+
+
+
Parameters:
+
+
+
+
+
+
+
+ -
+
+ element
+
+ :
+
+ (LuaGuiElement)
+
+ the element that you want to get the player of
+
+
+
+
+
+
+
+
+
+
Returns:
+
+ -
+ (LuaPlayer)
+ the player who owns this element
+
+
+
+
+
+
+
+
+
+
Usage:
+
local player = Gui.get_player_from_element(element)
+
+
+
+
-
+
+
+
+
-
+
+
+
Simple check for if an element is valid
+
+
+
+
Parameters:
+
+
+
+
+
+
+
+ -
+
+ element
+
+ :
+
+ (LuaGuiElement)
+
+ the element that you want to check is valid
+
+
+
+
+
+
+
+
+
+
Returns:
+
+ -
+ (boolean)
+ true if the element is valid
+
+
+
+
+
+
+
+
+
+
Usage:
+
if not Gui.valid(element) then return end
+
+
+
+
-
+
+
+
+
-
+
+
+
Destroies and element if it is valid
+
+
+
+
Parameters:
+
+
+
+
+
+
+
+ -
+
+ element
+
+ :
+
+ (LuaGuiElement)
+
+ the element that you want to destroy
+
+
+
+
+
+
+
+
+
+
Returns:
+
+ -
+ (boolean)
+ true if the element was valid and was destoried
+
+
+
+
+
+
+
+
+
+
Usage:
+
Gui.destroy(element)
@@ -4733,7 +3499,7 @@
-
-
Will toggle the enabled state of an element
+
Toggles the enabled state of an element
@@ -4753,7 +3519,7 @@
(
LuaGuiElement)
- the gui element to toggle
+ the element that you want to toggle the enabled state of
@@ -4767,7 +3533,7 @@
-
(boolean)
- the new state that the element has
+ the new enabled state of the element
@@ -4777,6 +3543,9 @@
+
Usage:
+
Gui.toggle_enabled(element)
@@ -4790,7 +3559,7 @@
-
-
Will toggle the visiblity of an element
+
Toggles the visible state of an element
@@ -4810,7 +3579,7 @@
(
LuaGuiElement)
- the gui element to toggle
+ the element that you want to toggle the visible state of
@@ -4824,7 +3593,7 @@
-
(boolean)
- the new state that the element has
+ the new visible state of the element
@@ -4834,6 +3603,9 @@
+
Usage:
+
Gui.toggle_visible(element)
@@ -4881,9 +3653,9 @@
:
- (
number)
+ (
number or boolean)
- the amount of padding on the top
+ the amount of padding on the top, true leaves unchanged
(
default: 0)
@@ -4898,1628 +3670,45 @@
:
- (
number)
-
- the amount of padding on the bottom
-
- (
default: 0)
-
-
-
-
-
-
-
-
-
- left
-
- :
-
- (number)
-
- the amount of padding on the left
-
- (default: 0)
-
-
-
-
-
-
-
-
-
- right
-
- :
-
- (number)
-
- the amount of padding on the right
-
- (default: 0)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Sets the padding for a gui style
-
-
-
-
Parameters:
-
-
-
-
-
-
-
- -
-
- style
-
- :
-
- (LuaStyle)
-
- the element to set the padding for
-
-
-
-
-
-
-
- -
-
- up
-
- :
-
- (number)
-
- the amount of padding on the top
-
- (default: 0)
-
-
-
-
-
-
- -
-
- down
-
- :
-
- (number)
-
- the amount of padding on the bottom
-
- (default: 0)
-
-
-
-
-
-
- -
-
- left
-
- :
-
- (number)
-
- the amount of padding on the left
-
- (default: 0)
-
-
-
-
-
-
- -
-
- right
-
- :
-
- (number)
-
- the amount of padding on the right
-
- (default: 0)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Allows the creation of an alignment flow to place elements into
-
-
-
-
Parameters:
-
-
-
-
-
-
-
- -
-
- element
-
- :
-
- (LuaGuiElement)
-
- the element to add this alignment into
-
-
-
-
-
-
-
- -
-
- name
-
- :
-
- (string)
-
- the name to use for the alignment
-
- (optional)
-
-
-
-
-
-
- -
-
- horizontal_align
-
- :
-
- (string)
-
- the horizontal alignment of the elements in this flow
-
- (default: 'right')
-
-
-
-
-
-
- -
-
- vertical_align
-
- :
-
- (string)
-
- the vertical alignment of the elements in this flow
-
- (default: 'center')
-
-
-
-
-
-
-
-
-
Returns:
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Destroies an element but tests for it being present and valid first
-
-
-
-
Parameters:
-
-
-
-
-
-
-
- -
-
- element
-
- :
-
- (LuaGuiElement)
-
- the element to be destroied
-
-
-
-
-
-
-
-
-
-
Returns:
-
- -
- (boolean)
- true if it was destoried
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Creates a scroll area with a table inside, table can be any size
-
-
-
-
Parameters:
-
-
-
-
-
-
-
- -
-
- element
-
- :
-
- (LuaGuiElement)
-
- the element to add this scroll into
-
-
-
-
-
-
-
- -
-
- table_size
-
- :
-
- (number)
-
- the number of columns in the table
-
-
-
-
-
-
-
- -
-
- maximal_height
-
- :
-
- (number)
-
- the max hieght of the scroll
-
-
-
-
-
-
-
- -
-
- name
-
- :
-
- (string)
-
- the name of the scoll element
-
- (default: 'scroll')
-
-
-
-
-
-
-
-
-
Returns:
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Creates a header section with a label and button area
-
-
-
-
Parameters:
-
-
-
-
-
-
-
- -
-
- element
-
- :
-
- (LuaGuiElement)
-
- the element to add this header into
-
-
-
-
-
-
-
- -
-
- caption
-
- :
-
- (localeString)
-
- the caption that is used as the title
-
-
-
-
-
-
-
- -
-
- tooltip
-
- :
-
- (localeString)
-
- the tooltip that is shown on the caption
-
- (optional)
-
-
-
-
-
-
- -
-
- right_align
-
- :
-
- (boolean)
-
- when true will include the right align area
-
- (optional)
-
-
-
-
-
-
- -
-
- name
-
- :
-
- (string)
-
- the name of the header area
-
- (default: 'header')
-
-
-
-
-
-
-
-
-
Returns:
-
- -
- (LuaGuiElement)
- the header that was made, or the align area if that was created
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- -
-
-
-
- -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Creates a new button element define
-
-
-
-
Parameters:
-
-
-
-
-
-
-
- -
-
- name
-
- :
-
- (string)
-
- the optional debug name that can be added
-
- (optional)
-
-
-
-
-
-
-
-
-
Returns:
-
- -
- (table)
- the new button element define
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Adds sprites to a button making it a sprite button
-
-
-
-
Parameters:
-
-
-
-
-
-
-
- -
-
- sprite
-
- :
-
- (SpritePath)
-
- the sprite path for the default sprite for the button
-
-
-
-
-
-
-
- -
-
- hovered_sprite
-
- :
-
- (SpritePath)
-
- the sprite path for the sprite when the player hovers over the button
-
- (optional)
-
-
-
-
-
-
- -
-
- clicked_sprite
-
- :
-
- (SpritePath)
-
- the sprite path for the sprite when the player clicks the button
-
- (optional)
-
-
-
-
-
-
-
-
-
Returns:
-
- -
- (self)
- returns the button define to allow chaining
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Adds a click / mouse button filter to the button
-
-
-
-
Parameters:
-
-
-
-
-
-
-
- -
-
- filter
-
- :
-
- (table)
-
- ?string|table either a of mouse buttons or the first mouse button to filter, with a table true means allowed
-
-
-
-
-
-
-
- -
-
- ...
-
- :
-
- (table)
-
- when filter is not a you can add the mouse buttons one after each other
-
- (optional)
-
-
-
-
-
-
-
-
-
Returns:
-
- -
- (self)
- returns the button define to allow chaining
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Adds a control key filter to the button
-
-
-
-
Parameters:
-
-
-
-
-
-
-
- -
-
- filter
-
- :
-
- (table)
-
- ?string|table either a of control keys or the first control keys to filter, with a table true means allowed
-
-
-
-
-
-
-
- -
-
- ...
-
- :
-
- (table)
-
- when filter is not a you can add the control keys one after each other
-
- (optional)
-
-
-
-
-
-
-
-
-
Returns:
-
- -
- (self)
- returns the button define to allow chaining
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- -
-
-
-
- -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-