mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2025-12-27 11:35:22 +09:00
Added progress bar
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-31 15:13:50 UTC</i>
|
||||
<i>Last updated 2019-08-31 17:46:10 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-31 15:13:50 UTC</i>
|
||||
<i>Last updated 2019-08-31 17:46:10 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-31 15:13:50 UTC</i>
|
||||
<i>Last updated 2019-08-31 17:46:10 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-31 15:13:50 UTC</i>
|
||||
<i>Last updated 2019-08-31 17:46:10 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-31 15:13:50 UTC</i>
|
||||
<i>Last updated 2019-08-31 17:46:10 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-31 15:13:50 UTC</i>
|
||||
<i>Last updated 2019-08-31 17:46:10 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-31 15:13:50 UTC</i>
|
||||
<i>Last updated 2019-08-31 17:46:10 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-31 15:13:50 UTC</i>
|
||||
<i>Last updated 2019-08-31 17:46:10 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-31 15:13:50 UTC</i>
|
||||
<i>Last updated 2019-08-31 17:46:10 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-31 15:13:50 UTC</i>
|
||||
<i>Last updated 2019-08-31 17:46:10 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-31 15:13:50 UTC</i>
|
||||
<i>Last updated 2019-08-31 17:46:10 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-31 15:13:50 UTC</i>
|
||||
<i>Last updated 2019-08-31 17:46:10 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-31 15:13:50 UTC</i>
|
||||
<i>Last updated 2019-08-31 17:46:10 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-31 15:13:50 UTC</i>
|
||||
<i>Last updated 2019-08-31 17:46:10 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-31 15:13:50 UTC</i>
|
||||
<i>Last updated 2019-08-31 17:46:10 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-31 15:13:50 UTC</i>
|
||||
<i>Last updated 2019-08-31 17:46:10 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-31 15:13:50 UTC</i>
|
||||
<i>Last updated 2019-08-31 17:46:10 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-31 15:13:50 UTC</i>
|
||||
<i>Last updated 2019-08-31 17:46:10 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-31 15:13:50 UTC</i>
|
||||
<i>Last updated 2019-08-31 17:46:10 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-31 15:13:50 UTC</i>
|
||||
<i>Last updated 2019-08-31 17:46:10 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-31 15:13:50 UTC</i>
|
||||
<i>Last updated 2019-08-31 17:46:10 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-31 15:13:50 UTC</i>
|
||||
<i>Last updated 2019-08-31 17:46:10 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-31 15:13:50 UTC</i>
|
||||
<i>Last updated 2019-08-31 17:46:10 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-31 15:13:50 UTC</i>
|
||||
<i>Last updated 2019-08-31 17:46:10 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-31 15:13:50 UTC</i>
|
||||
<i>Last updated 2019-08-31 17:46:10 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-31 15:13:50 UTC</i>
|
||||
<i>Last updated 2019-08-31 17:46:10 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-31 15:13:50 UTC</i>
|
||||
<i>Last updated 2019-08-31 17:46:10 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-31 15:13:50 UTC</i>
|
||||
<i>Last updated 2019-08-31 17:46:10 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-31 15:13:50 UTC</i>
|
||||
<i>Last updated 2019-08-31 17:46:10 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-31 15:13:50 UTC</i>
|
||||
<i>Last updated 2019-08-31 17:46:10 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-31 15:13:50 UTC</i>
|
||||
<i>Last updated 2019-08-31 17:46:10 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-31 15:13:50 UTC</i>
|
||||
<i>Last updated 2019-08-31 17:46:10 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-31 15:13:50 UTC</i>
|
||||
<i>Last updated 2019-08-31 17:46:10 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-31 15:13:50 UTC</i>
|
||||
<i>Last updated 2019-08-31 17:46:10 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-31 15:13:50 UTC</i>
|
||||
<i>Last updated 2019-08-31 17:46:10 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-31 15:13:50 UTC</i>
|
||||
<i>Last updated 2019-08-31 17:46:10 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-31 15:13:50 UTC</i>
|
||||
<i>Last updated 2019-08-31 17:46:10 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-31 15:13:50 UTC</i>
|
||||
<i>Last updated 2019-08-31 17:46:10 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-31 15:13:50 UTC</i>
|
||||
<i>Last updated 2019-08-31 17:46:10 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-31 15:13:50 UTC</i>
|
||||
<i>Last updated 2019-08-31 17:46:10 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-31 15:13:50 UTC</i>
|
||||
<i>Last updated 2019-08-31 17:46:10 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-31 15:13:50 UTC</i>
|
||||
<i>Last updated 2019-08-31 17:46:10 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-31 15:13:50 UTC</i>
|
||||
<i>Last updated 2019-08-31 17:46:10 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-31 15:13:50 UTC</i>
|
||||
<i>Last updated 2019-08-31 17:46:10 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-31 15:13:50 UTC</i>
|
||||
<i>Last updated 2019-08-31 17:46:10 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-31 15:13:50 UTC</i>
|
||||
<i>Last updated 2019-08-31 17:46:10 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-31 15:13:50 UTC</i>
|
||||
<i>Last updated 2019-08-31 17:46:10 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-31 15:13:50 UTC</i>
|
||||
<i>Last updated 2019-08-31 17:46:10 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-31 15:13:50 UTC</i>
|
||||
<i>Last updated 2019-08-31 17:46:10 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-31 15:13:50 UTC</i>
|
||||
<i>Last updated 2019-08-31 17:46:10 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-31 15:13:50 UTC</i>
|
||||
<i>Last updated 2019-08-31 17:46:10 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-31 15:13:50 UTC</i>
|
||||
<i>Last updated 2019-08-31 17:46:10 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-31 15:13:50 UTC</i>
|
||||
<i>Last updated 2019-08-31 17:46:10 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-31 15:13:50 UTC</i>
|
||||
<i>Last updated 2019-08-31 17:46:10 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-31 15:13:50 UTC</i>
|
||||
<i>Last updated 2019-08-31 17:46:10 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-31 15:13:50 UTC</i>
|
||||
<i>Last updated 2019-08-31 17:46:10 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-31 15:13:50 UTC</i>
|
||||
<i>Last updated 2019-08-31 17:46:10 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-31 15:13:50 UTC</i>
|
||||
<i>Last updated 2019-08-31 17:46:10 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-31 15:13:50 UTC</i>
|
||||
<i>Last updated 2019-08-31 17:46:10 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-31 15:13:50 UTC</i>
|
||||
<i>Last updated 2019-08-31 17:46:10 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-31 15:13:50 UTC</i>
|
||||
<i>Last updated 2019-08-31 17:46:10 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-31 15:13:50 UTC</i>
|
||||
<i>Last updated 2019-08-31 17:46:10 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-31 15:13:50 UTC</i>
|
||||
<i>Last updated 2019-08-31 17:46:10 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-31 15:13:50 UTC</i>
|
||||
<i>Last updated 2019-08-31 17:46:10 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-31 15:13:50 UTC</i>
|
||||
<i>Last updated 2019-08-31 17:46:10 UTC</i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -2680,7 +2680,7 @@ Common.table_insert(tbl,<span class="number">50</span>,tbl2)</code></pre>
|
||||
<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-31 15:13:50 UTC</i>
|
||||
<i>Last updated 2019-08-31 17:46:10 UTC</i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -43,6 +43,7 @@
|
||||
<ul class="nav">
|
||||
<li class="nav-item"><a href="#Elements"><span class="fragment-hashtag">#</span> Elements</a></li>
|
||||
<li class="nav-item"><a href="#Dropdowns"><span class="fragment-hashtag">#</span> Dropdowns </a></li>
|
||||
<li class="nav-item"><a href="#Progress_Bars"><span class="fragment-hashtag">#</span> Progress Bars </a></li>
|
||||
<li class="nav-item"><a href="#Concept_Control"><span class="fragment-hashtag">#</span> Concept Control </a></li>
|
||||
<li class="nav-item"><a href="#Element_Control"><span class="fragment-hashtag">#</span> Element Control </a></li>
|
||||
<li class="nav-item"><a href="#Store_Categories"><span class="fragment-hashtag">#</span> Store Categories </a></li>
|
||||
@@ -212,6 +213,7 @@
|
||||
<ul class="nav">
|
||||
<li class="nav-item"><a href="#Elements"><span class="fragment-hashtag">#</span> Elements</a></li>
|
||||
<li class="nav-item"><a href="#Dropdowns"><span class="fragment-hashtag">#</span> Dropdowns </a></li>
|
||||
<li class="nav-item"><a href="#Progress_Bars"><span class="fragment-hashtag">#</span> Progress Bars </a></li>
|
||||
<li class="nav-item"><a href="#Concept_Control"><span class="fragment-hashtag">#</span> Concept Control </a></li>
|
||||
<li class="nav-item"><a href="#Element_Control"><span class="fragment-hashtag">#</span> Element Control </a></li>
|
||||
<li class="nav-item"><a href="#Store_Categories"><span class="fragment-hashtag">#</span> Store Categories </a></li>
|
||||
@@ -338,6 +340,10 @@ button:clone(<span class="string">'CustomButton'</span>)
|
||||
<td class="name"><a href="#frame">frame</a></td>
|
||||
<td class="summary">The basic frame element</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name"><a href="#progress_bar">progress_bar</a></td>
|
||||
<td class="summary">The basic checkbox element</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<table class="section-content-list">
|
||||
@@ -362,6 +368,34 @@ button:clone(<span class="string">'CustomButton'</span>)
|
||||
</table>
|
||||
<table class="section-content-list">
|
||||
<thead>
|
||||
<h3><a href="#Progress_Bars">Progress Bars </a></h3>
|
||||
<span></span>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="name"><a href="#progress_bar:increment">progress_bar:increment(element[, amount=1])</a></td>
|
||||
<td class="summary">Will increase the progress of a progress bar based on this concept, if the concept has an instance store then element acts as the category, if you have a combined store it will NOT update all instances</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name"><a href="#progress_bar:decrement">progress_bar:decrement(element[, amount=1])</a></td>
|
||||
<td class="summary">Will decrease the progress of a progress bar based on this concept, if the concept has an instance store then element acts as the category, if you have a combined store it will NOT update all instances</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name"><a href="#progress_bar:reset">progress_bar:reset(element)</a></td>
|
||||
<td class="summary">Resets the progress back to 0% for this element, if the concept has an instance store then element acts as the category, if you have a combined store it will NOT update all instances</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name"><a href="#increment_progress_bar">increment_progress_bar(element[, amount=0.01])</a></td>
|
||||
<td class="summary">Increment any progress bar by the given percentage</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name"><a href="#decrement_progress_bar">decrement_progress_bar(element[, amount=0.01])</a></td>
|
||||
<td class="summary">Decrement any progress bar by the given percentage</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<table class="section-content-list">
|
||||
<thead>
|
||||
<h3><a href="#Concept_Control">Concept Control </a></h3>
|
||||
<span></span>
|
||||
</thead>
|
||||
@@ -1042,7 +1076,7 @@ Gui.clone_concept(<span class="string">'dropdown'</span>,<span class="string">'d
|
||||
<strong>Usage:</strong>
|
||||
<pre class="code" data-lang="Lua"><code><span class="comment">-- Making a basic elem button
|
||||
</span><span class="keyword">local</span> basic_elem_button =
|
||||
Gui.clone_concept(<span class="string">'elem_button'</span>,TEST <span class="string">'basic_elembutton'</span>)
|
||||
Gui.clone_concept(<span class="string">'elem_button'</span>,<span class="string">'basic_elembutton'</span>)
|
||||
:on_selection_change(<span class="keyword">function</span>(event)
|
||||
event.player.<span class="global">print</span>(<span class="string">'Basic elem button is now: '</span>..event.element.elem_value)
|
||||
<span class="keyword">end</span>)</code></pre>
|
||||
@@ -1084,6 +1118,22 @@ Gui.clone_concept(<span class="string">'elem_button'</span>,TEST <span class="st
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<li class="section-subitem-li">
|
||||
|
||||
<strong><em>direction</em></strong>
|
||||
|
||||
<strong> : </strong>
|
||||
|
||||
(<span class="types"><a class="type" href="http://lua-api.factorio.com/latest/Builtin-Types.html#string">string</a></span>)
|
||||
|
||||
the direction that children will be added
|
||||
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
<!-- parameters end -->
|
||||
@@ -1109,6 +1159,133 @@ Gui.clone_concept(<span class="string">'dropdown'</span>,<span class="string">'b
|
||||
<span class="keyword">end</span>)</code></pre>
|
||||
<!-- usage end -->
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<div class="divider divider-custom"></div>
|
||||
<div class="block section-item-header">
|
||||
<a href="#progress_bar" class="fragment-hashtag">#</a>
|
||||
<span class="section-item-title" id="progress_bar">progress_bar</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_completion</em></strong>
|
||||
|
||||
<strong> : </strong>
|
||||
|
||||
|
||||
fired when increment reaches the maxium value set by set_maximum
|
||||
|
||||
</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 will show for this element
|
||||
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<li class="section-subitem-li">
|
||||
|
||||
<strong><em>maximum</em></strong>
|
||||
|
||||
<strong> : </strong>
|
||||
|
||||
(<span class="types"><a class="type" href="https://www.lua.org/pil/2.3.html">number</a></span>)
|
||||
|
||||
the maxium amount an instance can be increased, default 100
|
||||
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<li class="section-subitem-li">
|
||||
|
||||
<strong><em>delay_completion</em></strong>
|
||||
|
||||
<strong> : </strong>
|
||||
|
||||
(<span class="types"><a class="type" href="http://lua-api.factorio.com/latest/Builtin-Types.html#boolean">boolean</a></span>)
|
||||
|
||||
when true the progress will be completed untill after the maximum rather than at the maximum
|
||||
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<li class="section-subitem-li">
|
||||
|
||||
<strong><em>inverted</em></strong>
|
||||
|
||||
<strong> : </strong>
|
||||
|
||||
(<span class="types"><a class="type" href="http://lua-api.factorio.com/latest/Builtin-Types.html#boolean">boolean</a></span>)
|
||||
|
||||
although this will NOT effect how you use the functions it will make the element start full and reduce as you call increase, note issues with 0 detections
|
||||
|
||||
</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">-- Making a basic progress bar, will increase when pressed then will reset when full
|
||||
</span><span class="keyword">local</span> basic_progress_bar =
|
||||
Gui.clone_concept(<span class="string">'progress_bar'</span>,<span class="string">'basic_progress_bar'</span>)
|
||||
:set_tooltip(<span class="string">'Basic progress bar'</span>)
|
||||
:set_maximum(<span class="number">5</span>)
|
||||
:new_event(<span class="string">'on_click'</span>,defines.events.on_gui_click)
|
||||
:on_click(<span class="keyword">function</span>(event)
|
||||
event.concept:increment(event.element)
|
||||
<span class="keyword">end</span>)
|
||||
:set_delay_completion(<span class="keyword">true</span>)
|
||||
:on_completion(<span class="keyword">function</span>(event)
|
||||
event.concept:reset(event.element)
|
||||
<span class="keyword">end</span>)</code></pre>
|
||||
<!-- usage end -->
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<h3><span id="Dropdowns" class="section-title"><a href="#Dropdowns">Dropdowns </a></span></h3>
|
||||
@@ -1343,6 +1520,383 @@ Gui.clone_concept(<span class="string">'dropdown'</span>,<span class="string">'b
|
||||
</span>Gui.add_dropdown_items(element,<span class="number">1</span>,{<span class="string">'foo'</span>,<span class="string">'bar'</span>})</code></pre>
|
||||
<!-- usage end -->
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<h3><span id="Progress_Bars" class="section-title"><a href="#Progress_Bars">Progress Bars </a></span></h3>
|
||||
<dl class="section-body-container">
|
||||
<dt>
|
||||
<div class="divider divider-custom"></div>
|
||||
<div class="block section-item-header">
|
||||
<a href="#progress_bar:increment" class="fragment-hashtag">#</a>
|
||||
<span class="section-item-title" id="progress_bar:increment">progress_bar:increment(element[, amount=1])</span>
|
||||
</div>
|
||||
</dt>
|
||||
<dd>
|
||||
<div class="section-item-body">
|
||||
|
||||
<p class="section-item-summary">Will increase the progress of a progress bar based on this concept, if the concept has an instance store then element acts as the category, if you have a combined store it will NOT update all instances</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> or <a class="type" href="http://lua-api.factorio.com/latest/Builtin-Types.html#string">string</a></span>)
|
||||
|
||||
either the element that is changed or the category that is being changed (only if an instance store is defined)
|
||||
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<li class="section-subitem-li">
|
||||
|
||||
<strong><em>amount</em></strong>
|
||||
|
||||
<strong> : </strong>
|
||||
|
||||
(<span class="types"><a class="type" href="https://www.lua.org/pil/2.3.html">number</a></span>)
|
||||
|
||||
the amount that will bar will increase, note that this amount must be less than the max
|
||||
|
||||
(<em>default</em>: 1)
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
<!-- parameters end -->
|
||||
|
||||
<!-- returns start -->
|
||||
<strong>Returns:</strong>
|
||||
<ul>
|
||||
<li>
|
||||
(<span class="types"><a class="type" href="https://www.lua.org/pil/2.3.html">number</a> or <a class="type" href="https://www.lua.org/pil/2.1.html">nil</a></span>)
|
||||
<span class="return-text">the new value of the element, use this to sync a data store, if the return is nil then either a instance store was used or the new value may have changed</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">-- Incrementing progress bar with no instance store
|
||||
</span><span class="keyword">local</span> new_value = progress_bar:increment(element)</code></pre>
|
||||
<pre class="code" data-lang="Lua"><code><span class="comment">-- Incrementing progress bar with an instance store
|
||||
</span>progress_bar:increment(category)</code></pre>
|
||||
<!-- usage end -->
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<div class="divider divider-custom"></div>
|
||||
<div class="block section-item-header">
|
||||
<a href="#progress_bar:decrement" class="fragment-hashtag">#</a>
|
||||
<span class="section-item-title" id="progress_bar:decrement">progress_bar:decrement(element[, amount=1])</span>
|
||||
</div>
|
||||
</dt>
|
||||
<dd>
|
||||
<div class="section-item-body">
|
||||
|
||||
<p class="section-item-summary">Will decrease the progress of a progress bar based on this concept, if the concept has an instance store then element acts as the category, if you have a combined store it will NOT update all instances</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> or <a class="type" href="http://lua-api.factorio.com/latest/Builtin-Types.html#string">string</a></span>)
|
||||
|
||||
either the element that is changed or the category that is being changed (only if an instance store is defined)
|
||||
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<li class="section-subitem-li">
|
||||
|
||||
<strong><em>amount</em></strong>
|
||||
|
||||
<strong> : </strong>
|
||||
|
||||
(<span class="types"><a class="type" href="https://www.lua.org/pil/2.3.html">number</a></span>)
|
||||
|
||||
the amount that will bar will decrease, note that this amount must be less than the max
|
||||
|
||||
(<em>default</em>: 1)
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
<!-- parameters end -->
|
||||
|
||||
<!-- returns start -->
|
||||
<strong>Returns:</strong>
|
||||
<ul>
|
||||
<li>
|
||||
(<span class="types"><a class="type" href="https://www.lua.org/pil/2.3.html">number</a></span>)
|
||||
<span class="return-text">the new value of the element, use this to sync a data store, if the return is nil then either a instance store was used or the new value may have changed</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">-- Decrementing progress bar with no instance store
|
||||
</span><span class="keyword">local</span> new_value = progress_bar:decrement(element)</code></pre>
|
||||
<pre class="code" data-lang="Lua"><code><span class="comment">-- Decrementing progress bar with an instance store
|
||||
</span>progress_bar:decrement(category)</code></pre>
|
||||
<!-- usage end -->
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<div class="divider divider-custom"></div>
|
||||
<div class="block section-item-header">
|
||||
<a href="#progress_bar:reset" class="fragment-hashtag">#</a>
|
||||
<span class="section-item-title" id="progress_bar:reset">progress_bar:reset(element)</span>
|
||||
</div>
|
||||
</dt>
|
||||
<dd>
|
||||
<div class="section-item-body">
|
||||
|
||||
<p class="section-item-summary">Resets the progress back to 0% for this element, if the concept has an instance store then element acts as the category, if you have a combined store it will NOT update all instances</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> or <a class="type" href="http://lua-api.factorio.com/latest/Builtin-Types.html#string">string</a></span>)
|
||||
|
||||
either the element that is changed or the category that is being changed (only if an instance store is defined)
|
||||
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
<!-- parameters end -->
|
||||
|
||||
<!-- returns start -->
|
||||
<strong>Returns:</strong>
|
||||
<ul>
|
||||
<li>
|
||||
(<span class="types"><a class="type" href="https://www.lua.org/pil/2.3.html">number</a> or <a class="type" href="https://www.lua.org/pil/2.1.html">nil</a></span>)
|
||||
<span class="return-text">the new value of the element, use this to sync a data store, if the return is nil then either a instance store was used or the new value may have changed</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">-- Reseting a progress bar with no instance store
|
||||
</span><span class="keyword">local</span> new_value = progress_bar:reset(element)</code></pre>
|
||||
<pre class="code" data-lang="Lua"><code><span class="comment">-- Reseting a progress bar with an instance store
|
||||
</span>progress_bar:reset(category)</code></pre>
|
||||
<!-- usage end -->
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<div class="divider divider-custom"></div>
|
||||
<div class="block section-item-header">
|
||||
<a href="#increment_progress_bar" class="fragment-hashtag">#</a>
|
||||
<span class="section-item-title" id="increment_progress_bar">increment_progress_bar(element[, amount=0.01])</span>
|
||||
</div>
|
||||
</dt>
|
||||
<dd>
|
||||
<div class="section-item-body">
|
||||
|
||||
<p class="section-item-summary">Increment any progress bar by the given percentage</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 progress bar that you want to update
|
||||
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<li class="section-subitem-li">
|
||||
|
||||
<strong><em>amount</em></strong>
|
||||
|
||||
<strong> : </strong>
|
||||
|
||||
(<span class="types"><a class="type" href="https://www.lua.org/pil/2.3.html">number</a></span>)
|
||||
|
||||
the percentage that you want to increment the progress bar by
|
||||
|
||||
(<em>default</em>: 0.01)
|
||||
</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#boolean">boolean</a></span>)
|
||||
<span class="return-text">true if the bar is now full</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">-- Increment any progress bar by 10%
|
||||
</span>Gui.increment_progress_bar(element,<span class="number">0.1</span>)</code></pre>
|
||||
<!-- usage end -->
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<div class="divider divider-custom"></div>
|
||||
<div class="block section-item-header">
|
||||
<a href="#decrement_progress_bar" class="fragment-hashtag">#</a>
|
||||
<span class="section-item-title" id="decrement_progress_bar">decrement_progress_bar(element[, amount=0.01])</span>
|
||||
</div>
|
||||
</dt>
|
||||
<dd>
|
||||
<div class="section-item-body">
|
||||
|
||||
<p class="section-item-summary">Decrement any progress bar by the given percentage</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 progress bar that you want to update
|
||||
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<li class="section-subitem-li">
|
||||
|
||||
<strong><em>amount</em></strong>
|
||||
|
||||
<strong> : </strong>
|
||||
|
||||
(<span class="types"><a class="type" href="https://www.lua.org/pil/2.3.html">number</a></span>)
|
||||
|
||||
the percentage that you want to decrement the progress bar by
|
||||
|
||||
(<em>default</em>: 0.01)
|
||||
</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#boolean">boolean</a></span>)
|
||||
<span class="return-text">true if the bar is now empty</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">-- Decrement any progress bar by 10%
|
||||
</span>Gui.decrement_progress_bar(element,<span class="number">0.1</span>)</code></pre>
|
||||
<!-- usage end -->
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<h3><span id="Concept_Control" class="section-title"><a href="#Concept_Control">Concept Control </a></span></h3>
|
||||
@@ -3886,7 +4440,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-31 15:13:50 UTC</i>
|
||||
<i>Last updated 2019-08-31 17:46:10 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-31 15:13:50 UTC</i>
|
||||
<i>Last updated 2019-08-31 17:46:10 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-31 15:13:50 UTC</i>
|
||||
<i>Last updated 2019-08-31 17:46:10 UTC</i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1145,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-31 15:13:50 UTC</i>
|
||||
<i>Last updated 2019-08-31 17:46:10 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-31 15:13:50 UTC</i>
|
||||
<i>Last updated 2019-08-31 17:46:10 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-31 15:13:50 UTC</i>
|
||||
<i>Last updated 2019-08-31 17:46:10 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-31 15:13:50 UTC</i>
|
||||
<i>Last updated 2019-08-31 17:46:10 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-31 15:13:50 UTC</i>
|
||||
<i>Last updated 2019-08-31 17:46:10 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-31 15:13:50 UTC</i>
|
||||
<i>Last updated 2019-08-31 17:46:10 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-31 15:13:50 UTC</i>
|
||||
<i>Last updated 2019-08-31 17:46:10 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-31 15:13:50 UTC</i>
|
||||
<i>Last updated 2019-08-31 17:46:10 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-31 15:13:50 UTC</i>
|
||||
<i>Last updated 2019-08-31 17:46:10 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-31 15:13:50 UTC</i>
|
||||
<i>Last updated 2019-08-31 17:46:10 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-31 15:13:50 UTC</i>
|
||||
<i>Last updated 2019-08-31 17:46:10 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-31 15:13:50 UTC</i>
|
||||
<i>Last updated 2019-08-31 17:46:10 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-31 15:13:50 UTC</i>
|
||||
<i>Last updated 2019-08-31 17:46:10 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-31 15:13:50 UTC</i>
|
||||
<i>Last updated 2019-08-31 17:46:10 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-31 15:13:50 UTC</i>
|
||||
<i>Last updated 2019-08-31 17:46:10 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-31 15:13:50 UTC</i>
|
||||
<i>Last updated 2019-08-31 17:46:10 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-31 15:13:50 UTC</i>
|
||||
<i>Last updated 2019-08-31 17:46:10 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-31 15:13:50 UTC</i>
|
||||
<i>Last updated 2019-08-31 17:46:10 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-31 15:13:50 UTC</i>
|
||||
<i>Last updated 2019-08-31 17:46:10 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-31 15:13:50 UTC</i>
|
||||
<i>Last updated 2019-08-31 17:46:10 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-31 15:13:50 UTC</i>
|
||||
<i>Last updated 2019-08-31 17:46:10 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-31 15:13:50 UTC</i>
|
||||
<i>Last updated 2019-08-31 17:46:10 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-31 15:13:50 UTC</i>
|
||||
<i>Last updated 2019-08-31 17:46:10 UTC</i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -72,5 +72,6 @@ Gui.require_concept('button')
|
||||
Gui.require_concept('checkbox')
|
||||
Gui.require_concept('dropdown')
|
||||
Gui.require_concept('elem_button')
|
||||
Gui.require_concept('progress_bar')
|
||||
|
||||
return Gui
|
||||
@@ -12,7 +12,7 @@ local Gui = require 'expcore.gui.core'
|
||||
@tparam string elem_type the type of elem selection that this is, default is item selection
|
||||
@usage-- Making a basic elem button
|
||||
local basic_elem_button =
|
||||
Gui.clone_concept('elem_button',TEST 'basic_elembutton')
|
||||
Gui.clone_concept('elem_button','basic_elembutton')
|
||||
:on_selection_change(function(event)
|
||||
event.player.print('Basic elem button is now: '..event.element.elem_value)
|
||||
end)
|
||||
|
||||
@@ -8,6 +8,7 @@ local Gui = require 'expcore.gui.core'
|
||||
--[[-- The basic frame element
|
||||
@element frame
|
||||
@tparam ?string|Concepts.LocalisedString title the title that will show in the frame
|
||||
@tparam string direction the direction that children will be added
|
||||
@usage-- Making a basic frame, contains a label with hello world
|
||||
local basic_frame =
|
||||
Gui.clone_concept('dropdown','basic_frame')
|
||||
@@ -21,11 +22,13 @@ end)
|
||||
]]
|
||||
Gui.new_concept('frame')
|
||||
:new_property('title')
|
||||
:new_property('direction')
|
||||
:define_draw(function(properties,parent,element)
|
||||
element = parent.add{
|
||||
name = properties.name,
|
||||
type = 'frame',
|
||||
caption = properties.title
|
||||
caption = properties.title,
|
||||
direction = properties.direction
|
||||
}
|
||||
|
||||
return element
|
||||
|
||||
155
expcore/gui/concepts/progress_bar.lua
Normal file
155
expcore/gui/concepts/progress_bar.lua
Normal file
@@ -0,0 +1,155 @@
|
||||
--[[-- Core Module - Gui
|
||||
@module Gui
|
||||
@alias Gui
|
||||
]]
|
||||
|
||||
local Gui = require 'expcore.gui.core'
|
||||
|
||||
--[[-- The basic checkbox element
|
||||
@element progress_bar
|
||||
@param on_completion fired when increment reaches the maxium value set by set_maximum
|
||||
@tparam ?string|Concepts.LocalisedString tooltip the tooltip that will show for this element
|
||||
@tparam number maximum the maxium amount an instance can be increased, default 100
|
||||
@tparam boolean delay_completion when true the progress will be completed untill after the maximum rather than at the maximum
|
||||
@tparam boolean inverted although this will NOT effect how you use the functions it will make the element start full and reduce as you call increase, note issues with 0 detections
|
||||
@usage-- Making a basic progress bar, will increase when pressed then will reset when full
|
||||
local basic_progress_bar =
|
||||
Gui.clone_concept('progress_bar','basic_progress_bar')
|
||||
:set_tooltip('Basic progress bar')
|
||||
:set_maximum(5)
|
||||
:new_event('on_click',defines.events.on_gui_click)
|
||||
:on_click(function(event)
|
||||
event.concept:increment(event.element)
|
||||
end)
|
||||
:set_delay_completion(true)
|
||||
:on_completion(function(event)
|
||||
event.concept:reset(event.element)
|
||||
end)
|
||||
]]
|
||||
local progress_bar =
|
||||
Gui.new_concept('progress_bar')
|
||||
:new_event('on_completion')
|
||||
:new_property('tooltip')
|
||||
:new_property('maximum',100)
|
||||
:new_property('delay_completion',false)
|
||||
:new_property('inverted',false)
|
||||
:define_draw(function(properties,parent,element)
|
||||
element = parent.add{
|
||||
name = properties.name,
|
||||
tooltip = properties.tooltip,
|
||||
type = 'progressbar',
|
||||
value = properties.inverted and 1 or 0
|
||||
}
|
||||
|
||||
return element
|
||||
end)
|
||||
|
||||
--- Progress Bars.
|
||||
-- functions used with progress bars
|
||||
-- @section progress_bars
|
||||
|
||||
-- logic for changing the value of a progress bar
|
||||
local function raw_update(concept,element,amount)
|
||||
local old_value = element.value
|
||||
local new_value = old_value + amount
|
||||
element.value = new_value
|
||||
|
||||
local check_value = concept.properties.delay_completion and old_value or new_value
|
||||
if amount < 0 and check_value <= 0 or amount > 0 and check_value >= 1 then
|
||||
concept:raise_event('on_completion',{
|
||||
element = element
|
||||
})
|
||||
else
|
||||
return new_value
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
--[[-- Will increase the progress of a progress bar based on this concept, if the concept has an instance store then element acts as the category, if you have a combined store it will NOT update all instances
|
||||
@tparam ?LuaGuiElement|string element either the element that is changed or the category that is being changed (only if an instance store is defined)
|
||||
@tparam[opt=1] number amount the amount that will bar will increase, note that this amount must be less than the max
|
||||
@treturn ?number|nil the new value of the element, use this to sync a data store, if the return is nil then either a instance store was used or the new value may have changed
|
||||
@usage-- Incrementing progress bar with no instance store
|
||||
local new_value = progress_bar:increment(element)
|
||||
@usage-- Incrementing progress bar with an instance store
|
||||
progress_bar:increment(category)
|
||||
]]
|
||||
function progress_bar:increment(element,amount)
|
||||
local properties = self.properties
|
||||
local inverted = properties.inverted
|
||||
local maximum = properties.maximum
|
||||
amount = amount and amount/maximum or 1/maximum
|
||||
amount = inverted and -amount or amount
|
||||
|
||||
if self.instance_store and not self.sync_instance then
|
||||
self.update_instances(element,function(next_element)
|
||||
raw_update(self,next_element,amount)
|
||||
end)
|
||||
|
||||
else
|
||||
return raw_update(self,element,amount)
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
--[[-- Will decrease the progress of a progress bar based on this concept, if the concept has an instance store then element acts as the category, if you have a combined store it will NOT update all instances
|
||||
@tparam ?LuaGuiElement|string element either the element that is changed or the category that is being changed (only if an instance store is defined)
|
||||
@tparam[opt=1] number amount the amount that will bar will decrease, note that this amount must be less than the max
|
||||
@treturn number the new value of the element, use this to sync a data store, if the return is nil then either a instance store was used or the new value may have changed
|
||||
@usage-- Decrementing progress bar with no instance store
|
||||
local new_value = progress_bar:decrement(element)
|
||||
@usage-- Decrementing progress bar with an instance store
|
||||
progress_bar:decrement(category)
|
||||
]]
|
||||
function progress_bar:decrement(element,amount)
|
||||
self:increment(element,-amount)
|
||||
end
|
||||
|
||||
--[[-- Resets the progress back to 0% for this element, if the concept has an instance store then element acts as the category, if you have a combined store it will NOT update all instances
|
||||
@tparam ?LuaGuiElement|string element either the element that is changed or the category that is being changed (only if an instance store is defined)
|
||||
@treturn ?number|nil the new value of the element, use this to sync a data store, if the return is nil then either a instance store was used or the new value may have changed
|
||||
@usage-- Reseting a progress bar with no instance store
|
||||
local new_value = progress_bar:reset(element)
|
||||
@usage-- Reseting a progress bar with an instance store
|
||||
progress_bar:reset(category)
|
||||
]]
|
||||
function progress_bar:reset(element)
|
||||
local new_value = self.properties.inverted and 1 or 0
|
||||
if self.instacne_store and not self.sync_instance then
|
||||
self.update_instances(element,function(next_element)
|
||||
next_element.value = new_value
|
||||
end)
|
||||
|
||||
else
|
||||
element.value = new_value
|
||||
return new_value
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
--[[-- Increment any progress bar by the given percentage
|
||||
@tparam LuaGuiElement element the progress bar that you want to update
|
||||
@tparam[opt=0.01] number amount the percentage that you want to increment the progress bar by
|
||||
@treturn boolean true if the bar is now full
|
||||
@usage-- Increment any progress bar by 10%
|
||||
Gui.increment_progress_bar(element,0.1)
|
||||
]]
|
||||
function Gui.increment_progress_bar(element,amount)
|
||||
amount = amount or 0.01
|
||||
element.value = element.value + amount
|
||||
return element.value >= 1
|
||||
end
|
||||
|
||||
--[[-- Decrement any progress bar by the given percentage
|
||||
@tparam LuaGuiElement element the progress bar that you want to update
|
||||
@tparam[opt=0.01] number amount the percentage that you want to decrement the progress bar by
|
||||
@treturn boolean true if the bar is now empty
|
||||
@usage-- Decrement any progress bar by 10%
|
||||
Gui.decrement_progress_bar(element,0.1)
|
||||
]]
|
||||
function Gui.decrement_progress_bar(element,amount)
|
||||
amount = amount or 0.01
|
||||
element.value = element.value - amount
|
||||
return element.value <= 0
|
||||
end
|
||||
@@ -513,7 +513,7 @@ end)
|
||||
category = nil
|
||||
end
|
||||
|
||||
local instances = Store.get(self.instance_store,get_category(category))
|
||||
local instances = Store.get(self.instance_store,get_category(category)) or {}
|
||||
for key,instance in pairs(instances) do
|
||||
if not instance or not instance.valid then
|
||||
instances[key] = nil
|
||||
|
||||
@@ -353,4 +353,97 @@ tests['Elem Buttons'] = {
|
||||
['Basic Elem Button'] = basic_elem_button,
|
||||
['Defaut Selection Elem Button'] = default_selection_elem_button,
|
||||
['Player Stored Elem Button'] = player_elem_button
|
||||
}
|
||||
|
||||
--[[
|
||||
Progress Bars
|
||||
> Basic Progress Bar -- will increse when pressed, when full then it will reset
|
||||
> Inverted Progress Bar -- will increse when pressed, when empty then it will reset
|
||||
> Game Instance Progress Bar -- will take 5 seconds to fill, when full it will reset, note instances are required due to on_tick
|
||||
> Force Instance Progress Bar -- will increse when pressed, instance only means all instances will increse at same time but may not have the same value
|
||||
> Force Stored Progress Bar -- will increse when pressed, unlike above all will increse at same time and will have the same value
|
||||
]]
|
||||
|
||||
local basic_progress_bar =
|
||||
Gui.clone_concept('progress_bar',TEST 'basic_progress_bar')
|
||||
:set_tooltip('Basic progress bar')
|
||||
:set_maximum(5)
|
||||
:new_event('on_click',defines.events.on_gui_click)
|
||||
:on_click(function(event)
|
||||
event.concept:increment(event.element)
|
||||
end)
|
||||
:set_delay_completion(true)
|
||||
:on_completion(function(event)
|
||||
event.concept:reset(event.element)
|
||||
end)
|
||||
|
||||
local inverted_progress_bar =
|
||||
Gui.clone_concept('progress_bar',TEST 'inverted_progress_bar')
|
||||
:set_tooltip('Inverted progress bar')
|
||||
:set_inverted(true)
|
||||
:set_maximum(5)
|
||||
:new_event('on_click',defines.events.on_gui_click)
|
||||
:on_click(function(event)
|
||||
event.concept:increment(event.element)
|
||||
end)
|
||||
:on_completion(function(event)
|
||||
event.concept:reset(event.element)
|
||||
end)
|
||||
|
||||
local game_progress_bar =
|
||||
Gui.clone_concept('progress_bar',TEST 'game_progress_bar')
|
||||
:set_tooltip('Game progress bar')
|
||||
:set_maximum(300)
|
||||
:new_event('on_tick',defines.events.on_tick)
|
||||
:on_tick(function(event)
|
||||
event.concept:increment(event.element)
|
||||
end)
|
||||
:set_delay_completion(true)
|
||||
:on_completion(function(event)
|
||||
event.concept:reset(event.element)
|
||||
end)
|
||||
:define_instance_store()
|
||||
|
||||
local force_instance_progress_bar =
|
||||
Gui.clone_concept('progress_bar',TEST 'force_instance_progress_bar')
|
||||
:set_tooltip('Force instance progress bar')
|
||||
:set_maximum(5)
|
||||
:new_event('on_click',defines.events.on_gui_click)
|
||||
:on_click(function(event)
|
||||
event.concept:increment(event.element)
|
||||
end)
|
||||
:set_delay_completion(true)
|
||||
:on_completion(function(event)
|
||||
event.concept:reset(event.element)
|
||||
end)
|
||||
:define_instance_store(Gui.categorize_by_force)
|
||||
|
||||
local force_stored_progress_bar =
|
||||
Gui.clone_concept('progress_bar',TEST 'force_stored_progress_bar')
|
||||
:set_tooltip('Force stored progress bar')
|
||||
:set_maximum(5)
|
||||
:new_event('on_click',defines.events.on_gui_click)
|
||||
:on_click(function(event)
|
||||
local element = event.element
|
||||
local concept = event.concept
|
||||
local new_value = concept:increment(element)
|
||||
if new_value then concept.set_data(element,new_value) end
|
||||
end)
|
||||
:set_delay_completion(true)
|
||||
:on_completion(function(event)
|
||||
local element = event.element
|
||||
local concept = event.concept
|
||||
local new_value = concept:reset(element)
|
||||
concept.set_data(element,new_value)
|
||||
end)
|
||||
:define_combined_store(Gui.categorize_by_force,function(element,value)
|
||||
element.value = value or 0
|
||||
end)
|
||||
|
||||
tests['Progress Bars'] = {
|
||||
['Basic Progress Bar'] = basic_progress_bar,
|
||||
['Inverted Progress Bar'] = inverted_progress_bar,
|
||||
['Game Instance Progress Bar'] = game_progress_bar,
|
||||
['Force Instance Progress Bar'] = force_instance_progress_bar,
|
||||
['Force Stored Progress Bar'] = force_stored_progress_bar
|
||||
}
|
||||
@@ -174,7 +174,7 @@ function Store.update(location,key,update_callback,...)
|
||||
local rtn
|
||||
if update_callback and type(update_callback) == 'function' then
|
||||
if args then
|
||||
rtn = udpate_callback(value,key,unpack(args))
|
||||
rtn = update_callback(value,key,unpack(args))
|
||||
else
|
||||
rtn = update_callback(value,key,...)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user