diff --git a/docs/addons/Advanced-Start.html b/docs/addons/Advanced-Start.html index f1689524..29b030ea 100644 --- a/docs/addons/Advanced-Start.html +++ b/docs/addons/Advanced-Start.html @@ -348,7 +348,7 @@ generated by LDoc diff --git a/docs/addons/Chat-Popups.html b/docs/addons/Chat-Popups.html index e6749dcd..729893a0 100644 --- a/docs/addons/Chat-Popups.html +++ b/docs/addons/Chat-Popups.html @@ -349,7 +349,7 @@ generated by LDoc diff --git a/docs/addons/Chat-Reply.html b/docs/addons/Chat-Reply.html index bf0b3043..1e856b8f 100644 --- a/docs/addons/Chat-Reply.html +++ b/docs/addons/Chat-Reply.html @@ -376,7 +376,7 @@ generated by LDoc diff --git a/docs/addons/Compilatron.html b/docs/addons/Compilatron.html index a0e1cfcf..5aae0a19 100644 --- a/docs/addons/Compilatron.html +++ b/docs/addons/Compilatron.html @@ -585,7 +585,7 @@ generated by LDoc diff --git a/docs/addons/Damage-Popups.html b/docs/addons/Damage-Popups.html index d0a30aa0..e4b67042 100644 --- a/docs/addons/Damage-Popups.html +++ b/docs/addons/Damage-Popups.html @@ -349,7 +349,7 @@ generated by LDoc diff --git a/docs/addons/Death-Logger.html b/docs/addons/Death-Logger.html index 1eefd356..4cf1acfd 100644 --- a/docs/addons/Death-Logger.html +++ b/docs/addons/Death-Logger.html @@ -404,7 +404,7 @@ generated by LDoc diff --git a/docs/addons/Discord-Alerts.html b/docs/addons/Discord-Alerts.html index 42c5fbd8..0b836551 100644 --- a/docs/addons/Discord-Alerts.html +++ b/docs/addons/Discord-Alerts.html @@ -460,7 +460,7 @@ generated by LDoc diff --git a/docs/addons/Player-Colours.html b/docs/addons/Player-Colours.html index 3081c6fa..e7f8df76 100644 --- a/docs/addons/Player-Colours.html +++ b/docs/addons/Player-Colours.html @@ -404,7 +404,7 @@ generated by LDoc diff --git a/docs/addons/Pollution-Grading.html b/docs/addons/Pollution-Grading.html index 9cca3b35..10a168f1 100644 --- a/docs/addons/Pollution-Grading.html +++ b/docs/addons/Pollution-Grading.html @@ -320,7 +320,7 @@ generated by LDoc diff --git a/docs/addons/Scorched-Earth.html b/docs/addons/Scorched-Earth.html index 7024e35e..38130265 100644 --- a/docs/addons/Scorched-Earth.html +++ b/docs/addons/Scorched-Earth.html @@ -404,7 +404,7 @@ generated by LDoc diff --git a/docs/addons/Spawn-Area.html b/docs/addons/Spawn-Area.html index 8b23f8b4..0e7e5b27 100644 --- a/docs/addons/Spawn-Area.html +++ b/docs/addons/Spawn-Area.html @@ -376,7 +376,7 @@ generated by LDoc diff --git a/docs/commands/Admin-Chat.html b/docs/commands/Admin-Chat.html index 50386c57..76b7a927 100644 --- a/docs/commands/Admin-Chat.html +++ b/docs/commands/Admin-Chat.html @@ -388,7 +388,7 @@ generated by LDoc diff --git a/docs/commands/Bonus.html b/docs/commands/Bonus.html index 99979a83..87956b1c 100644 --- a/docs/commands/Bonus.html +++ b/docs/commands/Bonus.html @@ -500,7 +500,7 @@ generated by LDoc diff --git a/docs/commands/Cheat-Mode.html b/docs/commands/Cheat-Mode.html index 05be743e..e1423804 100644 --- a/docs/commands/Cheat-Mode.html +++ b/docs/commands/Cheat-Mode.html @@ -361,7 +361,7 @@ generated by LDoc diff --git a/docs/commands/Clear-Inventory.html b/docs/commands/Clear-Inventory.html index 2632583e..54f08873 100644 --- a/docs/commands/Clear-Inventory.html +++ b/docs/commands/Clear-Inventory.html @@ -388,7 +388,7 @@ generated by LDoc diff --git a/docs/commands/Debug.html b/docs/commands/Debug.html index 18b07c71..11c0c3e7 100644 --- a/docs/commands/Debug.html +++ b/docs/commands/Debug.html @@ -365,7 +365,7 @@ generated by LDoc diff --git a/docs/commands/Find.html b/docs/commands/Find.html index 9dcfd43f..a12b13bf 100644 --- a/docs/commands/Find.html +++ b/docs/commands/Find.html @@ -360,7 +360,7 @@ generated by LDoc diff --git a/docs/commands/Help.html b/docs/commands/Help.html index b7a7c97e..563e5eed 100644 --- a/docs/commands/Help.html +++ b/docs/commands/Help.html @@ -404,7 +404,7 @@ generated by LDoc diff --git a/docs/commands/Home.html b/docs/commands/Home.html index 2eaa26e9..0d208a2e 100644 --- a/docs/commands/Home.html +++ b/docs/commands/Home.html @@ -458,7 +458,7 @@ generated by LDoc diff --git a/docs/commands/Interface.html b/docs/commands/Interface.html index 36f1fa37..d7ed49ae 100644 --- a/docs/commands/Interface.html +++ b/docs/commands/Interface.html @@ -416,7 +416,7 @@ generated by LDoc diff --git a/docs/commands/Jail.html b/docs/commands/Jail.html index 0ef7ecfc..445572af 100644 --- a/docs/commands/Jail.html +++ b/docs/commands/Jail.html @@ -611,7 +611,7 @@ generated by LDoc diff --git a/docs/commands/Kill.html b/docs/commands/Kill.html index 186c5ea4..11f47477 100644 --- a/docs/commands/Kill.html +++ b/docs/commands/Kill.html @@ -389,7 +389,7 @@ generated by LDoc diff --git a/docs/commands/Me.html b/docs/commands/Me.html index 3157f4bb..7c57749b 100644 --- a/docs/commands/Me.html +++ b/docs/commands/Me.html @@ -360,7 +360,7 @@ generated by LDoc diff --git a/docs/commands/Rainbow.html b/docs/commands/Rainbow.html index 6a569356..2b976778 100644 --- a/docs/commands/Rainbow.html +++ b/docs/commands/Rainbow.html @@ -388,7 +388,7 @@ generated by LDoc diff --git a/docs/commands/Repair.html b/docs/commands/Repair.html index e4b1efd1..6b28834e 100644 --- a/docs/commands/Repair.html +++ b/docs/commands/Repair.html @@ -321,7 +321,7 @@ generated by LDoc diff --git a/docs/commands/Reports.html b/docs/commands/Reports.html index baeb2896..f144b25a 100644 --- a/docs/commands/Reports.html +++ b/docs/commands/Reports.html @@ -585,7 +585,7 @@ generated by LDoc diff --git a/docs/commands/Roles.html b/docs/commands/Roles.html index 63985463..5332aba1 100644 --- a/docs/commands/Roles.html +++ b/docs/commands/Roles.html @@ -557,7 +557,7 @@ generated by LDoc diff --git a/docs/commands/Spawn.html b/docs/commands/Spawn.html index 0e9f0d69..507f63c1 100644 --- a/docs/commands/Spawn.html +++ b/docs/commands/Spawn.html @@ -389,7 +389,7 @@ generated by LDoc diff --git a/docs/commands/Tag.html b/docs/commands/Tag.html index b811ef43..0d4b6f40 100644 --- a/docs/commands/Tag.html +++ b/docs/commands/Tag.html @@ -443,7 +443,7 @@ generated by LDoc diff --git a/docs/commands/Teleport.html b/docs/commands/Teleport.html index 37c1228c..6a947dd1 100644 --- a/docs/commands/Teleport.html +++ b/docs/commands/Teleport.html @@ -484,7 +484,7 @@ generated by LDoc diff --git a/docs/commands/Warnings.html b/docs/commands/Warnings.html index 09a0bc29..93d4c25c 100644 --- a/docs/commands/Warnings.html +++ b/docs/commands/Warnings.html @@ -569,7 +569,7 @@ generated by LDoc diff --git a/docs/configs/Advanced-Start.html b/docs/configs/Advanced-Start.html index d384d219..1b9f695a 100644 --- a/docs/configs/Advanced-Start.html +++ b/docs/configs/Advanced-Start.html @@ -506,7 +506,7 @@ generated by LDoc diff --git a/docs/configs/Bonuses.html b/docs/configs/Bonuses.html index 0917c4d5..d9e819ed 100644 --- a/docs/configs/Bonuses.html +++ b/docs/configs/Bonuses.html @@ -237,7 +237,7 @@ generated by LDoc diff --git a/docs/configs/Chat-Reply.html b/docs/configs/Chat-Reply.html index ea3028b1..a9bb8b8e 100644 --- a/docs/configs/Chat-Reply.html +++ b/docs/configs/Chat-Reply.html @@ -485,7 +485,7 @@ generated by LDoc diff --git a/docs/configs/Commands-Auth-Admin.html b/docs/configs/Commands-Auth-Admin.html index 7bd92c05..1dbe5aa9 100644 --- a/docs/configs/Commands-Auth-Admin.html +++ b/docs/configs/Commands-Auth-Admin.html @@ -294,7 +294,7 @@ generated by LDoc diff --git a/docs/configs/Commands-Auth-Roles.html b/docs/configs/Commands-Auth-Roles.html index da7c62d3..37c7cd4f 100644 --- a/docs/configs/Commands-Auth-Roles.html +++ b/docs/configs/Commands-Auth-Roles.html @@ -320,7 +320,7 @@ generated by LDoc diff --git a/docs/configs/Commands-Auth-Runtime-Disable.html b/docs/configs/Commands-Auth-Runtime-Disable.html index b4d1c559..ed6b5013 100644 --- a/docs/configs/Commands-Auth-Runtime-Disable.html +++ b/docs/configs/Commands-Auth-Runtime-Disable.html @@ -442,7 +442,7 @@ generated by LDoc diff --git a/docs/configs/Commands-Parse-Roles.html b/docs/configs/Commands-Parse-Roles.html index fa0b0c81..7f2f664c 100644 --- a/docs/configs/Commands-Parse-Roles.html +++ b/docs/configs/Commands-Parse-Roles.html @@ -354,7 +354,7 @@ generated by LDoc diff --git a/docs/configs/Commands-Parse.html b/docs/configs/Commands-Parse.html index 4da164e4..1088875e 100644 --- a/docs/configs/Commands-Parse.html +++ b/docs/configs/Commands-Parse.html @@ -338,7 +338,7 @@ see ./expcore/commands.lua for more details

generated by LDoc diff --git a/docs/configs/Compilatron.html b/docs/configs/Compilatron.html index 9e941609..eff5b319 100644 --- a/docs/configs/Compilatron.html +++ b/docs/configs/Compilatron.html @@ -354,7 +354,7 @@ generated by LDoc diff --git a/docs/configs/Death-Logger.html b/docs/configs/Death-Logger.html index 4bc70ffb..a36763e7 100644 --- a/docs/configs/Death-Logger.html +++ b/docs/configs/Death-Logger.html @@ -416,7 +416,7 @@ generated by LDoc diff --git a/docs/configs/Discord-Alerts.html b/docs/configs/Discord-Alerts.html index 07f576a8..707ef9e0 100644 --- a/docs/configs/Discord-Alerts.html +++ b/docs/configs/Discord-Alerts.html @@ -237,7 +237,7 @@ generated by LDoc diff --git a/docs/configs/File-Loader.html b/docs/configs/File-Loader.html index b17c2ac5..014a6eb1 100644 --- a/docs/configs/File-Loader.html +++ b/docs/configs/File-Loader.html @@ -240,7 +240,7 @@ generated by LDoc diff --git a/docs/configs/Permission-Groups.html b/docs/configs/Permission-Groups.html index d8d2b6e5..a73c2fd9 100644 --- a/docs/configs/Permission-Groups.html +++ b/docs/configs/Permission-Groups.html @@ -295,7 +295,7 @@ generated by LDoc diff --git a/docs/configs/Player-List.html b/docs/configs/Player-List.html index 7767e286..8549d098 100644 --- a/docs/configs/Player-List.html +++ b/docs/configs/Player-List.html @@ -812,7 +812,7 @@ generated by LDoc diff --git a/docs/configs/Pollution-Grading.html b/docs/configs/Pollution-Grading.html index 9dc1dde3..bbbfd915 100644 --- a/docs/configs/Pollution-Grading.html +++ b/docs/configs/Pollution-Grading.html @@ -384,7 +384,7 @@ generated by LDoc diff --git a/docs/configs/Popup-Messages.html b/docs/configs/Popup-Messages.html index f7509b4e..32e29c71 100644 --- a/docs/configs/Popup-Messages.html +++ b/docs/configs/Popup-Messages.html @@ -414,7 +414,7 @@ generated by LDoc diff --git a/docs/configs/Preset-Player-Colours.html b/docs/configs/Preset-Player-Colours.html index ebaf5a99..c8bf9fbf 100644 --- a/docs/configs/Preset-Player-Colours.html +++ b/docs/configs/Preset-Player-Colours.html @@ -324,7 +324,7 @@ generated by LDoc diff --git a/docs/configs/Repair.html b/docs/configs/Repair.html index e25605ab..e1a9a323 100644 --- a/docs/configs/Repair.html +++ b/docs/configs/Repair.html @@ -414,7 +414,7 @@ generated by LDoc diff --git a/docs/configs/Rockets.html b/docs/configs/Rockets.html index 6d00c415..62eb1728 100644 --- a/docs/configs/Rockets.html +++ b/docs/configs/Rockets.html @@ -834,7 +834,7 @@ generated by LDoc diff --git a/docs/configs/Roles.html b/docs/configs/Roles.html index f068d198..874df6b8 100644 --- a/docs/configs/Roles.html +++ b/docs/configs/Roles.html @@ -292,7 +292,7 @@ generated by LDoc diff --git a/docs/configs/Science.html b/docs/configs/Science.html index 70d9b4bf..e859f833 100644 --- a/docs/configs/Science.html +++ b/docs/configs/Science.html @@ -354,7 +354,7 @@ generated by LDoc diff --git a/docs/configs/Scorched-Earth.html b/docs/configs/Scorched-Earth.html index 7b59c252..85d2ef15 100644 --- a/docs/configs/Scorched-Earth.html +++ b/docs/configs/Scorched-Earth.html @@ -388,7 +388,7 @@ generated by LDoc diff --git a/docs/configs/Spawn-Area.html b/docs/configs/Spawn-Area.html index 22399910..2e155710 100644 --- a/docs/configs/Spawn-Area.html +++ b/docs/configs/Spawn-Area.html @@ -744,7 +744,7 @@ generated by LDoc diff --git a/docs/configs/Tasks.html b/docs/configs/Tasks.html index d4eabb34..f3c900cb 100644 --- a/docs/configs/Tasks.html +++ b/docs/configs/Tasks.html @@ -384,7 +384,7 @@ generated by LDoc diff --git a/docs/configs/Warnings.html b/docs/configs/Warnings.html index fdf89564..c0ea648d 100644 --- a/docs/configs/Warnings.html +++ b/docs/configs/Warnings.html @@ -355,7 +355,7 @@ generated by LDoc diff --git a/docs/configs/Warps.html b/docs/configs/Warps.html index 8fb76e39..733ce562 100644 --- a/docs/configs/Warps.html +++ b/docs/configs/Warps.html @@ -684,7 +684,7 @@ generated by LDoc diff --git a/docs/control/Jail.html b/docs/control/Jail.html index 6280d0cf..7d265c02 100644 --- a/docs/control/Jail.html +++ b/docs/control/Jail.html @@ -1208,7 +1208,7 @@ generated by LDoc diff --git a/docs/control/Production.html b/docs/control/Production.html index 5d253abf..6f029de5 100644 --- a/docs/control/Production.html +++ b/docs/control/Production.html @@ -1329,7 +1329,7 @@ generated by LDoc diff --git a/docs/control/Reports.html b/docs/control/Reports.html index d8056fbf..6be2fb65 100644 --- a/docs/control/Reports.html +++ b/docs/control/Reports.html @@ -1110,7 +1110,7 @@ generated by LDoc diff --git a/docs/control/Rockets.html b/docs/control/Rockets.html index 6a64ec4b..7c71c6cf 100644 --- a/docs/control/Rockets.html +++ b/docs/control/Rockets.html @@ -984,7 +984,7 @@ generated by LDoc diff --git a/docs/control/Tasks.html b/docs/control/Tasks.html index e0504c47..60b19b90 100644 --- a/docs/control/Tasks.html +++ b/docs/control/Tasks.html @@ -1039,7 +1039,7 @@ generated by LDoc diff --git a/docs/control/Warnings.html b/docs/control/Warnings.html index b981575f..9e9d84c0 100644 --- a/docs/control/Warnings.html +++ b/docs/control/Warnings.html @@ -1465,7 +1465,7 @@ generated by LDoc diff --git a/docs/control/Warps.html b/docs/control/Warps.html index 0abafcc4..ee053dfd 100644 --- a/docs/control/Warps.html +++ b/docs/control/Warps.html @@ -1413,7 +1413,7 @@ generated by LDoc diff --git a/docs/core/Commands.html b/docs/core/Commands.html index 1fdcc0fb..69af7268 100644 --- a/docs/core/Commands.html +++ b/docs/core/Commands.html @@ -1972,7 +1972,7 @@ generated by LDoc diff --git a/docs/core/Common-Library.html b/docs/core/Common-Library.html index 79f75a57..4cb1b6be 100644 --- a/docs/core/Common-Library.html +++ b/docs/core/Common-Library.html @@ -2480,7 +2480,7 @@ generated by LDoc diff --git a/docs/core/Gui.html b/docs/core/Gui.html index b0e22e17..fd557709 100644 --- a/docs/core/Gui.html +++ b/docs/core/Gui.html @@ -233,6 +233,41 @@ +

Usage

+
-- Making the base button concept
+local button =
+Gui.new_concept('Button')
+:new_event('on_click',defines.events.on_gui_click)
+:new_property('tooltip')
+:new_property('caption',nil,function(properties,value)
+    properties.caption = value
+    properties.sprite = nil
+    properties.type = 'button'
+end)
+:new_property('sprite',nil,function(properties,value)
+    properties.image = value
+    properties.caption = nil
+    properties.type = 'sprite-button'
+end)
+
-- Makeing a alternative button based on the first
+local custom_button =
+button:clone('CustomButton')
+:new_event('on_admin_clicked',defines.events.on_gui_click,function(event)
+    return event.player.admin -- only raise custom event when an admin clicks the button
+end)
+: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)
+:on_admin_clicked(function(event)
+    -- Yes i know this can just be an if else but its an example
+    game.print(event.player.name..' pressed my admin button')
+end)
+
-- Drawing a concept
+custom_button:draw(game.player.gui.left)
@@ -404,8 +439,8 @@ Usage: -

-local custom_button =
+    
-- Clones the base Button concept to make a alternative button
+local custom_button =
 Gui.get_concept('Button'):clone('CustomButton')
@@ -499,8 +534,8 @@ Gui.get_concept('Button'):clone( Usage: -

-local custom_button =
+    
-- Adds an on_admin_clicked event to fire when ever an admin clicks the button
+local custom_button =
 Gui.get_concept('Button'):clone('CustomButton')
 :new_event('on_admin_clicked',defines.events.on_gui_click,function(event)
     return event.player.admin -- only raise custom event when an admin clicks the button
@@ -563,9 +598,9 @@ Gui.get_concept('Button'):clone(
     Usage:
-    

-local custom_button =
-Gui.get_concept('CustomButton'):clone('MyCustomButton')
+    
-- When an admin clicks the button a message is printed
+local custom_button =
+Gui.get_concept('CustomButton')
 :on_admin_clicked(function(event)
     game.print(event.player.name..' pressed my admin button')
 end)
@@ -654,8 +689,8 @@ Gui.get_concept('CustomButton'):clone( -local custom_button = +
-- Raising the custom event on_admin_clicked
+local custom_button =
 Gui.get_concept('CustomButton')
 
 -- Note that this is an example and would not work due it expecting a valid element for event.element
@@ -754,8 +789,8 @@ Gui.get_concept('CustomButton')
 
     
     Usage:
-    

-local button =
+    
-- Adding caption, sprite, and tooltip to the base button concept
+local button =
 Gui.get_concept('Button')
 :new_property('tooltip')
 :new_property('caption',nil,function(properties,value)
@@ -826,12 +861,11 @@ Gui.get_concept('Button')
 
     
     Usage:
-    

-local custom_button =
+    
-- Setting the caption on the base button concept after a cloning
+local custom_button =
 Gui.get_concept('Button')
 :set_caption('Default Button')
-

--- In our examples CustomButton is cloned from Button, this means the caption property already exists
+    
-- In our examples CustomButton is cloned from Button, this means the caption property already exists
 -- note that what ever values that properties have at the time of cloning are also copied
 local custom_button =
 Gui.get_concept('CustomButton')
@@ -894,8 +928,8 @@ Gui.get_concept('CustomButton')
 
     
     Usage:
-    

-local button =
+    
-- Adding the draw define for the base button concept, we then return the element
+local button =
 Gui.get_concept('Button')
 :define_draw(function(properties,parent,element)
     -- Note that element might be nil if this is the first draw function
@@ -981,8 +1015,8 @@ Gui.get_concept('Button')
 
     
     Usage:
-    

-local custom_button =
+    
-- Drawing the custom button concept
+local custom_button =
 Gui.get_concept('CustomButton')
 
 -- Note that the draw function from button was cloned, so unless we want to alter the base button we dont need a new draw define
@@ -1049,8 +1083,8 @@ Gui.get_concept('CustomButton')
 
     
     Usage:
-    

--- Note even thou this is a copy of Button; if Button had an instance store it would not be cloned over
+    
-- Allowing storing instances of the custom button; stored by the players index
+-- Note even thou this is a copy of Button; if Button had an instance store it would not be cloned over
 local custom_button =
 Gui.get_concept('CustomButton')
 :define_instance_store(function(element)
@@ -1115,8 +1149,8 @@ Gui.get_concept('CustomButton')
 
     
     Usage:
-    

-local custom_button =
+    
-- Getting all the instances of the player with index 1
+local custom_button =
 Gui.get_concept('CustomButton')
 
 custom_button.get_instances(1) -- player index 1
@@ -1188,8 +1222,8 @@ custom_button.get_instances(1) -- player index Usage: -

-local custom_button =
+    
-- Adding an element as a instance for this concept, mostly for internal use
+local custom_button =
 Gui.get_concept('CustomButton')
 
 custom_button.add_instance(element) -- normally not needed due to use in concept:draw
@@ -1261,12 +1295,11 @@ custom_button.add_instance(element) -- normally not Usage: -

-local custom_button =
+    
-- Changing the font color of all instances for player 1
+local custom_button =
 Gui.get_concept('CustomButton')
 
--- Change all the instances to have red text for player 1
-custom_button.update_instances(1,function(element)
+custom_button.update_instances(1,function(element)
     element.style.font_color = {r=1,g=0,b=0}
 end)
@@ -1331,8 +1364,8 @@ Gui.get_concept('CustomButton') Usage: -

--- Note even thou this is a copy of Button; if Button had an data store it would not be cloned over
+    
-- Adding a way to store data for this concept; each player has their own store
+-- Note even thou this is a copy of Button; if Button had an data store it would not be cloned over
 local custom_button =
 Gui.get_concept('CustomButton')
 :define_data_store(function(element)
@@ -1397,8 +1430,8 @@ Gui.get_concept('CustomButton')
 
     
     Usage:
-    

-local custom_button =
+    
-- Getting the stored data for player 1
+local custom_button =
 Gui.get_concept('CustomButton')
 
 custom_button.get_data(1) -- player index 1
@@ -1470,8 +1503,8 @@ custom_button.get_data(1) -- player index Usage: -

-local custom_button =
+    
-- Setting the data for player 1 to a table with two keys
+local custom_button =
 Gui.get_concept('CustomButton')
 
 -- A table is used to show correct way to use a table with self.update_data
@@ -1532,8 +1565,8 @@ Gui.get_concept('CustomButton')
 
     
     Usage:
-    

-local custom_button =
+    
-- Clearing the data for player 1
+local custom_button =
 Gui.get_concept('CustomButton')
 
 custom_button.clear_data(1) -- player index 1
@@ -1605,16 +1638,15 @@ custom_button.clear_data(1) -- player index Usage: -

-local custom_button =
+    
-- Updating the clicks key in the concept data for player 1
+local custom_button =
 Gui.get_concept('CustomButton')
 
 custom_button.update_data(1,function(tbl)
     tbl.clicks = tbl.clicks + 1 -- here we are incrementing the clicks by 1
 end) -- player index 1
 
-

--- Alterative method more useful when not using a table
+    
-- Updating a value when a table is not used, alterative to get set
 -- so for this example assume that we did custom_button.set_data(1,0)
 custom_button.update_data(1,function(value)
     return value + 1 -- here we are incrementing the value by 1, we may only be tracking clicks
@@ -1710,8 +1742,8 @@ custom_button.update_data(1,fu
 
     
     Usage:
-    

-local custom_button =
+    
-- Adding a way to sync captions bettween all instances, more useful for things that arnt buttons
+local custom_button =
 Gui.get_concept('CustomButton')
 :define_combined_store(
 function(element)
@@ -1774,8 +1806,8 @@ Gui.get_concept('CustomButton')
 
     
     Usage:
-    

-local custom_button =
+    
-- Setting the caption of this element to be the same as the stored value
+local custom_button =
 Gui.get_concept('CustomButton')
 
 -- Used internally when first draw and automatically when the store updates
@@ -1831,8 +1863,8 @@ Gui.get_concept('CustomButton')
 
     
     Usage:
-    

-local custom_button =
+    
-- Setting the stored value to be the same as the caption for this element
+local custom_button =
 Gui.get_concept('CustomButton')
 
 -- You may want to use this with gui events
@@ -1855,7 +1887,7 @@ Gui.get_concept('CustomButton')
     generated by LDoc 
     
     
     
     
diff --git a/docs/core/Permissions-Groups.html b/docs/core/Permissions-Groups.html
index 3a4c5455..4befca44 100644
--- a/docs/core/Permissions-Groups.html
+++ b/docs/core/Permissions-Groups.html
@@ -1432,7 +1432,7 @@
     generated by LDoc 
     
     
     
     
diff --git a/docs/core/Roles.html b/docs/core/Roles.html
index 3354671f..a2bef34f 100644
--- a/docs/core/Roles.html
+++ b/docs/core/Roles.html
@@ -3152,7 +3152,7 @@
     generated by LDoc 
     
     
     
     
diff --git a/docs/core/Store.html b/docs/core/Store.html
index 56ffe579..6026f246 100644
--- a/docs/core/Store.html
+++ b/docs/core/Store.html
@@ -1128,7 +1128,7 @@ Store.register(team_scores,function(value,key)
     generated by LDoc 
     
     
     
     
diff --git a/docs/core/Sudo.html b/docs/core/Sudo.html
index 75ba5a96..b037fbf6 100644
--- a/docs/core/Sudo.html
+++ b/docs/core/Sudo.html
@@ -544,7 +544,7 @@
     generated by LDoc 
     
     
     
     
diff --git a/docs/guis/Player-List.html b/docs/guis/Player-List.html
index 5f4b98d8..8aa3ef94 100644
--- a/docs/guis/Player-List.html
+++ b/docs/guis/Player-List.html
@@ -626,7 +626,7 @@
     generated by LDoc 
     
     
     
     
diff --git a/docs/guis/Rocket-Info.html b/docs/guis/Rocket-Info.html
index 4419add4..49db82bf 100644
--- a/docs/guis/Rocket-Info.html
+++ b/docs/guis/Rocket-Info.html
@@ -629,7 +629,7 @@
     generated by LDoc 
     
     
     
     
diff --git a/docs/guis/Science-Info.html b/docs/guis/Science-Info.html
index bb73a355..1d910135 100644
--- a/docs/guis/Science-Info.html
+++ b/docs/guis/Science-Info.html
@@ -449,7 +449,7 @@
     generated by LDoc 
     
     
     
     
diff --git a/docs/guis/Task-List.html b/docs/guis/Task-List.html
index 076de4f3..8b3221fb 100644
--- a/docs/guis/Task-List.html
+++ b/docs/guis/Task-List.html
@@ -632,7 +632,7 @@
     generated by LDoc 
     
     
     
     
diff --git a/docs/guis/Warps-List.html b/docs/guis/Warps-List.html
index ba48ab73..0a12a90f 100644
--- a/docs/guis/Warps-List.html
+++ b/docs/guis/Warps-List.html
@@ -837,7 +837,7 @@
     generated by LDoc 
     
     
     
     
diff --git a/docs/index.html b/docs/index.html
index 2c08495e..bd8cb83a 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -510,7 +510,7 @@ see ./expcore/commands.lua for more details
     generated by LDoc 
     
     
     
     
diff --git a/docs/modules/control.html b/docs/modules/control.html
index 5fa17272..c79d10b4 100644
--- a/docs/modules/control.html
+++ b/docs/modules/control.html
@@ -351,7 +351,7 @@
     generated by LDoc 
     
     
     
     
diff --git a/docs/modules/utils.alien_evolution_progress.html b/docs/modules/utils.alien_evolution_progress.html
index fea3e318..a8dd8517 100644
--- a/docs/modules/utils.alien_evolution_progress.html
+++ b/docs/modules/utils.alien_evolution_progress.html
@@ -419,7 +419,7 @@ fraction will decide a chance to spawn. 1 alien for 2 spawner's will have 50% on
     generated by LDoc 
     
     
     
     
diff --git a/docs/modules/utils.core.html b/docs/modules/utils.core.html
index 3ca21622..d3329c77 100644
--- a/docs/modules/utils.core.html
+++ b/docs/modules/utils.core.html
@@ -1164,7 +1164,7 @@
     generated by LDoc 
     
     
     
     
diff --git a/docs/modules/utils.debug.html b/docs/modules/utils.debug.html
index 5d26a71d..5e50472a 100644
--- a/docs/modules/utils.debug.html
+++ b/docs/modules/utils.debug.html
@@ -654,7 +654,7 @@
     generated by LDoc 
     
     
     
     
diff --git a/docs/modules/utils.dump_env.html b/docs/modules/utils.dump_env.html
index 772f991a..ef683374 100644
--- a/docs/modules/utils.dump_env.html
+++ b/docs/modules/utils.dump_env.html
@@ -323,7 +323,7 @@
     generated by LDoc 
     
     
     
     
diff --git a/docs/modules/utils.event.html b/docs/modules/utils.event.html
index 2db04168..9f27e495 100644
--- a/docs/modules/utils.event.html
+++ b/docs/modules/utils.event.html
@@ -1292,7 +1292,7 @@
     generated by LDoc 
     
     
     
     
diff --git a/docs/modules/utils.event_core.html b/docs/modules/utils.event_core.html
index a9251bb1..d369a623 100644
--- a/docs/modules/utils.event_core.html
+++ b/docs/modules/utils.event_core.html
@@ -434,7 +434,7 @@
     generated by LDoc 
     
     
     
     
diff --git a/docs/modules/utils.math.html b/docs/modules/utils.math.html
index 219edb14..78cd66e7 100644
--- a/docs/modules/utils.math.html
+++ b/docs/modules/utils.math.html
@@ -338,7 +338,7 @@
     generated by LDoc 
     
     
     
     
diff --git a/docs/modules/utils.recipe_locker.html b/docs/modules/utils.recipe_locker.html
index 08b3b0dc..dc87e650 100644
--- a/docs/modules/utils.recipe_locker.html
+++ b/docs/modules/utils.recipe_locker.html
@@ -441,7 +441,7 @@
     generated by LDoc 
     
     
     
     
diff --git a/docs/modules/utils.state_machine.html b/docs/modules/utils.state_machine.html
index d609ecb6..394ccfb3 100644
--- a/docs/modules/utils.state_machine.html
+++ b/docs/modules/utils.state_machine.html
@@ -752,7 +752,7 @@
     generated by LDoc 
     
     
     
     
diff --git a/docs/modules/utils.table.html b/docs/modules/utils.table.html
index f3b85d5b..406abc06 100644
--- a/docs/modules/utils.table.html
+++ b/docs/modules/utils.table.html
@@ -1382,7 +1382,7 @@
     generated by LDoc 
     
     
     
     
diff --git a/docs/modules/utils.task.html b/docs/modules/utils.task.html
index 5284f6e4..e70b97ec 100644
--- a/docs/modules/utils.task.html
+++ b/docs/modules/utils.task.html
@@ -651,7 +651,7 @@
     generated by LDoc 
     
     
     
     
diff --git a/docs/modules/utils.timestamp.html b/docs/modules/utils.timestamp.html
index 10e8d500..54faeee6 100644
--- a/docs/modules/utils.timestamp.html
+++ b/docs/modules/utils.timestamp.html
@@ -442,7 +442,7 @@
     generated by LDoc 
     
     
     
     
diff --git a/docs/topics/license.html b/docs/topics/license.html
index 66afe33d..79b030c8 100644
--- a/docs/topics/license.html
+++ b/docs/topics/license.html
@@ -789,7 +789,7 @@ Public License instead of this License.  But first, please read
     generated by LDoc 
     
     
     
     
diff --git a/docs/topics/readme.md.html b/docs/topics/readme.md.html
index 58c0a663..419754b9 100644
--- a/docs/topics/readme.md.html
+++ b/docs/topics/readme.md.html
@@ -332,7 +332,7 @@
     generated by LDoc 
     
     
     
     
diff --git a/expcore/gui.lua b/expcore/gui.lua
index 351eafdc..3dbe55df 100644
--- a/expcore/gui.lua
+++ b/expcore/gui.lua
@@ -1,6 +1,43 @@
 --[[-- Core Module - Gui
     @core Gui
     @alias Gui
+
+@usage-- Making the base button concept
+local button =
+Gui.new_concept('Button')
+:new_event('on_click',defines.events.on_gui_click)
+:new_property('tooltip')
+:new_property('caption',nil,function(properties,value)
+    properties.caption = value
+    properties.sprite = nil
+    properties.type = 'button'
+end)
+:new_property('sprite',nil,function(properties,value)
+    properties.image = value
+    properties.caption = nil
+    properties.type = 'sprite-button'
+end)
+
+@usage-- Makeing a alternative button based on the first
+local custom_button =
+button:clone('CustomButton')
+:new_event('on_admin_clicked',defines.events.on_gui_click,function(event)
+    return event.player.admin -- only raise custom event when an admin clicks the button
+end)
+: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)
+:on_admin_clicked(function(event)
+    -- Yes i know this can just be an if else but its an example
+    game.print(event.player.name..' pressed my admin button')
+end)
+
+@usage-- Drawing a concept
+custom_button:draw(game.player.gui.left)
 ]]
 
 local Gui = require 'expcore.gui.core'
diff --git a/expcore/gui/prototype.lua b/expcore/gui/prototype.lua
index cc84c5eb..4c92dfa5 100644
--- a/expcore/gui/prototype.lua
+++ b/expcore/gui/prototype.lua
@@ -2,7 +2,8 @@
     @module Gui
     @alias Prototype
 
-    @usage
+@usage DX note - chaning this doc string has no effect on the docs
+
 local button =
 Gui.new_concept('Button')
 :new_event('on_click',defines.events.on_gui_click)
@@ -74,7 +75,7 @@ end
 --[[-- Used to copy all the settings from one concept to another and removing links to the orginal
 @tparam string concept_name the name of the new concept; must be unique
 @treturn GuiConcept the base for building a custom gui
-@usage
+@usage-- Clones the base Button concept to make a alternative button
 local custom_button =
 Gui.get_concept('Button'):clone('CustomButton')
 ]]
@@ -124,7 +125,7 @@ end
 @tparam[opt] defines.events factorio_event when given will fire the custom event when the factorio event is raised
 @tparam[opt] function event_condition used to filter when a factorio event triggers the custom event; if the event contains a reference to an element then names are automatically filtered
 @treturn GuiConcept to allow chaing of functions
-@usage
+@usage-- Adds an on_admin_clicked event to fire when ever an admin clicks the button
 local custom_button =
 Gui.get_concept('Button'):clone('CustomButton')
 :new_event('on_admin_clicked',defines.events.on_gui_click,function(event)
@@ -141,9 +142,9 @@ function Prototype:new_event(event_name,factorio_event,event_condition)
 @function Prototype:on_custom_event
 @tparam function handler the function which will recive the event
 @treturn GuiConcept to allow chaing of functions
-@usage
+@usage-- When an admin clicks the button a message is printed
 local custom_button =
-Gui.get_concept('CustomButton'):clone('MyCustomButton')
+Gui.get_concept('CustomButton')
 :on_admin_clicked(function(event)
     game.print(event.player.name..' pressed my admin button')
 end)
@@ -179,7 +180,7 @@ end
 @tparam string event_name the name of the event that you want to raise
 @tparam[opt={}] table event table containg data you want to send with the event, some keys already included
 @tparam[opt=false] boolean from_factorio internal use, if the raise came from the factorio event handler
-@usage
+@usage-- Raising the custom event on_admin_clicked
 local custom_button =
 Gui.get_concept('CustomButton')
 
@@ -225,7 +226,7 @@ end
 @tparam any default the default value for this property, although not strictly required is is strongly recomented
 @tparam[opt] function setter_callback this function is called when set is called, if not provided then key in concept.properties is updated to new value
 @treturn GuiConcept to allow chaing of functions
-@usage
+@usage-- Adding caption, sprite, and tooltip to the base button concept
 local button =
 Gui.get_concept('Button')
 :new_property('tooltip')
@@ -253,13 +254,12 @@ function Prototype:new_property(property_name,default,setter_callback)
 @function Prototype:set_custom_property
 @tparam any value the value that you want to set for this property
 @treturn GuiConcept to allow chaing of functions
-@usage
+@usage-- Setting the caption on the base button concept after a cloning
 local custom_button =
 Gui.get_concept('Button')
 :set_caption('Default Button')
 
-@usage
--- In our examples CustomButton is cloned from Button, this means the caption property already exists
+@usage-- In our examples CustomButton is cloned from Button, this means the caption property already exists
 -- note that what ever values that properties have at the time of cloning are also copied
 local custom_button =
 Gui.get_concept('CustomButton')
@@ -287,7 +287,7 @@ end
 --[[-- Used to define how the concept is turned into an ingame element or "instance" as we may refer to them
 @tparam function draw_callback the function that will be called to draw/update the instance; this function must return the instance or the new acting instance
 @treturn GuiConcept to allow chaing of functions
-@usage
+@usage-- Adding the draw define for the base button concept, we then return the element
 local button =
 Gui.get_concept('Button')
 :define_draw(function(properties,parent,element)
@@ -332,7 +332,7 @@ end
 --[[-- Calls all the draw functions in order to create this concept in game; will also store and sync the instance if stores are used
 @tparam LuaGuiElement parent_element the element that the concept will use as a base
 @treturn LuaGuiElement the element that was created and then passed though and returned by the draw functions
-@usage
+@usage-- Drawing the custom button concept
 local custom_button =
 Gui.get_concept('CustomButton')
 
@@ -372,7 +372,7 @@ end
 --[[-- Adds an instance store to the concept; when a new instance is made it is stored so you can access it later
 @tparam[opt] function category_callback when given will act as a way to turn an element into a string to act as a key; keys returned can over lap
 @treturn GuiConcept to allow chaing of functions
-@usage
+@usage-- Allowing storing instances of the custom button; stored by the players index
 -- Note even thou this is a copy of Button; if Button had an instance store it would not be cloned over
 local custom_button =
 Gui.get_concept('CustomButton')
@@ -392,7 +392,7 @@ function Prototype:define_instance_store(category_callback)
 @function Prototype.get_instances
 @tparam[opt] ?string|LuaGuiElement category the category to get, can only be nil if categories are not used
 @treturn table a table which contains all the instances
-@usage
+@usage-- Getting all the instances of the player with index 1
 local custom_button =
 Gui.get_concept('CustomButton')
 
@@ -406,7 +406,7 @@ custom_button.get_instances(1) -- player index 1
 @function Prototype.add_instance
 @tparam LuaGuiElement element the element that will be added as an instance
 @tparam[opt] string category the category to add this element under, if nil the category callback is used to assign one
-@usage
+@usage-- Adding an element as a instance for this concept, mostly for internal use
 local custom_button =
 Gui.get_concept('CustomButton')
 
@@ -428,11 +428,10 @@ custom_button.add_instance(element) -- normally not needed due to use in concept
 @function Prototype.update_instances
 @tparam[opt] ?string|LuaGuiElement category the category to get, can only be nil if categories are not used
 @tparam function update_callback the function which is called on each instance, recives other args passed to update_instances
-@usage
+@usage-- Changing the font color of all instances for player 1
 local custom_button =
 Gui.get_concept('CustomButton')
 
--- Change all the instances to have red text for player 1
 custom_button.update_instances(1,function(element)
     element.style.font_color = {r=1,g=0,b=0}
 end)
@@ -465,7 +464,7 @@ end
 --[[-- Adds a data store to this concept which allows you to store synced/percistent data between instances
 @tparam[opt] function category_callback when given will act as a way to turn an element into a string to act as a key; keys returned can over lap
 @treturn GuiConcept to allow chaing of functions
-@usage
+@usage-- Adding a way to store data for this concept; each player has their own store
 -- Note even thou this is a copy of Button; if Button had an data store it would not be cloned over
 local custom_button =
 Gui.get_concept('CustomButton')
@@ -491,7 +490,7 @@ function Prototype:define_data_store(category_callback)
 @function Prototype.get_data
 @tparam[opt] ?string|LuaGuiElement category the category to get, can only be nil if categories are not used
 @treturn any the data that you had stored in this location
-@usage
+@usage-- Getting the stored data for player 1
 local custom_button =
 Gui.get_concept('CustomButton')
 
@@ -505,7 +504,7 @@ custom_button.get_data(1) -- player index 1
 @function Prototype.set_data
 @tparam[opt] ?string|LuaGuiElement category the category to set, can only be nil if categories are not used
 @tparam any value the data that you want to stored in this location
-@usage
+@usage-- Setting the data for player 1 to a table with two keys
 local custom_button =
 Gui.get_concept('CustomButton')
 
@@ -523,7 +522,7 @@ custom_button.set_data(1,{
 --[[-- Clears the data that is stored for this category
 @function Prototype.clear_data
 @tparam[opt] ?string|LuaGuiElement category the category to clear, can only be nil if categories are not used
-@usage
+@usage-- Clearing the data for player 1
 local custom_button =
 Gui.get_concept('CustomButton')
 
@@ -537,7 +536,7 @@ custom_button.clear_data(1) -- player index 1
 @function Prototype.update_data
 @tparam[opt] ?string|LuaGuiElement category the category to clear, can only be nil if categories are not used
 @tparam function update_callback the function which is called to update the data
-@usage
+@usage-- Updating the clicks key in the concept data for player 1
 local custom_button =
 Gui.get_concept('CustomButton')
 
@@ -545,8 +544,7 @@ custom_button.update_data(1,function(tbl)
     tbl.clicks = tbl.clicks + 1 -- here we are incrementing the clicks by 1
 end) -- player index 1
 
-@usage
--- Alterative method more useful when not using a table
+@usage-- Updating a value when a table is not used, alterative to get set
 -- so for this example assume that we did custom_button.set_data(1,0)
 custom_button.update_data(1,function(value)
     return value + 1 -- here we are incrementing the value by 1, we may only be tracking clicks
@@ -564,7 +562,7 @@ end
 @tparam function get_callback the function which is called when you set the store from an instance
 @tparam function set_callback the function which is called when you update an instance using the value in the store
 @treturn GuiConcept to allow chaing of functions
-@usage
+@usage-- Adding a way to sync captions bettween all instances, more useful for things that arnt buttons
 local custom_button =
 Gui.get_concept('CustomButton')
 :define_combined_store(
@@ -596,7 +594,7 @@ function Prototype:define_combined_store(category_callback,get_callback,set_call
 --[[-- Will set the state of an instance based on the value in the store
 @function Prototype.set_instance_from_store
 @tparam LuaGuiElement the element that you want to have update
-@usage
+@usage-- Setting the caption of this element to be the same as the stored value
 local custom_button =
 Gui.get_concept('CustomButton')
 
@@ -610,7 +608,7 @@ custom_button.set_instance_from_store(element)
 --[[-- Will set the value in the store and update the other instances based on the instance given
 @function Prototype.set_store_from_instance
 @tparam LuaGuiElement the element that you want to use to update the store
-@usage
+@usage-- Setting the stored value to be the same as the caption for this element
 local custom_button =
 Gui.get_concept('CustomButton')