mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2025-12-27 11:35:22 +09:00
Added checkboxs
This commit is contained in:
@@ -348,7 +348,7 @@
|
||||
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
|
||||
</div>
|
||||
<div class="content-footer column col-9 col-sm-12">
|
||||
<i>Last updated 2019-08-27 21:07:36 UTC</i>
|
||||
<i>Last updated 2019-08-29 18:20:09 UTC</i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -349,7 +349,7 @@
|
||||
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
|
||||
</div>
|
||||
<div class="content-footer column col-9 col-sm-12">
|
||||
<i>Last updated 2019-08-27 21:07:36 UTC</i>
|
||||
<i>Last updated 2019-08-29 18:20:09 UTC</i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -376,7 +376,7 @@
|
||||
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
|
||||
</div>
|
||||
<div class="content-footer column col-9 col-sm-12">
|
||||
<i>Last updated 2019-08-27 21:07:36 UTC</i>
|
||||
<i>Last updated 2019-08-29 18:20:09 UTC</i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -585,7 +585,7 @@
|
||||
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
|
||||
</div>
|
||||
<div class="content-footer column col-9 col-sm-12">
|
||||
<i>Last updated 2019-08-27 21:07:36 UTC</i>
|
||||
<i>Last updated 2019-08-29 18:20:09 UTC</i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -349,7 +349,7 @@
|
||||
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
|
||||
</div>
|
||||
<div class="content-footer column col-9 col-sm-12">
|
||||
<i>Last updated 2019-08-27 21:07:36 UTC</i>
|
||||
<i>Last updated 2019-08-29 18:20:09 UTC</i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -404,7 +404,7 @@
|
||||
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
|
||||
</div>
|
||||
<div class="content-footer column col-9 col-sm-12">
|
||||
<i>Last updated 2019-08-27 21:07:36 UTC</i>
|
||||
<i>Last updated 2019-08-29 18:20:09 UTC</i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -460,7 +460,7 @@
|
||||
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
|
||||
</div>
|
||||
<div class="content-footer column col-9 col-sm-12">
|
||||
<i>Last updated 2019-08-27 21:07:36 UTC</i>
|
||||
<i>Last updated 2019-08-29 18:20:09 UTC</i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -404,7 +404,7 @@
|
||||
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
|
||||
</div>
|
||||
<div class="content-footer column col-9 col-sm-12">
|
||||
<i>Last updated 2019-08-27 21:07:36 UTC</i>
|
||||
<i>Last updated 2019-08-29 18:20:09 UTC</i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -320,7 +320,7 @@
|
||||
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
|
||||
</div>
|
||||
<div class="content-footer column col-9 col-sm-12">
|
||||
<i>Last updated 2019-08-27 21:07:36 UTC</i>
|
||||
<i>Last updated 2019-08-29 18:20:09 UTC</i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -404,7 +404,7 @@
|
||||
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
|
||||
</div>
|
||||
<div class="content-footer column col-9 col-sm-12">
|
||||
<i>Last updated 2019-08-27 21:07:36 UTC</i>
|
||||
<i>Last updated 2019-08-29 18:20:09 UTC</i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -376,7 +376,7 @@
|
||||
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
|
||||
</div>
|
||||
<div class="content-footer column col-9 col-sm-12">
|
||||
<i>Last updated 2019-08-27 21:07:36 UTC</i>
|
||||
<i>Last updated 2019-08-29 18:20:09 UTC</i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -388,7 +388,7 @@
|
||||
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
|
||||
</div>
|
||||
<div class="content-footer column col-9 col-sm-12">
|
||||
<i>Last updated 2019-08-27 21:07:36 UTC</i>
|
||||
<i>Last updated 2019-08-29 18:20:09 UTC</i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -500,7 +500,7 @@
|
||||
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
|
||||
</div>
|
||||
<div class="content-footer column col-9 col-sm-12">
|
||||
<i>Last updated 2019-08-27 21:07:36 UTC</i>
|
||||
<i>Last updated 2019-08-29 18:20:09 UTC</i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -361,7 +361,7 @@
|
||||
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
|
||||
</div>
|
||||
<div class="content-footer column col-9 col-sm-12">
|
||||
<i>Last updated 2019-08-27 21:07:36 UTC</i>
|
||||
<i>Last updated 2019-08-29 18:20:09 UTC</i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -388,7 +388,7 @@
|
||||
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
|
||||
</div>
|
||||
<div class="content-footer column col-9 col-sm-12">
|
||||
<i>Last updated 2019-08-27 21:07:36 UTC</i>
|
||||
<i>Last updated 2019-08-29 18:20:09 UTC</i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -365,7 +365,7 @@
|
||||
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
|
||||
</div>
|
||||
<div class="content-footer column col-9 col-sm-12">
|
||||
<i>Last updated 2019-08-27 21:07:36 UTC</i>
|
||||
<i>Last updated 2019-08-29 18:20:09 UTC</i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -360,7 +360,7 @@
|
||||
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
|
||||
</div>
|
||||
<div class="content-footer column col-9 col-sm-12">
|
||||
<i>Last updated 2019-08-27 21:07:36 UTC</i>
|
||||
<i>Last updated 2019-08-29 18:20:09 UTC</i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -404,7 +404,7 @@
|
||||
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
|
||||
</div>
|
||||
<div class="content-footer column col-9 col-sm-12">
|
||||
<i>Last updated 2019-08-27 21:07:36 UTC</i>
|
||||
<i>Last updated 2019-08-29 18:20:09 UTC</i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -458,7 +458,7 @@
|
||||
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
|
||||
</div>
|
||||
<div class="content-footer column col-9 col-sm-12">
|
||||
<i>Last updated 2019-08-27 21:07:36 UTC</i>
|
||||
<i>Last updated 2019-08-29 18:20:09 UTC</i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -416,7 +416,7 @@
|
||||
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
|
||||
</div>
|
||||
<div class="content-footer column col-9 col-sm-12">
|
||||
<i>Last updated 2019-08-27 21:07:36 UTC</i>
|
||||
<i>Last updated 2019-08-29 18:20:09 UTC</i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -611,7 +611,7 @@
|
||||
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
|
||||
</div>
|
||||
<div class="content-footer column col-9 col-sm-12">
|
||||
<i>Last updated 2019-08-27 21:07:36 UTC</i>
|
||||
<i>Last updated 2019-08-29 18:20:09 UTC</i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -389,7 +389,7 @@
|
||||
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
|
||||
</div>
|
||||
<div class="content-footer column col-9 col-sm-12">
|
||||
<i>Last updated 2019-08-27 21:07:36 UTC</i>
|
||||
<i>Last updated 2019-08-29 18:20:09 UTC</i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -360,7 +360,7 @@
|
||||
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
|
||||
</div>
|
||||
<div class="content-footer column col-9 col-sm-12">
|
||||
<i>Last updated 2019-08-27 21:07:36 UTC</i>
|
||||
<i>Last updated 2019-08-29 18:20:09 UTC</i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -388,7 +388,7 @@
|
||||
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
|
||||
</div>
|
||||
<div class="content-footer column col-9 col-sm-12">
|
||||
<i>Last updated 2019-08-27 21:07:36 UTC</i>
|
||||
<i>Last updated 2019-08-29 18:20:09 UTC</i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -321,7 +321,7 @@
|
||||
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
|
||||
</div>
|
||||
<div class="content-footer column col-9 col-sm-12">
|
||||
<i>Last updated 2019-08-27 21:07:36 UTC</i>
|
||||
<i>Last updated 2019-08-29 18:20:09 UTC</i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -585,7 +585,7 @@
|
||||
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
|
||||
</div>
|
||||
<div class="content-footer column col-9 col-sm-12">
|
||||
<i>Last updated 2019-08-27 21:07:36 UTC</i>
|
||||
<i>Last updated 2019-08-29 18:20:09 UTC</i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -557,7 +557,7 @@
|
||||
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
|
||||
</div>
|
||||
<div class="content-footer column col-9 col-sm-12">
|
||||
<i>Last updated 2019-08-27 21:07:36 UTC</i>
|
||||
<i>Last updated 2019-08-29 18:20:09 UTC</i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -389,7 +389,7 @@
|
||||
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
|
||||
</div>
|
||||
<div class="content-footer column col-9 col-sm-12">
|
||||
<i>Last updated 2019-08-27 21:07:36 UTC</i>
|
||||
<i>Last updated 2019-08-29 18:20:09 UTC</i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -443,7 +443,7 @@
|
||||
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
|
||||
</div>
|
||||
<div class="content-footer column col-9 col-sm-12">
|
||||
<i>Last updated 2019-08-27 21:07:36 UTC</i>
|
||||
<i>Last updated 2019-08-29 18:20:09 UTC</i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -484,7 +484,7 @@
|
||||
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
|
||||
</div>
|
||||
<div class="content-footer column col-9 col-sm-12">
|
||||
<i>Last updated 2019-08-27 21:07:36 UTC</i>
|
||||
<i>Last updated 2019-08-29 18:20:09 UTC</i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -569,7 +569,7 @@
|
||||
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
|
||||
</div>
|
||||
<div class="content-footer column col-9 col-sm-12">
|
||||
<i>Last updated 2019-08-27 21:07:36 UTC</i>
|
||||
<i>Last updated 2019-08-29 18:20:09 UTC</i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -506,7 +506,7 @@
|
||||
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
|
||||
</div>
|
||||
<div class="content-footer column col-9 col-sm-12">
|
||||
<i>Last updated 2019-08-27 21:07:36 UTC</i>
|
||||
<i>Last updated 2019-08-29 18:20:09 UTC</i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -237,7 +237,7 @@
|
||||
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
|
||||
</div>
|
||||
<div class="content-footer column col-9 col-sm-12">
|
||||
<i>Last updated 2019-08-27 21:07:36 UTC</i>
|
||||
<i>Last updated 2019-08-29 18:20:09 UTC</i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -485,7 +485,7 @@
|
||||
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
|
||||
</div>
|
||||
<div class="content-footer column col-9 col-sm-12">
|
||||
<i>Last updated 2019-08-27 21:07:36 UTC</i>
|
||||
<i>Last updated 2019-08-29 18:20:09 UTC</i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -294,7 +294,7 @@
|
||||
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
|
||||
</div>
|
||||
<div class="content-footer column col-9 col-sm-12">
|
||||
<i>Last updated 2019-08-27 21:07:36 UTC</i>
|
||||
<i>Last updated 2019-08-29 18:20:09 UTC</i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -320,7 +320,7 @@
|
||||
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
|
||||
</div>
|
||||
<div class="content-footer column col-9 col-sm-12">
|
||||
<i>Last updated 2019-08-27 21:07:36 UTC</i>
|
||||
<i>Last updated 2019-08-29 18:20:09 UTC</i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -442,7 +442,7 @@
|
||||
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
|
||||
</div>
|
||||
<div class="content-footer column col-9 col-sm-12">
|
||||
<i>Last updated 2019-08-27 21:07:36 UTC</i>
|
||||
<i>Last updated 2019-08-29 18:20:09 UTC</i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -354,7 +354,7 @@
|
||||
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
|
||||
</div>
|
||||
<div class="content-footer column col-9 col-sm-12">
|
||||
<i>Last updated 2019-08-27 21:07:36 UTC</i>
|
||||
<i>Last updated 2019-08-29 18:20:09 UTC</i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -338,7 +338,7 @@ see ./expcore/commands.lua for more details</p>
|
||||
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
|
||||
</div>
|
||||
<div class="content-footer column col-9 col-sm-12">
|
||||
<i>Last updated 2019-08-27 21:07:36 UTC</i>
|
||||
<i>Last updated 2019-08-29 18:20:09 UTC</i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -354,7 +354,7 @@
|
||||
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
|
||||
</div>
|
||||
<div class="content-footer column col-9 col-sm-12">
|
||||
<i>Last updated 2019-08-27 21:07:36 UTC</i>
|
||||
<i>Last updated 2019-08-29 18:20:09 UTC</i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -416,7 +416,7 @@
|
||||
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
|
||||
</div>
|
||||
<div class="content-footer column col-9 col-sm-12">
|
||||
<i>Last updated 2019-08-27 21:07:36 UTC</i>
|
||||
<i>Last updated 2019-08-29 18:20:09 UTC</i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -237,7 +237,7 @@
|
||||
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
|
||||
</div>
|
||||
<div class="content-footer column col-9 col-sm-12">
|
||||
<i>Last updated 2019-08-27 21:07:36 UTC</i>
|
||||
<i>Last updated 2019-08-29 18:20:09 UTC</i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -240,7 +240,7 @@
|
||||
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
|
||||
</div>
|
||||
<div class="content-footer column col-9 col-sm-12">
|
||||
<i>Last updated 2019-08-27 21:07:36 UTC</i>
|
||||
<i>Last updated 2019-08-29 18:20:09 UTC</i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -295,7 +295,7 @@
|
||||
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
|
||||
</div>
|
||||
<div class="content-footer column col-9 col-sm-12">
|
||||
<i>Last updated 2019-08-27 21:07:36 UTC</i>
|
||||
<i>Last updated 2019-08-29 18:20:09 UTC</i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -812,7 +812,7 @@
|
||||
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
|
||||
</div>
|
||||
<div class="content-footer column col-9 col-sm-12">
|
||||
<i>Last updated 2019-08-27 21:07:36 UTC</i>
|
||||
<i>Last updated 2019-08-29 18:20:09 UTC</i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -384,7 +384,7 @@
|
||||
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
|
||||
</div>
|
||||
<div class="content-footer column col-9 col-sm-12">
|
||||
<i>Last updated 2019-08-27 21:07:36 UTC</i>
|
||||
<i>Last updated 2019-08-29 18:20:09 UTC</i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -414,7 +414,7 @@
|
||||
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
|
||||
</div>
|
||||
<div class="content-footer column col-9 col-sm-12">
|
||||
<i>Last updated 2019-08-27 21:07:36 UTC</i>
|
||||
<i>Last updated 2019-08-29 18:20:09 UTC</i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -324,7 +324,7 @@
|
||||
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
|
||||
</div>
|
||||
<div class="content-footer column col-9 col-sm-12">
|
||||
<i>Last updated 2019-08-27 21:07:36 UTC</i>
|
||||
<i>Last updated 2019-08-29 18:20:09 UTC</i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -414,7 +414,7 @@
|
||||
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
|
||||
</div>
|
||||
<div class="content-footer column col-9 col-sm-12">
|
||||
<i>Last updated 2019-08-27 21:07:36 UTC</i>
|
||||
<i>Last updated 2019-08-29 18:20:09 UTC</i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -834,7 +834,7 @@
|
||||
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
|
||||
</div>
|
||||
<div class="content-footer column col-9 col-sm-12">
|
||||
<i>Last updated 2019-08-27 21:07:36 UTC</i>
|
||||
<i>Last updated 2019-08-29 18:20:09 UTC</i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -292,7 +292,7 @@
|
||||
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
|
||||
</div>
|
||||
<div class="content-footer column col-9 col-sm-12">
|
||||
<i>Last updated 2019-08-27 21:07:36 UTC</i>
|
||||
<i>Last updated 2019-08-29 18:20:09 UTC</i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -354,7 +354,7 @@
|
||||
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
|
||||
</div>
|
||||
<div class="content-footer column col-9 col-sm-12">
|
||||
<i>Last updated 2019-08-27 21:07:36 UTC</i>
|
||||
<i>Last updated 2019-08-29 18:20:09 UTC</i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -388,7 +388,7 @@
|
||||
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
|
||||
</div>
|
||||
<div class="content-footer column col-9 col-sm-12">
|
||||
<i>Last updated 2019-08-27 21:07:36 UTC</i>
|
||||
<i>Last updated 2019-08-29 18:20:09 UTC</i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -744,7 +744,7 @@
|
||||
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
|
||||
</div>
|
||||
<div class="content-footer column col-9 col-sm-12">
|
||||
<i>Last updated 2019-08-27 21:07:36 UTC</i>
|
||||
<i>Last updated 2019-08-29 18:20:09 UTC</i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -384,7 +384,7 @@
|
||||
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
|
||||
</div>
|
||||
<div class="content-footer column col-9 col-sm-12">
|
||||
<i>Last updated 2019-08-27 21:07:36 UTC</i>
|
||||
<i>Last updated 2019-08-29 18:20:09 UTC</i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -355,7 +355,7 @@
|
||||
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
|
||||
</div>
|
||||
<div class="content-footer column col-9 col-sm-12">
|
||||
<i>Last updated 2019-08-27 21:07:36 UTC</i>
|
||||
<i>Last updated 2019-08-29 18:20:09 UTC</i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -684,7 +684,7 @@
|
||||
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
|
||||
</div>
|
||||
<div class="content-footer column col-9 col-sm-12">
|
||||
<i>Last updated 2019-08-27 21:07:36 UTC</i>
|
||||
<i>Last updated 2019-08-29 18:20:09 UTC</i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1208,7 +1208,7 @@
|
||||
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
|
||||
</div>
|
||||
<div class="content-footer column col-9 col-sm-12">
|
||||
<i>Last updated 2019-08-27 21:07:36 UTC</i>
|
||||
<i>Last updated 2019-08-29 18:20:09 UTC</i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1329,7 +1329,7 @@
|
||||
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
|
||||
</div>
|
||||
<div class="content-footer column col-9 col-sm-12">
|
||||
<i>Last updated 2019-08-27 21:07:36 UTC</i>
|
||||
<i>Last updated 2019-08-29 18:20:09 UTC</i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1110,7 +1110,7 @@
|
||||
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
|
||||
</div>
|
||||
<div class="content-footer column col-9 col-sm-12">
|
||||
<i>Last updated 2019-08-27 21:07:36 UTC</i>
|
||||
<i>Last updated 2019-08-29 18:20:09 UTC</i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -984,7 +984,7 @@
|
||||
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
|
||||
</div>
|
||||
<div class="content-footer column col-9 col-sm-12">
|
||||
<i>Last updated 2019-08-27 21:07:36 UTC</i>
|
||||
<i>Last updated 2019-08-29 18:20:09 UTC</i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1039,7 +1039,7 @@
|
||||
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
|
||||
</div>
|
||||
<div class="content-footer column col-9 col-sm-12">
|
||||
<i>Last updated 2019-08-27 21:07:36 UTC</i>
|
||||
<i>Last updated 2019-08-29 18:20:09 UTC</i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1465,7 +1465,7 @@
|
||||
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
|
||||
</div>
|
||||
<div class="content-footer column col-9 col-sm-12">
|
||||
<i>Last updated 2019-08-27 21:07:36 UTC</i>
|
||||
<i>Last updated 2019-08-29 18:20:09 UTC</i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1413,7 +1413,7 @@
|
||||
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
|
||||
</div>
|
||||
<div class="content-footer column col-9 col-sm-12">
|
||||
<i>Last updated 2019-08-27 21:07:36 UTC</i>
|
||||
<i>Last updated 2019-08-29 18:20:09 UTC</i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1972,7 +1972,7 @@
|
||||
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
|
||||
</div>
|
||||
<div class="content-footer column col-9 col-sm-12">
|
||||
<i>Last updated 2019-08-27 21:07:36 UTC</i>
|
||||
<i>Last updated 2019-08-29 18:20:09 UTC</i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -2480,7 +2480,7 @@
|
||||
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
|
||||
</div>
|
||||
<div class="content-footer column col-9 col-sm-12">
|
||||
<i>Last updated 2019-08-27 21:07:36 UTC</i>
|
||||
<i>Last updated 2019-08-29 18:20:09 UTC</i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -315,6 +315,10 @@ button:clone(<span class="string">'CustomButton'</span>)
|
||||
<td class="summary">The basic button element</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name"><a href="#checkbox">checkbox</a></td>
|
||||
<td class="summary">The basic checkbox element</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name"><a href="#frame">frame</a></td>
|
||||
<td class="summary">The basic frame element</td>
|
||||
</tr>
|
||||
@@ -346,6 +350,18 @@ button:clone(<span class="string">'CustomButton'</span>)
|
||||
<td class="name"><a href="#clone_concept">clone_concept(name, new_name)</a></td>
|
||||
<td class="summary">Making anew concept based on the properties and drawing of another</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name"><a href="#categorize_by_player">categorize_by_player(element)</a></td>
|
||||
<td class="summary">A categorize function to be used with add_store, each player has their own category</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name"><a href="#categorize_by_force">categorize_by_force(element)</a></td>
|
||||
<td class="summary">A categorize function to be used with add_store, each force has its own category</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name"><a href="#categorize_by_surface">categorize_by_surface(element)</a></td>
|
||||
<td class="summary">A categorize function to be used with add_store, each surface has its own category</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<table class="section-content-list">
|
||||
@@ -443,16 +459,12 @@ button:clone(<span class="string">'CustomButton'</span>)
|
||||
<td class="summary">Updates the data that is stored for this category</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name"><a href="#Prototype:define_combined_store">Prototype:define_combined_store([category_callback], get_callback, set_callback)</a></td>
|
||||
<td class="summary">Used to add a both instance and data stores which are linked together, new instances are synced to current value, changing one instances changes them all</td>
|
||||
<td class="name"><a href="#Prototype:define_combined_store">Prototype:define_combined_store([category_callback], sync_callback)</a></td>
|
||||
<td class="summary">Used to add a both instance and data stores which are linked together, new instances are synced to current value, changing one instance changes them all</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name"><a href="#Prototype.set_instance_from_store">Prototype.set_instance_from_store(the)</a></td>
|
||||
<td class="summary">Will set the state of an instance based on the value in the store</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name"><a href="#Prototype.set_store_from_instance">Prototype.set_store_from_instance(the)</a></td>
|
||||
<td class="summary">Will set the value in the store and update the other instances based on the instance given</td>
|
||||
<td class="name"><a href="#Prototype.sync_instance">Prototype.sync_instance(element)</a></td>
|
||||
<td class="summary">Will sync an instance to match the stored value based on the given sync callback</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -595,6 +607,103 @@ button:clone(<span class="string">'CustomButton'</span>)
|
||||
<!-- returns end -->
|
||||
|
||||
|
||||
<!-- see also start -->
|
||||
<!-- see also end -->
|
||||
|
||||
<!-- usage start -->
|
||||
<!-- usage end -->
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<div class="divider divider-custom"></div>
|
||||
<div class="block section-item-header">
|
||||
<a href="#checkbox" class="fragment-hashtag">#</a>
|
||||
<span class="section-item-title" id="checkbox">checkbox</span>
|
||||
</div>
|
||||
</dt>
|
||||
<dd>
|
||||
<div class="section-item-body">
|
||||
|
||||
<p class="section-item-summary">The basic checkbox element</p>
|
||||
<p class="section-item-description"></p>
|
||||
|
||||
<!-- parameters start -->
|
||||
<strong>Properties / Events:</strong>
|
||||
|
||||
<ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<li class="section-subitem-li">
|
||||
|
||||
<strong><em>on_state_change</em></strong>
|
||||
|
||||
<strong> : </strong>
|
||||
|
||||
|
||||
fired when the state of the element is changed
|
||||
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<li class="section-subitem-li">
|
||||
|
||||
<strong><em>caption</em></strong>
|
||||
|
||||
<strong> : </strong>
|
||||
|
||||
(<span class="types"><a class="type" href="http://lua-api.factorio.com/latest/Builtin-Types.html#string">string</a> or <a class="type" href="http://lua-api.factorio.com/latest/Concepts.html#LocalisedString">LocalisedString</a></span>)
|
||||
|
||||
the message that is shown next to the checkbox
|
||||
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<li class="section-subitem-li">
|
||||
|
||||
<strong><em>tooltip</em></strong>
|
||||
|
||||
<strong> : </strong>
|
||||
|
||||
(<span class="types"><a class="type" href="http://lua-api.factorio.com/latest/Builtin-Types.html#string">string</a> or <a class="type" href="http://lua-api.factorio.com/latest/Concepts.html#LocalisedString">LocalisedString</a></span>)
|
||||
|
||||
the tooltip that shows when a player hovers over the checkbox
|
||||
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<li class="section-subitem-li">
|
||||
|
||||
<strong><em>use_radio</em></strong>
|
||||
|
||||
<strong> : </strong>
|
||||
|
||||
(<span class="types"><a class="type" href="http://lua-api.factorio.com/latest/Builtin-Types.html#boolean">boolean</a></span>)
|
||||
|
||||
setting to true will use radio buttons rather than checkboxs
|
||||
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
<!-- parameters end -->
|
||||
|
||||
<!-- returns start -->
|
||||
<!-- returns end -->
|
||||
|
||||
|
||||
<!-- see also start -->
|
||||
<!-- see also end -->
|
||||
|
||||
@@ -938,6 +1047,189 @@ button:change_name(<span class="string">'Not Button'</span>)</code></pre>
|
||||
</span><span class="keyword">local</span> custom_button = Gui.clone_concept(<span class="string">'Button'</span>,<span class="string">'CustomButton'</span>)</code></pre>
|
||||
<!-- usage end -->
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<div class="divider divider-custom"></div>
|
||||
<div class="block section-item-header">
|
||||
<a href="#categorize_by_player" class="fragment-hashtag">#</a>
|
||||
<span class="section-item-title" id="categorize_by_player">categorize_by_player(element)</span>
|
||||
</div>
|
||||
</dt>
|
||||
<dd>
|
||||
<div class="section-item-body">
|
||||
|
||||
<p class="section-item-summary">A categorize function to be used with add_store, each player has their own category</p>
|
||||
<p class="section-item-description"></p>
|
||||
|
||||
<!-- parameters start -->
|
||||
<strong>Parameters:</strong>
|
||||
|
||||
<ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<li class="section-subitem-li">
|
||||
|
||||
<strong><em>element</em></strong>
|
||||
|
||||
<strong> : </strong>
|
||||
|
||||
(<span class="types"><a class="type" href="http://lua-api.factorio.com/latest/LuaGuiElement.html">LuaGuiElement</a></span>)
|
||||
|
||||
the element that will be converted to a string
|
||||
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
<!-- parameters end -->
|
||||
|
||||
<!-- returns start -->
|
||||
<strong>Returns:</strong>
|
||||
<ul>
|
||||
<li>
|
||||
(<span class="types"><a class="type" href="http://lua-api.factorio.com/latest/Builtin-Types.html#string">string</a></span>)
|
||||
<span class="return-text">the player's name who owns this element</span>
|
||||
</li>
|
||||
</ul>
|
||||
<!-- returns end -->
|
||||
|
||||
|
||||
<!-- see also start -->
|
||||
<!-- see also end -->
|
||||
|
||||
<!-- usage start -->
|
||||
<strong>Usage:</strong>
|
||||
<pre class="code" data-lang="Lua"><code><span class="comment">-- Storing data on a per player basis, can be used with instances
|
||||
</span>Gui.get_concept(<span class="string">'CustomButton'</span>)
|
||||
:define_data_store(Gui.categorize_by_player)</code></pre>
|
||||
<!-- usage end -->
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<div class="divider divider-custom"></div>
|
||||
<div class="block section-item-header">
|
||||
<a href="#categorize_by_force" class="fragment-hashtag">#</a>
|
||||
<span class="section-item-title" id="categorize_by_force">categorize_by_force(element)</span>
|
||||
</div>
|
||||
</dt>
|
||||
<dd>
|
||||
<div class="section-item-body">
|
||||
|
||||
<p class="section-item-summary">A categorize function to be used with add_store, each force has its own category</p>
|
||||
<p class="section-item-description"></p>
|
||||
|
||||
<!-- parameters start -->
|
||||
<strong>Parameters:</strong>
|
||||
|
||||
<ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<li class="section-subitem-li">
|
||||
|
||||
<strong><em>element</em></strong>
|
||||
|
||||
<strong> : </strong>
|
||||
|
||||
(<span class="types"><a class="type" href="http://lua-api.factorio.com/latest/LuaGuiElement.html">LuaGuiElement</a></span>)
|
||||
|
||||
the element that will be converted to a string
|
||||
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
<!-- parameters end -->
|
||||
|
||||
<!-- returns start -->
|
||||
<strong>Returns:</strong>
|
||||
<ul>
|
||||
<li>
|
||||
(<span class="types"><a class="type" href="http://lua-api.factorio.com/latest/Builtin-Types.html#string">string</a></span>)
|
||||
<span class="return-text">the player's force name who owns this element</span>
|
||||
</li>
|
||||
</ul>
|
||||
<!-- returns end -->
|
||||
|
||||
|
||||
<!-- see also start -->
|
||||
<!-- see also end -->
|
||||
|
||||
<!-- usage start -->
|
||||
<strong>Usage:</strong>
|
||||
<pre class="code" data-lang="Lua"><code><span class="comment">-- Storing data on a per force basis, can be used with instances
|
||||
</span>Gui.get_concept(<span class="string">'CustomButton'</span>)
|
||||
:define_data_store(Gui.categorize_by_force)</code></pre>
|
||||
<!-- usage end -->
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<div class="divider divider-custom"></div>
|
||||
<div class="block section-item-header">
|
||||
<a href="#categorize_by_surface" class="fragment-hashtag">#</a>
|
||||
<span class="section-item-title" id="categorize_by_surface">categorize_by_surface(element)</span>
|
||||
</div>
|
||||
</dt>
|
||||
<dd>
|
||||
<div class="section-item-body">
|
||||
|
||||
<p class="section-item-summary">A categorize function to be used with add_store, each surface has its own category</p>
|
||||
<p class="section-item-description"></p>
|
||||
|
||||
<!-- parameters start -->
|
||||
<strong>Parameters:</strong>
|
||||
|
||||
<ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<li class="section-subitem-li">
|
||||
|
||||
<strong><em>element</em></strong>
|
||||
|
||||
<strong> : </strong>
|
||||
|
||||
(<span class="types"><a class="type" href="http://lua-api.factorio.com/latest/LuaGuiElement.html">LuaGuiElement</a></span>)
|
||||
|
||||
the element that will be converted to a string
|
||||
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
<!-- parameters end -->
|
||||
|
||||
<!-- returns start -->
|
||||
<strong>Returns:</strong>
|
||||
<ul>
|
||||
<li>
|
||||
(<span class="types"><a class="type" href="http://lua-api.factorio.com/latest/Builtin-Types.html#string">string</a></span>)
|
||||
<span class="return-text">the player's surface name who owns this element</span>
|
||||
</li>
|
||||
</ul>
|
||||
<!-- returns end -->
|
||||
|
||||
|
||||
<!-- see also start -->
|
||||
<!-- see also end -->
|
||||
|
||||
<!-- usage start -->
|
||||
<strong>Usage:</strong>
|
||||
<pre class="code" data-lang="Lua"><code><span class="comment">-- Storing data on a per surface basis, can be used with instances
|
||||
</span>Gui.get_concept(<span class="string">'CustomButton'</span>)
|
||||
:define_data_store(Gui.categorize_by_surface)</code></pre>
|
||||
<!-- usage end -->
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<h3><span id="Concept_Base" class="section-title"><a href="#Concept_Base">Concept Base </a></span></h3>
|
||||
@@ -1137,7 +1429,7 @@ button:change_name(<span class="string">'Not Button'</span>)</code></pre>
|
||||
<ul>
|
||||
<li>
|
||||
(<span class="types"><span class="type">GuiConcept</span></span>)
|
||||
<span class="return-text">to allow chaing of functions</span>
|
||||
<span class="return-text">to allow chaining of functions</span>
|
||||
</li>
|
||||
</ul>
|
||||
<!-- returns end -->
|
||||
@@ -1201,7 +1493,7 @@ Gui.get_concept(<span class="string">'Button'</span>):clone(<span class="string"
|
||||
<ul>
|
||||
<li>
|
||||
(<span class="types"><span class="type">GuiConcept</span></span>)
|
||||
<span class="return-text">to allow chaing of functions</span>
|
||||
<span class="return-text">to allow chaining of functions</span>
|
||||
</li>
|
||||
</ul>
|
||||
<!-- returns end -->
|
||||
@@ -1392,7 +1684,7 @@ Gui.get_concept(<span class="string">'CustomButton'</span>)
|
||||
<ul>
|
||||
<li>
|
||||
(<span class="types"><span class="type">GuiConcept</span></span>)
|
||||
<span class="return-text">to allow chaing of functions</span>
|
||||
<span class="return-text">to allow chaining of functions</span>
|
||||
</li>
|
||||
</ul>
|
||||
<!-- returns end -->
|
||||
@@ -1464,7 +1756,7 @@ Gui.get_concept(<span class="string">'Button'</span>)
|
||||
<ul>
|
||||
<li>
|
||||
(<span class="types"><span class="type">GuiConcept</span></span>)
|
||||
<span class="return-text">to allow chaing of functions</span>
|
||||
<span class="return-text">to allow chaining of functions</span>
|
||||
</li>
|
||||
</ul>
|
||||
<!-- returns end -->
|
||||
@@ -1531,7 +1823,7 @@ Gui.get_concept(<span class="string">'CustomButton'</span>)
|
||||
<ul>
|
||||
<li>
|
||||
(<span class="types"><span class="type">GuiConcept</span></span>)
|
||||
<span class="return-text">to allow chaing of functions</span>
|
||||
<span class="return-text">to allow chaining of functions</span>
|
||||
</li>
|
||||
</ul>
|
||||
<!-- returns end -->
|
||||
@@ -1687,7 +1979,7 @@ Gui.get_concept(<span class="string">'CustomButton'</span>)
|
||||
<ul>
|
||||
<li>
|
||||
(<span class="types"><span class="type">GuiConcept</span></span>)
|
||||
<span class="return-text">to allow chaing of functions</span>
|
||||
<span class="return-text">to allow chaining of functions</span>
|
||||
</li>
|
||||
</ul>
|
||||
<!-- returns end -->
|
||||
@@ -1968,7 +2260,7 @@ custom_button.update_instances(<span class="number">1</span>,<span class="keywor
|
||||
<ul>
|
||||
<li>
|
||||
(<span class="types"><span class="type">GuiConcept</span></span>)
|
||||
<span class="return-text">to allow chaing of functions</span>
|
||||
<span class="return-text">to allow chaining of functions</span>
|
||||
</li>
|
||||
</ul>
|
||||
<!-- returns end -->
|
||||
@@ -2273,13 +2565,13 @@ custom_button.update_data(<span class="number">1</span>,<span class="keyword">fu
|
||||
<div class="divider divider-custom"></div>
|
||||
<div class="block section-item-header">
|
||||
<a href="#Prototype:define_combined_store" class="fragment-hashtag">#</a>
|
||||
<span class="section-item-title" id="Prototype:define_combined_store">Prototype:define_combined_store([category_callback], get_callback, set_callback)</span>
|
||||
<span class="section-item-title" id="Prototype:define_combined_store">Prototype:define_combined_store([category_callback], sync_callback)</span>
|
||||
</div>
|
||||
</dt>
|
||||
<dd>
|
||||
<div class="section-item-body">
|
||||
|
||||
<p class="section-item-summary">Used to add a both instance and data stores which are linked together, new instances are synced to current value, changing one instances changes them all</p>
|
||||
<p class="section-item-summary">Used to add a both instance and data stores which are linked together, new instances are synced to current value, changing one instance changes them all</p>
|
||||
<p class="section-item-description"></p>
|
||||
|
||||
<!-- parameters start -->
|
||||
@@ -2310,29 +2602,13 @@ custom_button.update_data(<span class="number">1</span>,<span class="keyword">fu
|
||||
|
||||
<li class="section-subitem-li">
|
||||
|
||||
<strong><em>get_callback</em></strong>
|
||||
<strong><em>sync_callback</em></strong>
|
||||
|
||||
<strong> : </strong>
|
||||
|
||||
(<span class="types"><a class="type" href="https://www.lua.org/pil/2.6.html">function</a></span>)
|
||||
|
||||
the function which is called when you set the store from an instance
|
||||
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<li class="section-subitem-li">
|
||||
|
||||
<strong><em>set_callback</em></strong>
|
||||
|
||||
<strong> : </strong>
|
||||
|
||||
(<span class="types"><a class="type" href="https://www.lua.org/pil/2.6.html">function</a></span>)
|
||||
|
||||
the function which is called when you update an instance using the value in the store
|
||||
the function which is called to update an instance to match the store
|
||||
|
||||
</li>
|
||||
|
||||
@@ -2346,7 +2622,7 @@ custom_button.update_data(<span class="number">1</span>,<span class="keyword">fu
|
||||
<ul>
|
||||
<li>
|
||||
(<span class="types"><span class="type">GuiConcept</span></span>)
|
||||
<span class="return-text">to allow chaing of functions</span>
|
||||
<span class="return-text">to allow chaining of functions</span>
|
||||
</li>
|
||||
</ul>
|
||||
<!-- returns end -->
|
||||
@@ -2357,18 +2633,15 @@ custom_button.update_data(<span class="number">1</span>,<span class="keyword">fu
|
||||
|
||||
<!-- usage start -->
|
||||
<strong>Usage:</strong>
|
||||
<pre class="code" data-lang="Lua"><code><span class="comment">-- Adding a way to sync captions bettween all instances, more useful for things that arnt buttons
|
||||
<pre class="code" data-lang="Lua"><code><span class="comment">-- Adding a way to sync enabled state bettween all instances, more useful for things that arnt buttons
|
||||
</span><span class="keyword">local</span> custom_button =
|
||||
Gui.get_concept(<span class="string">'CustomButton'</span>)
|
||||
:define_combined_store(
|
||||
<span class="keyword">function</span>(element)
|
||||
<span class="keyword">return</span> element.player_index <span class="comment">-- The data is stored based on player id
|
||||
</span><span class="keyword">end</span>,
|
||||
<span class="keyword">function</span>(element)
|
||||
<span class="keyword">return</span> element.caption <span class="comment">-- We want to store the caption
|
||||
</span><span class="keyword">end</span>,
|
||||
<span class="keyword">function</span>(element,value)
|
||||
element.caption = value <span class="comment">-- This is the inverse of above
|
||||
element.enabled = value <span class="comment">-- We will use custom_button.set_data(element,value) to trigger this
|
||||
</span><span class="keyword">end</span>)</code></pre>
|
||||
<!-- usage end -->
|
||||
|
||||
@@ -2376,14 +2649,14 @@ Gui.get_concept(<span class="string">'CustomButton'</span>)
|
||||
<dt>
|
||||
<div class="divider divider-custom"></div>
|
||||
<div class="block section-item-header">
|
||||
<a href="#Prototype.set_instance_from_store" class="fragment-hashtag">#</a>
|
||||
<span class="section-item-title" id="Prototype.set_instance_from_store">Prototype.set_instance_from_store(the)</span>
|
||||
<a href="#Prototype.sync_instance" class="fragment-hashtag">#</a>
|
||||
<span class="section-item-title" id="Prototype.sync_instance">Prototype.sync_instance(element)</span>
|
||||
</div>
|
||||
</dt>
|
||||
<dd>
|
||||
<div class="section-item-body">
|
||||
|
||||
<p class="section-item-summary">Will set the state of an instance based on the value in the store</p>
|
||||
<p class="section-item-summary">Will sync an instance to match the stored value based on the given sync callback</p>
|
||||
<p class="section-item-description"></p>
|
||||
|
||||
<!-- parameters start -->
|
||||
@@ -2397,13 +2670,13 @@ Gui.get_concept(<span class="string">'CustomButton'</span>)
|
||||
|
||||
<li class="section-subitem-li">
|
||||
|
||||
<strong><em>the</em></strong>
|
||||
<strong><em>element</em></strong>
|
||||
|
||||
<strong> : </strong>
|
||||
|
||||
(<span class="types"><a class="type" href="http://lua-api.factorio.com/latest/LuaGuiElement.html">LuaGuiElement</a></span>)
|
||||
|
||||
element that you want to have update
|
||||
the element that you want to have update
|
||||
|
||||
</li>
|
||||
|
||||
@@ -2426,64 +2699,7 @@ Gui.get_concept(<span class="string">'CustomButton'</span>)
|
||||
Gui.get_concept(<span class="string">'CustomButton'</span>)
|
||||
|
||||
<span class="comment">-- Used internally when first draw and automatically when the store updates
|
||||
</span>custom_button.set_instance_from_store(element)</code></pre>
|
||||
<!-- usage end -->
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<div class="divider divider-custom"></div>
|
||||
<div class="block section-item-header">
|
||||
<a href="#Prototype.set_store_from_instance" class="fragment-hashtag">#</a>
|
||||
<span class="section-item-title" id="Prototype.set_store_from_instance">Prototype.set_store_from_instance(the)</span>
|
||||
</div>
|
||||
</dt>
|
||||
<dd>
|
||||
<div class="section-item-body">
|
||||
|
||||
<p class="section-item-summary">Will set the value in the store and update the other instances based on the instance given</p>
|
||||
<p class="section-item-description"></p>
|
||||
|
||||
<!-- parameters start -->
|
||||
<strong>Parameters:</strong>
|
||||
|
||||
<ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<li class="section-subitem-li">
|
||||
|
||||
<strong><em>the</em></strong>
|
||||
|
||||
<strong> : </strong>
|
||||
|
||||
(<span class="types"><a class="type" href="http://lua-api.factorio.com/latest/LuaGuiElement.html">LuaGuiElement</a></span>)
|
||||
|
||||
element that you want to use to update the store
|
||||
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
<!-- parameters end -->
|
||||
|
||||
<!-- returns start -->
|
||||
<!-- returns end -->
|
||||
|
||||
|
||||
<!-- see also start -->
|
||||
<!-- see also end -->
|
||||
|
||||
<!-- usage start -->
|
||||
<strong>Usage:</strong>
|
||||
<pre class="code" data-lang="Lua"><code><span class="comment">-- Setting the stored value to be the same as the caption for this element
|
||||
</span><span class="keyword">local</span> custom_button =
|
||||
Gui.get_concept(<span class="string">'CustomButton'</span>)
|
||||
|
||||
<span class="comment">-- You may want to use this with gui events
|
||||
</span>custom_button.set_store_from_instance(element)</code></pre>
|
||||
</span>custom_button.sync_instance(element)</code></pre>
|
||||
<!-- usage end -->
|
||||
|
||||
</dd>
|
||||
@@ -2575,7 +2791,7 @@ Gui.get_concept(<span class="string">'CustomButton'</span>)
|
||||
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
|
||||
</div>
|
||||
<div class="content-footer column col-9 col-sm-12">
|
||||
<i>Last updated 2019-08-27 21:07:36 UTC</i>
|
||||
<i>Last updated 2019-08-29 18:20:09 UTC</i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1432,7 +1432,7 @@
|
||||
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
|
||||
</div>
|
||||
<div class="content-footer column col-9 col-sm-12">
|
||||
<i>Last updated 2019-08-27 21:07:36 UTC</i>
|
||||
<i>Last updated 2019-08-29 18:20:09 UTC</i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -3152,7 +3152,7 @@
|
||||
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
|
||||
</div>
|
||||
<div class="content-footer column col-9 col-sm-12">
|
||||
<i>Last updated 2019-08-27 21:07:36 UTC</i>
|
||||
<i>Last updated 2019-08-29 18:20:09 UTC</i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -309,7 +309,7 @@ Store.register(team_scores,<span class="keyword">function</span>(value,key)
|
||||
<td class="summary">Gets the value stored at a location, this location must be registered</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name"><a href="#set">set(location[, key], value[, from_sync=false])</a></td>
|
||||
<td class="name"><a href="#set">set(location[, key], value[, from_sync=false][, from_internal=false])</a></td>
|
||||
<td class="summary">Sets the value at a location, this location must be registered</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -619,7 +619,7 @@ Store.register(team_scores,<span class="keyword">function</span>(value,key)
|
||||
<div class="divider divider-custom"></div>
|
||||
<div class="block section-item-header">
|
||||
<a href="#set" class="fragment-hashtag">#</a>
|
||||
<span class="section-item-title" id="set">set(location[, key], value[, from_sync=false])</span>
|
||||
<span class="section-item-title" id="set">set(location[, key], value[, from_sync=false][, from_internal=false])</span>
|
||||
</div>
|
||||
</dt>
|
||||
<dd>
|
||||
@@ -700,6 +700,23 @@ Store.register(team_scores,<span class="keyword">function</span>(value,key)
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<li class="section-subitem-li">
|
||||
|
||||
<strong><em>from_internal</em></strong>
|
||||
|
||||
<strong> : </strong>
|
||||
|
||||
(<span class="types"><a class="type" href="http://lua-api.factorio.com/latest/Builtin-Types.html#boolean">boolean</a></span>)
|
||||
|
||||
set this true to add one to the error stack offset
|
||||
|
||||
(<em>default</em>: false)
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
<!-- parameters end -->
|
||||
@@ -1128,7 +1145,7 @@ Store.register(team_scores,<span class="keyword">function</span>(value,key)
|
||||
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
|
||||
</div>
|
||||
<div class="content-footer column col-9 col-sm-12">
|
||||
<i>Last updated 2019-08-27 21:07:36 UTC</i>
|
||||
<i>Last updated 2019-08-29 18:20:09 UTC</i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -544,7 +544,7 @@
|
||||
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
|
||||
</div>
|
||||
<div class="content-footer column col-9 col-sm-12">
|
||||
<i>Last updated 2019-08-27 21:07:36 UTC</i>
|
||||
<i>Last updated 2019-08-29 18:20:09 UTC</i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -626,7 +626,7 @@
|
||||
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
|
||||
</div>
|
||||
<div class="content-footer column col-9 col-sm-12">
|
||||
<i>Last updated 2019-08-27 21:07:36 UTC</i>
|
||||
<i>Last updated 2019-08-29 18:20:09 UTC</i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -629,7 +629,7 @@
|
||||
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
|
||||
</div>
|
||||
<div class="content-footer column col-9 col-sm-12">
|
||||
<i>Last updated 2019-08-27 21:07:36 UTC</i>
|
||||
<i>Last updated 2019-08-29 18:20:09 UTC</i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -449,7 +449,7 @@
|
||||
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
|
||||
</div>
|
||||
<div class="content-footer column col-9 col-sm-12">
|
||||
<i>Last updated 2019-08-27 21:07:36 UTC</i>
|
||||
<i>Last updated 2019-08-29 18:20:09 UTC</i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -632,7 +632,7 @@
|
||||
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
|
||||
</div>
|
||||
<div class="content-footer column col-9 col-sm-12">
|
||||
<i>Last updated 2019-08-27 21:07:36 UTC</i>
|
||||
<i>Last updated 2019-08-29 18:20:09 UTC</i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -837,7 +837,7 @@
|
||||
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
|
||||
</div>
|
||||
<div class="content-footer column col-9 col-sm-12">
|
||||
<i>Last updated 2019-08-27 21:07:36 UTC</i>
|
||||
<i>Last updated 2019-08-29 18:20:09 UTC</i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -510,7 +510,7 @@ see ./expcore/commands.lua for more details</span></td>
|
||||
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
|
||||
</div>
|
||||
<div class="content-footer column col-9 col-sm-12">
|
||||
<i>Last updated 2019-08-27 21:07:36 UTC</i>
|
||||
<i>Last updated 2019-08-29 18:20:09 UTC</i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -351,7 +351,7 @@
|
||||
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
|
||||
</div>
|
||||
<div class="content-footer column col-9 col-sm-12">
|
||||
<i>Last updated 2019-08-27 21:07:36 UTC</i>
|
||||
<i>Last updated 2019-08-29 18:20:09 UTC</i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -419,7 +419,7 @@ fraction will decide a chance to spawn. 1 alien for 2 spawner's will have 50% on
|
||||
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
|
||||
</div>
|
||||
<div class="content-footer column col-9 col-sm-12">
|
||||
<i>Last updated 2019-08-27 21:07:36 UTC</i>
|
||||
<i>Last updated 2019-08-29 18:20:09 UTC</i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1164,7 +1164,7 @@
|
||||
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
|
||||
</div>
|
||||
<div class="content-footer column col-9 col-sm-12">
|
||||
<i>Last updated 2019-08-27 21:07:36 UTC</i>
|
||||
<i>Last updated 2019-08-29 18:20:09 UTC</i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -654,7 +654,7 @@
|
||||
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
|
||||
</div>
|
||||
<div class="content-footer column col-9 col-sm-12">
|
||||
<i>Last updated 2019-08-27 21:07:36 UTC</i>
|
||||
<i>Last updated 2019-08-29 18:20:09 UTC</i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -323,7 +323,7 @@
|
||||
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
|
||||
</div>
|
||||
<div class="content-footer column col-9 col-sm-12">
|
||||
<i>Last updated 2019-08-27 21:07:36 UTC</i>
|
||||
<i>Last updated 2019-08-29 18:20:09 UTC</i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1292,7 +1292,7 @@
|
||||
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
|
||||
</div>
|
||||
<div class="content-footer column col-9 col-sm-12">
|
||||
<i>Last updated 2019-08-27 21:07:36 UTC</i>
|
||||
<i>Last updated 2019-08-29 18:20:09 UTC</i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -434,7 +434,7 @@
|
||||
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
|
||||
</div>
|
||||
<div class="content-footer column col-9 col-sm-12">
|
||||
<i>Last updated 2019-08-27 21:07:36 UTC</i>
|
||||
<i>Last updated 2019-08-29 18:20:09 UTC</i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -338,7 +338,7 @@
|
||||
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
|
||||
</div>
|
||||
<div class="content-footer column col-9 col-sm-12">
|
||||
<i>Last updated 2019-08-27 21:07:36 UTC</i>
|
||||
<i>Last updated 2019-08-29 18:20:09 UTC</i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -441,7 +441,7 @@
|
||||
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
|
||||
</div>
|
||||
<div class="content-footer column col-9 col-sm-12">
|
||||
<i>Last updated 2019-08-27 21:07:36 UTC</i>
|
||||
<i>Last updated 2019-08-29 18:20:09 UTC</i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -752,7 +752,7 @@
|
||||
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
|
||||
</div>
|
||||
<div class="content-footer column col-9 col-sm-12">
|
||||
<i>Last updated 2019-08-27 21:07:36 UTC</i>
|
||||
<i>Last updated 2019-08-29 18:20:09 UTC</i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1382,7 +1382,7 @@
|
||||
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
|
||||
</div>
|
||||
<div class="content-footer column col-9 col-sm-12">
|
||||
<i>Last updated 2019-08-27 21:07:36 UTC</i>
|
||||
<i>Last updated 2019-08-29 18:20:09 UTC</i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -651,7 +651,7 @@
|
||||
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
|
||||
</div>
|
||||
<div class="content-footer column col-9 col-sm-12">
|
||||
<i>Last updated 2019-08-27 21:07:36 UTC</i>
|
||||
<i>Last updated 2019-08-29 18:20:09 UTC</i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -442,7 +442,7 @@
|
||||
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
|
||||
</div>
|
||||
<div class="content-footer column col-9 col-sm-12">
|
||||
<i>Last updated 2019-08-27 21:07:36 UTC</i>
|
||||
<i>Last updated 2019-08-29 18:20:09 UTC</i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -789,7 +789,7 @@ Public License instead of this License. But first, please read
|
||||
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
|
||||
</div>
|
||||
<div class="content-footer column col-9 col-sm-12">
|
||||
<i>Last updated 2019-08-27 21:07:36 UTC</i>
|
||||
<i>Last updated 2019-08-29 18:20:09 UTC</i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -332,7 +332,7 @@
|
||||
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
|
||||
</div>
|
||||
<div class="content-footer column col-9 col-sm-12">
|
||||
<i>Last updated 2019-08-27 21:07:36 UTC</i>
|
||||
<i>Last updated 2019-08-29 18:20:09 UTC</i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -69,5 +69,6 @@ local Gui = require 'expcore.gui.core'
|
||||
|
||||
Gui.require_concept('frame')
|
||||
Gui.require_concept('button')
|
||||
Gui.require_concept('checkbox')
|
||||
|
||||
return Gui
|
||||
31
expcore/gui/concepts/checkbox.lua
Normal file
31
expcore/gui/concepts/checkbox.lua
Normal file
@@ -0,0 +1,31 @@
|
||||
--[[-- Core Module - Gui
|
||||
@module Gui
|
||||
@alias Gui
|
||||
]]
|
||||
|
||||
local Gui = require 'expcore.gui.core'
|
||||
|
||||
--[[-- The basic checkbox element
|
||||
@element checkbox
|
||||
@param on_state_change fired when the state of the element is changed
|
||||
@tparam ?string|Concepts.LocalisedString caption the message that is shown next to the checkbox
|
||||
@tparam ?string|Concepts.LocalisedString tooltip the tooltip that shows when a player hovers over the checkbox
|
||||
@tparam boolean use_radio setting to true will use radio buttons rather than checkboxs
|
||||
]]
|
||||
Gui.new_concept('checkbox')
|
||||
:new_event('on_state_change',defines.events.on_gui_checked_state_changed)
|
||||
:new_property('tooltip')
|
||||
:new_property('caption')
|
||||
:new_property('default_state',false)
|
||||
:new_property('use_radio',false)
|
||||
:define_draw(function(properties,parent,element)
|
||||
element = parent.add{
|
||||
name = properties.name,
|
||||
type = properties.use_radio and 'radiobutton' or 'checkbox',
|
||||
caption = properties.caption,
|
||||
tooltip = properties.tooltip,
|
||||
state = properties.default_state
|
||||
}
|
||||
|
||||
return element
|
||||
end)
|
||||
@@ -10,9 +10,7 @@ local Gui = require 'expcore.gui.core'
|
||||
@tparam ?string|Concepts.LocalisedString title the title that will show in the frame
|
||||
]]
|
||||
Gui.new_concept('frame')
|
||||
:new_property('title',function(properties,value)
|
||||
properties.title = value
|
||||
end)
|
||||
:new_property('title')
|
||||
:define_draw(function(properties,parent,element)
|
||||
element = parent.add{
|
||||
name = properties.name,
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
-- Functions that act as a landing point for the other funtions
|
||||
-- @section core
|
||||
|
||||
local Event = require 'utils.event' -- @dep utils.event
|
||||
local Game = require 'utils.game' -- @dep utils.game
|
||||
local Prototype = require 'expcore.gui.prototype'
|
||||
|
||||
local Gui = {
|
||||
@@ -80,4 +80,40 @@ function Gui.clone_concept(name,new_name)
|
||||
return concept:clone(new_name)
|
||||
end
|
||||
|
||||
--[[-- A categorize function to be used with add_store, each player has their own category
|
||||
@tparam LuaGuiElement element the element that will be converted to a string
|
||||
@treturn string the player's name who owns this element
|
||||
@usage-- Storing data on a per player basis, can be used with instances
|
||||
Gui.get_concept('CustomButton')
|
||||
:define_data_store(Gui.categorize_by_player)
|
||||
]]
|
||||
function Gui.categorize_by_player(element)
|
||||
local player = Game.get_player_by_index(element.player_index)
|
||||
return player.name
|
||||
end
|
||||
|
||||
--[[-- A categorize function to be used with add_store, each force has its own category
|
||||
@tparam LuaGuiElement element the element that will be converted to a string
|
||||
@treturn string the player's force name who owns this element
|
||||
@usage-- Storing data on a per force basis, can be used with instances
|
||||
Gui.get_concept('CustomButton')
|
||||
:define_data_store(Gui.categorize_by_force)
|
||||
]]
|
||||
function Gui.categorize_by_force(element)
|
||||
local player = Game.get_player_by_index(element.player_index)
|
||||
return player.force.name
|
||||
end
|
||||
|
||||
--[[-- A categorize function to be used with add_store, each surface has its own category
|
||||
@tparam LuaGuiElement element the element that will be converted to a string
|
||||
@treturn string the player's surface name who owns this element
|
||||
@usage-- Storing data on a per surface basis, can be used with instances
|
||||
Gui.get_concept('CustomButton')
|
||||
:define_data_store(Gui.categorize_by_surface)
|
||||
]]
|
||||
function Gui.categorize_by_surface(element)
|
||||
local player = Game.get_player_by_index(element.player_index)
|
||||
return player.surface.name
|
||||
end
|
||||
|
||||
return Gui
|
||||
@@ -148,8 +148,8 @@ function Prototype:clone(concept_name)
|
||||
end
|
||||
|
||||
-- Remove all refrences to a combined store
|
||||
if concept.set_instance_from_store then
|
||||
concept.set_instance_from_store = nil
|
||||
if concept.sync_instance then
|
||||
concept.sync_instance = nil
|
||||
concept.set_store_from_instance = nil
|
||||
end
|
||||
|
||||
@@ -175,7 +175,7 @@ end
|
||||
@tparam string event_name the name of the event to add, must be unique, recomented to start with "on_"
|
||||
@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
|
||||
@treturn GuiConcept to allow chaining of functions
|
||||
@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')
|
||||
@@ -192,7 +192,7 @@ function Prototype:new_event(event_name,factorio_event,event_condition)
|
||||
--[[-- Adds a custom event handler, replace with the name of the event
|
||||
@function Prototype:on_custom_event
|
||||
@tparam function handler the function which will recive the event
|
||||
@treturn GuiConcept to allow chaing of functions
|
||||
@treturn GuiConcept to allow chaining of functions
|
||||
@usage-- When an admin clicks the button a message is printed
|
||||
local custom_button =
|
||||
Gui.get_concept('CustomButton')
|
||||
@@ -281,7 +281,7 @@ end
|
||||
@tparam string property_name the name of the new property, must be unique
|
||||
@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
|
||||
@treturn GuiConcept to allow chaining of functions
|
||||
@usage-- Adding caption, sprite, and tooltip to the base button concept
|
||||
local button =
|
||||
Gui.get_concept('Button')
|
||||
@@ -309,7 +309,7 @@ function Prototype:new_property(property_name,default,setter_callback)
|
||||
--[[-- Sets a new value for a property, triggers setter method if provided, replace with property name
|
||||
@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
|
||||
@treturn GuiConcept to allow chaining of functions
|
||||
@usage-- Setting the caption on the base button concept after a cloning
|
||||
local custom_button =
|
||||
Gui.get_concept('Button')
|
||||
@@ -342,7 +342,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
|
||||
@treturn GuiConcept to allow chaining of functions
|
||||
@usage-- Adding the draw define for the base button concept, we then return the element
|
||||
local button =
|
||||
Gui.get_concept('Button')
|
||||
@@ -415,8 +415,8 @@ function Prototype:draw(parent_element,...)
|
||||
end
|
||||
|
||||
-- Syncs the instance if there is a combined store
|
||||
if self.set_instance_from_store then
|
||||
self.set_instance_from_store(element)
|
||||
if self.sync_instance then
|
||||
self.sync_instance(element)
|
||||
end
|
||||
|
||||
return element
|
||||
@@ -428,7 +428,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
|
||||
@treturn GuiConcept to allow chaining of functions
|
||||
@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 =
|
||||
@@ -442,7 +442,11 @@ function Prototype:define_instance_store(category_callback)
|
||||
|
||||
local valid_category = category_callback and type(category_callback) == 'function'
|
||||
local function get_category(category)
|
||||
return valid_category and type(category) == 'table' and category_callback(category) or category
|
||||
if type(category) == 'table' and type(category.__self) == 'userdata' then
|
||||
return valid_category and category_callback(category) or nil
|
||||
else
|
||||
return category
|
||||
end
|
||||
end
|
||||
|
||||
--[[-- Gets all insatnces in a category, category may be nil to return all
|
||||
@@ -494,9 +498,9 @@ custom_button.update_instances(1,function(element)
|
||||
end)
|
||||
]]
|
||||
function self.update_instances(category,update_callback,...)
|
||||
local arg1
|
||||
local args
|
||||
if type(category) == 'function' then
|
||||
arg1 = update_callback
|
||||
args = {update_callback,...}
|
||||
update_callback = category
|
||||
category = nil
|
||||
end
|
||||
@@ -507,7 +511,11 @@ end)
|
||||
instances[key] = nil
|
||||
end
|
||||
|
||||
update_callback(instance,arg1,...)
|
||||
if args then
|
||||
update_callback(instance,unpack(args))
|
||||
else
|
||||
update_callback(instance,...)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -520,7 +528,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
|
||||
@treturn GuiConcept to allow chaining of functions
|
||||
@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 =
|
||||
@@ -540,7 +548,11 @@ function Prototype:define_data_store(category_callback)
|
||||
|
||||
local valid_category = category_callback and type(category_callback) == 'function'
|
||||
local function get_category(category)
|
||||
return valid_category and type(category) == 'table' and category_callback(category) or category
|
||||
if type(category) == 'table' and type(category.__self) == 'userdata' then
|
||||
return valid_category and category_callback(category) or nil
|
||||
else
|
||||
return category
|
||||
end
|
||||
end
|
||||
|
||||
--[[-- Gets the data that is stored for this category
|
||||
@@ -614,66 +626,47 @@ end) -- player index 1
|
||||
return self
|
||||
end
|
||||
|
||||
--[[-- Used to add a both instance and data stores which are linked together, new instances are synced to current value, changing one instances changes them all
|
||||
--[[-- Used to add a both instance and data stores which are linked together, new instances are synced to current value, changing one instance changes them all
|
||||
@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
|
||||
@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-- Adding a way to sync captions bettween all instances, more useful for things that arnt buttons
|
||||
@tparam function sync_callback the function which is called to update an instance to match the store
|
||||
@treturn GuiConcept to allow chaining of functions
|
||||
@usage-- Adding a way to sync enabled state bettween all instances, more useful for things that arnt buttons
|
||||
local custom_button =
|
||||
Gui.get_concept('CustomButton')
|
||||
:define_combined_store(
|
||||
function(element)
|
||||
return element.player_index -- The data is stored based on player id
|
||||
end,
|
||||
function(element)
|
||||
return element.caption -- We want to store the caption
|
||||
end,
|
||||
function(element,value)
|
||||
element.caption = value -- This is the inverse of above
|
||||
element.enabled = value -- We will use custom_button.set_data(element,value) to trigger this
|
||||
end)
|
||||
]]
|
||||
function Prototype:define_combined_store(category_callback,get_callback,set_callback)
|
||||
if set_callback == nil then
|
||||
set_callback = get_callback
|
||||
get_callback = category_callback
|
||||
function Prototype:define_combined_store(category_callback,sync_callback)
|
||||
if sync_callback == nil then
|
||||
sync_callback = category_callback
|
||||
category_callback = nil
|
||||
end
|
||||
|
||||
self:define_data_store(category_callback)
|
||||
self:define_instance_Store(category_callback)
|
||||
self:define_instance_store(category_callback)
|
||||
|
||||
-- Will update all instances when the data store updates
|
||||
self:on_data_store_update(function(event)
|
||||
self.update_instances(event.category,set_callback,event.value)
|
||||
self.update_instances(event.category,sync_callback,event.value)
|
||||
end)
|
||||
|
||||
--[[-- 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
|
||||
--[[-- Will sync an instance to match the stored value based on the given sync callback
|
||||
@function Prototype.sync_instance
|
||||
@tparam LuaGuiElement element the element that you want to have update
|
||||
@usage-- 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
|
||||
custom_button.set_instance_from_store(element)
|
||||
custom_button.sync_instance(element)
|
||||
]]
|
||||
function self.set_instance_from_store(element)
|
||||
set_callback(element,self.get_data(element))
|
||||
end
|
||||
|
||||
--[[-- 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-- 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
|
||||
custom_button.set_store_from_instance(element)
|
||||
]]
|
||||
function self.set_store_from_instance(element)
|
||||
self.set_data(element,get_callback(element))
|
||||
function self.sync_instance(element)
|
||||
sync_callback(element,self.get_data(element))
|
||||
end
|
||||
|
||||
return self
|
||||
|
||||
@@ -93,6 +93,10 @@ end
|
||||
|
||||
--[[
|
||||
Buttons
|
||||
> Basic Button -- Button with a caption and a tooltip
|
||||
> Sprite Button -- Button with a single sprite and a tooltip
|
||||
> Multi Sprite Button -- Button with three sprites and a tooltip
|
||||
> Admin Button -- Button which is disabled if the player is not an admin
|
||||
]]
|
||||
|
||||
local basic_button =
|
||||
@@ -139,4 +143,66 @@ tests.Buttons = {
|
||||
['Sprite Button'] = sprite_button,
|
||||
['Multi Sprite Button'] = multi_sprite_button,
|
||||
['Admin Button'] = admin_button,
|
||||
}
|
||||
|
||||
--[[
|
||||
Checkboxs
|
||||
> Basic Checkbox -- Simple checkbox that can be toggled
|
||||
> Game Stored Checkbox -- Checkbox which syncs its state between all players
|
||||
> Force Stored Checkbox -- Checkbox which syncs its state with all players on the same force
|
||||
> Player Stored Checkbox -- Checkbox that stores its state between re-draws
|
||||
]]
|
||||
|
||||
local basic_checkbox =
|
||||
Gui.clone_concept('checkbox',TEST 'basic_checkbox')
|
||||
:set_caption('Basic Checkbox')
|
||||
:set_tooltip('Basic checkbox')
|
||||
:on_state_change(function(event)
|
||||
event.player.print('Basic checkbox is now: '..tostring(event.element.state))
|
||||
end)
|
||||
|
||||
local game_checkbox =
|
||||
Gui.clone_concept('checkbox',TEST 'game_checkbox')
|
||||
:set_caption('Game Stored Checkbox')
|
||||
:set_tooltip('Game stored checkbox')
|
||||
:on_state_change(function(event)
|
||||
local element = event.element
|
||||
event.concept.set_data(element,element.state) -- Update other instances
|
||||
event.player.print('Game stored checkbox is now: '..tostring(element.state))
|
||||
end)
|
||||
:define_combined_store(function(element,state)
|
||||
element.state = state or false
|
||||
end)
|
||||
|
||||
local force_checkbox =
|
||||
Gui.clone_concept('checkbox',TEST 'force_checkbox')
|
||||
:set_caption('Force Stored Checkbox')
|
||||
:set_tooltip('Force stored checkbox')
|
||||
:on_state_change(function(event)
|
||||
local element = event.element
|
||||
event.concept.set_data(element,element.state) -- Update other instances
|
||||
event.player.print('Force stored checkbox is now: '..tostring(element.state))
|
||||
end)
|
||||
:define_combined_store(function(element,state)
|
||||
element.state = state or false
|
||||
end)
|
||||
|
||||
local player_checkbox =
|
||||
Gui.clone_concept('checkbox',TEST 'player_checkbox')
|
||||
:set_caption('Player Stored Checkbox')
|
||||
:set_tooltip('Player stored checkbox')
|
||||
:on_state_change(function(event)
|
||||
local element = event.element
|
||||
event.concept.set_data(element,element.state) -- Update other instances
|
||||
event.player.print('Player stored checkbox is now: '..tostring(element.state))
|
||||
end)
|
||||
:define_combined_store(function(element,state)
|
||||
element.state = state or false
|
||||
end)
|
||||
|
||||
tests.Checkboxs = {
|
||||
['Basic Checkbox'] = basic_checkbox,
|
||||
['Game Stored Checkbox'] = game_checkbox,
|
||||
['Force Stored Checkbox'] = force_checkbox,
|
||||
['Player Stored Checkbox'] = player_checkbox
|
||||
}
|
||||
@@ -122,14 +122,15 @@ end
|
||||
-- @tparam[opt] string key the key location if used
|
||||
-- @tparam any value the new value to set at the location, value may be reverted if there is a watch callback, cant be nil
|
||||
-- @tparam[opt=false] boolean from_sync set this true to avoid an output to the sync file
|
||||
-- @tparam[opt=false] boolean from_internal set this true to add one to the error stack offset
|
||||
-- @treturn boolean true if it was successful
|
||||
function Store.set(location,key,value,from_sync)
|
||||
if not Store.callbacks[location] then
|
||||
return error('Location is not registered', 2)
|
||||
function Store.set(location,key,value,from_sync,from_internal)
|
||||
if not Store.registered[location] then
|
||||
return error('Location is not registered', from_internal and 3 or 2)
|
||||
end
|
||||
|
||||
if key == nil or value == nil then
|
||||
value = key or value
|
||||
if value == nil then
|
||||
value = key
|
||||
key = nil
|
||||
end
|
||||
|
||||
@@ -163,20 +164,24 @@ end
|
||||
function Store.update(location,key,update_callback,...)
|
||||
local value = Store.get(location,key)
|
||||
|
||||
local arg1
|
||||
local args
|
||||
if type(key) == 'function' then
|
||||
arg1 = update_callback
|
||||
args = {update_callback,...}
|
||||
update_callback = key
|
||||
key = nil
|
||||
end
|
||||
|
||||
local rtn
|
||||
if update_callback and type(update_callback) == 'function' then
|
||||
rtn = update_callback(value,key,arg1,...)
|
||||
if args then
|
||||
rtn = udpate_callback(value,key,unpack(args))
|
||||
else
|
||||
rtn = update_callback(value,key,...)
|
||||
end
|
||||
end
|
||||
|
||||
if rtn then
|
||||
Store.set(location,key,rtn)
|
||||
Store.set(location,key,rtn,nil,true)
|
||||
else
|
||||
script.raise_event(Store.events.on_value_changed,{
|
||||
tick=game.tick,
|
||||
@@ -204,7 +209,7 @@ function Store.update_all(location,update_callback,...)
|
||||
end
|
||||
|
||||
if rtn then
|
||||
Store.set(location,key,rtn)
|
||||
Store.set(location,key,rtn,nil,true)
|
||||
else
|
||||
script.raise_event(Store.events.on_value_changed,{
|
||||
tick=game.tick,
|
||||
|
||||
Reference in New Issue
Block a user