* Added more trigger groups * Initial version of slayn scripts * Allow CI to run this time to verify if folder structure works
This commit is contained in:
2
LICENSE
2
LICENSE
@@ -199,3 +199,5 @@
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
|
||||
|
||||
77
README.md
77
README.md
@@ -1,74 +1,9 @@
|
||||
# New Readme
|
||||
|
||||
This is a custom fork of the lotj-mudlet-ui that includes some patches, additions to fix mapping when moving between visible and non visible rooms, and a virtual ship map feature that will allow you to map a ship once and use that map across all ships with that model.
|
||||
This is a custom fork of the lotj-mudlet-ui that includes some additional features as listed below.
|
||||
|
||||
# lotj-mudlet-ui
|
||||
|
||||
This is an attempt to provide a richer UI for [Legends of the Jedi MUD](https://www.legendsofthejedi.com/) in Mudlet.
|
||||
|
||||

|
||||
|
||||
|
||||
## Features
|
||||
|
||||
### Ground Map
|
||||
|
||||
This package includes a script hooking into Mudlet's mapper so you can map by (mostly) just walking around an unexplored area.
|
||||
|
||||
It works fairly well on all existing planets. It's based on room vnums, which means it will consider each ship to be fully unique rooms.
|
||||
|
||||
### Local System Map
|
||||
|
||||

|
||||
|
||||
When flying in a system, triggers capture radar output and draw a visual representation of the radar, including zooming in/out and updating proximity of each other entity as your position changes.
|
||||
|
||||
### Galaxy Map
|
||||
|
||||

|
||||
|
||||
After initializing it by running various in-game commands, this map will show all publicly listed starsystems, including coloring each government's planets differently. It will also attempt to highlight your current system when known, although that only works while in space.
|
||||
|
||||
### Chat windows
|
||||
|
||||
Certain types of chat content are scraped from the main console and copied into tabbed chat windows for easier history browsing.
|
||||
|
||||
### Live-updating Status Bar
|
||||
|
||||

|
||||
|
||||
Right above your input box, you'll see a bunch of useful information which updates live. This includes:
|
||||
|
||||
- Your HP/Move/(Mana?)
|
||||
- Opponent's name and percentage
|
||||
- Current comlink channel and encryption code
|
||||
- Ship speed, coordinates, hull, shield, energy
|
||||
- Piloting and chaff indicators, and a countdown to the next space tick
|
||||
|
||||
|
||||
## Installing
|
||||
|
||||
After creating a Mudlet profile to connect to LOTJ, do the following to add the package:
|
||||
|
||||
1. Download a release of this package (the `.mpackage` file) from the [releases page](https://github.com/LotJ/lotj-mudlet-ui/releases)
|
||||
1. Open the **Package Manager**
|
||||
1. If present, uninstall the **generic-mapper** package. It conflicts with the one provided here.
|
||||
1. Select the `lotj-ui-<version>.mpackage` file you downloaded before for installation
|
||||
1. Restart Mudlet and reconnect. The UI should populate fully once you log into a character.
|
||||
|
||||
|
||||
## Contributing
|
||||
|
||||
The source for this package is structured to use [muddler](https://github.com/demonnic/muddler) to package it into a Mudlet package. Using version 0.1 is necessary at this time due to some errant behavior by later Muddler versions.
|
||||
|
||||
You can, of course, just modify the triggers/aliases/scripts directly within Mudlet if you want to test local changes, but they'll be overwritten if you want to update to future versions of this package.
|
||||
|
||||
To change the source for this package, modify the JSON files and associated Lua scripts inside the `src` directory, then run `muddler` to regenerate the package. The resulting `.mpackage` file will be inside the `build` directory.
|
||||
|
||||
If you have Docker set up, it can be easiest to run a command like this to regenerate the package, from the root of the repository:
|
||||
|
||||
```
|
||||
docker run --rm -it -u $(id -u):$(id -g) -v $PWD:/$PWD -w /$PWD demonnic/muddler:0.1
|
||||
```
|
||||
|
||||
If that's a pain, just make a pull request and someone else can generate the package with your changes to make sure they work.
|
||||
* Virtual Ship Maps
|
||||
* Integrated Autostudy
|
||||
* TLC Automator
|
||||
* Engineering Suite
|
||||
* Skill Training Suite
|
||||
@@ -1,6 +1,6 @@
|
||||
local TableMaker = require("lotj-ui.MDK.ftext").TableMaker
|
||||
|
||||
if not studyList then
|
||||
if not studyList or #studyList == 0 then
|
||||
cecho("<dodger_blue>Studylist Empty.")
|
||||
else
|
||||
studyTable = TableMaker:new({
|
||||
@@ -14,12 +14,12 @@ else
|
||||
studyTable:addColumn({
|
||||
name = "Index",
|
||||
width = "5",
|
||||
textColor = "<orange>"
|
||||
textColor = "<mint_cream>"
|
||||
})
|
||||
studyTable:addColumn({
|
||||
name = "Study Item",
|
||||
width = "25",
|
||||
textColor = "<>"green
|
||||
textColor = "<medium_slate_blue>"
|
||||
})
|
||||
|
||||
for index, value in ipairs(studyList) do
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
if studyList and studyIndex then
|
||||
if #studyList > 0 and studyIndex then
|
||||
send("study " .. studyList[studyIndex])
|
||||
else
|
||||
send("<dodger_blue>You need to add items to your study list first. See studyhelp for commands.")
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,402 +0,0 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
||||
<head>
|
||||
<title>Reference</title>
|
||||
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div id="container">
|
||||
|
||||
<div id="product">
|
||||
<div id="product_logo"></div>
|
||||
<div id="product_name"><big><b></b></big></div>
|
||||
<div id="product_description"></div>
|
||||
</div> <!-- id="product" -->
|
||||
|
||||
|
||||
<div id="main">
|
||||
|
||||
|
||||
<!-- Menu -->
|
||||
|
||||
<div id="navigation">
|
||||
<br/>
|
||||
<h1>MDK</h1>
|
||||
|
||||
|
||||
<ul>
|
||||
<li><a href="../index.html">Index</a></li>
|
||||
</ul>
|
||||
|
||||
<h2>Contents</h2>
|
||||
<ul>
|
||||
<li><a href="#Methods">Methods</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h2>Classes</h2>
|
||||
<ul class="nowrap">
|
||||
<li><a href="../classes/aliasmgr.html">aliasmgr</a></li>
|
||||
<li><strong>Chyron</strong></li>
|
||||
<li><a href="../classes/EMCO.html">EMCO</a></li>
|
||||
<li><a href="../classes/LoggingConsole.html">LoggingConsole</a></li>
|
||||
<li><a href="../classes/Loginator.html">Loginator</a></li>
|
||||
<li><a href="../classes/MasterMindSolver.html">MasterMindSolver</a></li>
|
||||
<li><a href="../classes/revisionator.html">revisionator</a></li>
|
||||
<li><a href="../classes/SortBox.html">SortBox</a></li>
|
||||
<li><a href="../classes/spinbox.html">spinbox</a></li>
|
||||
<li><a href="../classes/SUG.html">SUG</a></li>
|
||||
<li><a href="../classes/TextGauge.html">TextGauge</a></li>
|
||||
<li><a href="../classes/TimerGauge.html">TimerGauge</a></li>
|
||||
</ul>
|
||||
<h2>Modules</h2>
|
||||
<ul class="nowrap">
|
||||
<li><a href="../modules/demontools.html">demontools</a></li>
|
||||
<li><a href="../modules/echofile.html">echofile</a></li>
|
||||
<li><a href="../modules/figlet.html">figlet</a></li>
|
||||
<li><a href="../modules/ftext.html">ftext</a></li>
|
||||
<li><a href="../modules/GradientMaker.html">GradientMaker</a></li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
|
||||
<h1>Class <code>Chyron</code></h1>
|
||||
<p>Creates a label with a scrolling text element.</p>
|
||||
<p> It is highly recommended you use a monospace font for this label.</p>
|
||||
<h3>Info:</h3>
|
||||
<ul>
|
||||
<li><strong>Copyright</strong>: 2019,2020</li>
|
||||
<li><strong>Author</strong>: Delra,Damian Monogue</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h2><a href="#Methods">Methods</a></h2>
|
||||
<table class="function_list">
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#chyron:new">chyron:new(cons, container)</a></td>
|
||||
<td class="summary">Creates a new Chyron label</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#chyron:setDisplayWidth">chyron:setDisplayWidth(displayWidth)</a></td>
|
||||
<td class="summary">Sets the numver of characters of the text to display at once</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#chyron:reset">chyron:reset()</a></td>
|
||||
<td class="summary">Sets the Chyron from the first position, without changing enabled status</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#chyron:pause">chyron:pause()</a></td>
|
||||
<td class="summary">Stops the Chyron with its current display</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#chyron:start">chyron:start()</a></td>
|
||||
<td class="summary">Start the Chyron back up from wherever it currently is</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#chyron:setUpdateTime">chyron:setUpdateTime(updateTime)</a></td>
|
||||
<td class="summary">Change the update time for the Chyron</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#chyron:enableAutoWidth">chyron:enableAutoWidth()</a></td>
|
||||
<td class="summary">Enable autoWidth adjustment</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#chyron:disableAutoWidth">chyron:disableAutoWidth()</a></td>
|
||||
<td class="summary">Disable autoWidth adjustment</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#chyron:stop">chyron:stop()</a></td>
|
||||
<td class="summary">Stop the Chyron, and reset it to the original position</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#chyron:setMessage">chyron:setMessage(message)</a></td>
|
||||
<td class="summary">Change the text being scrolled on the Chyron</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#chyron:setDelimiter">chyron:setDelimiter(delimiter)</a></td>
|
||||
<td class="summary">Change the delimiter used to show the beginning and end of the message</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br/>
|
||||
<br/>
|
||||
|
||||
|
||||
<h2 class="section-header "><a name="Methods"></a>Methods</h2>
|
||||
|
||||
<dl class="function">
|
||||
<dt>
|
||||
<a name = "chyron:new"></a>
|
||||
<strong>chyron:new(cons, container)</strong>
|
||||
<a style="float:right;" href="../source/Chyron.lua.html#80">line 80</a>
|
||||
</dt>
|
||||
<dd>
|
||||
Creates a new Chyron label
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">cons</span>
|
||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.5">table</a></span>
|
||||
table of constraints which configures the EMCO.
|
||||
<table class="tg">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>option name</th>
|
||||
<th>description</th>
|
||||
<th>default</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="tg-1">text</td>
|
||||
<td class="tg-1">The text to scroll on the label</td>
|
||||
<td class="tg-1">""</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tg-2">updateTime</td>
|
||||
<td class="tg-2">Milliseconds between movements (one letter shift)</td>
|
||||
<td class="tg-2">200</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tg-1">displayWidth</td>
|
||||
<td class="tg-1">How many chars wide to display the text</td>
|
||||
<td class="tg-1">28</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tg-2">delimiter</td>
|
||||
<td class="tg-2">This character will be inserted with a space either side to mark the stop/start of the message</td>
|
||||
<td class="tg-2">"|"</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tg-1">enabled</td>
|
||||
<td class="tg-1">Should the chyron scroll?</td>
|
||||
<td class="tg-1">true</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tg-2">font</td>
|
||||
<td class="tg-2">What font to use for the Chyron? Available in Geyser.Label but we define a default.</td>
|
||||
<td class="tg-2">"Bitstream Vera Sans Mono"</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tg-1">fontSize</td>
|
||||
<td class="tg-1">What font size to use for the Chyron? Available in Geyser.Label but we define a default.</td>
|
||||
<td class="tg-1">9</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tg-2">autoWidth</td>
|
||||
<td class="tg-2">Should the Chyron resize to just fit the text?</td>
|
||||
<td class="tg-2">true</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tg-1">alignment</td>
|
||||
<td class="tg-1">What alignment(left/right/center) to use for the Chyron text? Available in Geyser.Label but we define a default.</td>
|
||||
<td class="tg-1">"center"</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</li>
|
||||
<li><span class="parameter">container</span>
|
||||
<span class="types"><span class="type">GeyserObject</span></span>
|
||||
The container to use as the parent for the Chyron
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "chyron:setDisplayWidth"></a>
|
||||
<strong>chyron:setDisplayWidth(displayWidth)</strong>
|
||||
<a style="float:right;" href="../source/Chyron.lua.html#99">line 99</a>
|
||||
</dt>
|
||||
<dd>
|
||||
Sets the numver of characters of the text to display at once
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">displayWidth</span>
|
||||
<span class="types"><span class="type">number</span></span>
|
||||
number of characters to show at once
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "chyron:reset"></a>
|
||||
<strong>chyron:reset()</strong>
|
||||
<a style="float:right;" href="../source/Chyron.lua.html#151">line 151</a>
|
||||
</dt>
|
||||
<dd>
|
||||
Sets the Chyron from the first position, without changing enabled status
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "chyron:pause"></a>
|
||||
<strong>chyron:pause()</strong>
|
||||
<a style="float:right;" href="../source/Chyron.lua.html#159">line 159</a>
|
||||
</dt>
|
||||
<dd>
|
||||
Stops the Chyron with its current display
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "chyron:start"></a>
|
||||
<strong>chyron:start()</strong>
|
||||
<a style="float:right;" href="../source/Chyron.lua.html#167">line 167</a>
|
||||
</dt>
|
||||
<dd>
|
||||
Start the Chyron back up from wherever it currently is
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "chyron:setUpdateTime"></a>
|
||||
<strong>chyron:setUpdateTime(updateTime)</strong>
|
||||
<a style="float:right;" href="../source/Chyron.lua.html#179">line 179</a>
|
||||
</dt>
|
||||
<dd>
|
||||
Change the update time for the Chyron
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">updateTime</span>
|
||||
number new updateTime in milliseconds
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "chyron:enableAutoWidth"></a>
|
||||
<strong>chyron:enableAutoWidth()</strong>
|
||||
<a style="float:right;" href="../source/Chyron.lua.html#190">line 190</a>
|
||||
</dt>
|
||||
<dd>
|
||||
Enable autoWidth adjustment
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "chyron:disableAutoWidth"></a>
|
||||
<strong>chyron:disableAutoWidth()</strong>
|
||||
<a style="float:right;" href="../source/Chyron.lua.html#196">line 196</a>
|
||||
</dt>
|
||||
<dd>
|
||||
Disable autoWidth adjustment
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "chyron:stop"></a>
|
||||
<strong>chyron:stop()</strong>
|
||||
<a style="float:right;" href="../source/Chyron.lua.html#201">line 201</a>
|
||||
</dt>
|
||||
<dd>
|
||||
Stop the Chyron, and reset it to the original position
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "chyron:setMessage"></a>
|
||||
<strong>chyron:setMessage(message)</strong>
|
||||
<a style="float:right;" href="../source/Chyron.lua.html#212">line 212</a>
|
||||
</dt>
|
||||
<dd>
|
||||
Change the text being scrolled on the Chyron
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">message</span>
|
||||
string message the text you want to have scroll on the Chyron
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "chyron:setDelimiter"></a>
|
||||
<strong>chyron:setDelimiter(delimiter)</strong>
|
||||
<a style="float:right;" href="../source/Chyron.lua.html#228">line 228</a>
|
||||
</dt>
|
||||
<dd>
|
||||
Change the delimiter used to show the beginning and end of the message
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">delimiter</span>
|
||||
string the new delimiter to use. I recommend using one character.
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
|
||||
</div> <!-- id="content" -->
|
||||
</div> <!-- id="main" -->
|
||||
<div id="about">
|
||||
<i>generated by <a href="http://github.com/lunarmodules/LDoc">LDoc 1.5.0</a></i>
|
||||
<i style="float:right;">Last updated 2023-05-29 18:41:27 </i>
|
||||
</div> <!-- id="about" -->
|
||||
</div> <!-- id="container" -->
|
||||
</body>
|
||||
</html>
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,813 +0,0 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
||||
<head>
|
||||
<title>Reference</title>
|
||||
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div id="container">
|
||||
|
||||
<div id="product">
|
||||
<div id="product_logo"></div>
|
||||
<div id="product_name"><big><b></b></big></div>
|
||||
<div id="product_description"></div>
|
||||
</div> <!-- id="product" -->
|
||||
|
||||
|
||||
<div id="main">
|
||||
|
||||
|
||||
<!-- Menu -->
|
||||
|
||||
<div id="navigation">
|
||||
<br/>
|
||||
<h1>MDK</h1>
|
||||
|
||||
|
||||
<ul>
|
||||
<li><a href="../index.html">Index</a></li>
|
||||
</ul>
|
||||
|
||||
<h2>Contents</h2>
|
||||
<ul>
|
||||
<li><a href="#Methods">Methods</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h2>Classes</h2>
|
||||
<ul class="nowrap">
|
||||
<li><a href="../classes/aliasmgr.html">aliasmgr</a></li>
|
||||
<li><a href="../classes/Chyron.html">Chyron</a></li>
|
||||
<li><a href="../classes/EMCO.html">EMCO</a></li>
|
||||
<li><strong>LoggingConsole</strong></li>
|
||||
<li><a href="../classes/Loginator.html">Loginator</a></li>
|
||||
<li><a href="../classes/MasterMindSolver.html">MasterMindSolver</a></li>
|
||||
<li><a href="../classes/revisionator.html">revisionator</a></li>
|
||||
<li><a href="../classes/SortBox.html">SortBox</a></li>
|
||||
<li><a href="../classes/spinbox.html">spinbox</a></li>
|
||||
<li><a href="../classes/SUG.html">SUG</a></li>
|
||||
<li><a href="../classes/TextGauge.html">TextGauge</a></li>
|
||||
<li><a href="../classes/TimerGauge.html">TimerGauge</a></li>
|
||||
</ul>
|
||||
<h2>Modules</h2>
|
||||
<ul class="nowrap">
|
||||
<li><a href="../modules/demontools.html">demontools</a></li>
|
||||
<li><a href="../modules/echofile.html">echofile</a></li>
|
||||
<li><a href="../modules/figlet.html">figlet</a></li>
|
||||
<li><a href="../modules/ftext.html">ftext</a></li>
|
||||
<li><a href="../modules/GradientMaker.html">GradientMaker</a></li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
|
||||
<h1>Class <code>LoggingConsole</code></h1>
|
||||
<p>MiniConsole with logging capabilities</p>
|
||||
<p></p>
|
||||
<h3>Info:</h3>
|
||||
<ul>
|
||||
<li><strong>Copyright</strong>: 2020 Damian Monogue</li>
|
||||
<li><strong>License</strong>: MIT, see LICENSE.lua</li>
|
||||
<li><strong>Author</strong>: Damian Monogue <demonnic@gmail.com></li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h2><a href="#Methods">Methods</a></h2>
|
||||
<table class="function_list">
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#loggingconsole:new">loggingconsole:new(cons, container)</a></td>
|
||||
<td class="summary">Creates and returns a new LoggingConsole.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#loggingconsole:getExtension">loggingconsole:getExtension()</a></td>
|
||||
<td class="summary">Returns the file extension of the logfile this console will log to</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#loggingconsole:getPath">loggingconsole:getPath()</a></td>
|
||||
<td class="summary">Returns the path to the logfile for this console</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#loggingconsole:setPath">loggingconsole:setPath(path)</a></td>
|
||||
<td class="summary">Sets the path to use for the log file.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#loggingconsole:getFileName">loggingconsole:getFileName()</a></td>
|
||||
<td class="summary">Returns the filename for the logfile for this console</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#loggingconsole:setFileName">loggingconsole:setFileName(fileName)</a></td>
|
||||
<td class="summary">Sets the fileName to use for the log file.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#loggingconsole:getFullFilename">loggingconsole:getFullFilename()</a></td>
|
||||
<td class="summary">Returns the pull path and filename for the logfile for this console</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#loggingconsole:enableLogging">loggingconsole:enableLogging()</a></td>
|
||||
<td class="summary">Turns logging for this console on</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#loggingconsole:disableLogging">loggingconsole:disableLogging()</a></td>
|
||||
<td class="summary">Turns logging for this console off</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#loggingconsole:cechoLink">loggingconsole:cechoLink(text, command, hint, log)</a></td>
|
||||
<td class="summary">cechoLink for LoggingConsole</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#loggingconsole:dechoLink">loggingconsole:dechoLink(text, command, hint, log)</a></td>
|
||||
<td class="summary">dechoLink for LoggingConsole</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#loggingconsole:hechoLink">loggingconsole:hechoLink(text, command, hint, log)</a></td>
|
||||
<td class="summary">hechoLink for LoggingConsole</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#loggingconsole:echoLink">loggingconsole:echoLink(text, command, hint, useCurrentFormat, log)</a></td>
|
||||
<td class="summary">echoLink for LoggingConsole</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#loggingconsole:cechoPopup">loggingconsole:cechoPopup(text, commands, hints, log)</a></td>
|
||||
<td class="summary">cechoPopup for LoggingConsole</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#loggingconsole:dechoPopup">loggingconsole:dechoPopup(text, commands, hints, log)</a></td>
|
||||
<td class="summary">dechoPopup for LoggingConsole</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#loggingconsole:hechoPopup">loggingconsole:hechoPopup(text, commands, hints, log)</a></td>
|
||||
<td class="summary">hechoPopup for LoggingConsole</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#loggingconsole:echoPopup">loggingconsole:echoPopup(text, commands, hints, useCurrentFormat, log)</a></td>
|
||||
<td class="summary">echoPopup for LoggingConsole</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#loggingconsole:appendBuffer">loggingconsole:appendBuffer(log)</a></td>
|
||||
<td class="summary">Append copy()ed text to the console</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#loggingconsole:append">loggingconsole:append(log)</a></td>
|
||||
<td class="summary">Append copy()ed text to the console</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#loggingconsole:echo">loggingconsole:echo(str, log)</a></td>
|
||||
<td class="summary">echo's a string to the console.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#loggingconsole:hecho">loggingconsole:hecho(str, log)</a></td>
|
||||
<td class="summary">hecho's a string to the console.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#loggingconsole:decho">loggingconsole:decho(str, log)</a></td>
|
||||
<td class="summary">decho's a string to the console.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#loggingconsole:cecho">loggingconsole:cecho(str, log)</a></td>
|
||||
<td class="summary">cecho's a string to the console.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#loggingconsole:replay">loggingconsole:replay(numberOfLines)</a></td>
|
||||
<td class="summary">Replays the last X lines from the console's log file, if it exists</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br/>
|
||||
<br/>
|
||||
|
||||
|
||||
<h2 class="section-header "><a name="Methods"></a>Methods</h2>
|
||||
|
||||
<dl class="function">
|
||||
<dt>
|
||||
<a name = "loggingconsole:new"></a>
|
||||
<strong>loggingconsole:new(cons, container)</strong>
|
||||
<a style="float:right;" href="../source/LoggingConsole.lua.html#56">line 56</a>
|
||||
</dt>
|
||||
<dd>
|
||||
Creates and returns a new LoggingConsole.
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">cons</span>
|
||||
table of constraints. Includes all the valid Geyser.MiniConsole constraints, plus
|
||||
<table class="tg">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>option name</th>
|
||||
<th>description</th>
|
||||
<th>default</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="tg-1">log</td>
|
||||
<td class="tg-1">Should the miniconsole be logging?</td>
|
||||
<td class="tg-1">true</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tg-2">logFormat</td>
|
||||
<td class="tg-2">"h" for html, "t" for plaintext, "l" for log (with ansi)</td>
|
||||
<td class="tg-2">h</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tg-1">path</td>
|
||||
<td class="tg-1">The path the file lives in. It is templated.<br>|h is replaced by the profile homedir.<br>|y by 4 digit year.<br>|m by 2 digit month<br>|d by 2 digit day<br>|n by the name constraint<br>|e by the file extension (html for h logType, log for others)</td>
|
||||
<td class="tg-1">"|h/log/consoleLogs/|y/|m/|d/"</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tg-2">fileName</td>
|
||||
<td class="tg-2">The name of the log file. It is templated, same as path above</td>
|
||||
<td class="tg-2">"|n.|e"</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</li>
|
||||
<li><span class="parameter">container</span>
|
||||
the container for the console
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Usage:</h3>
|
||||
<ul>
|
||||
<pre class="example"><span class="keyword">local</span> LoggingConsole = <span class="global">require</span>(<span class="string">"MDK.loggingconsole"</span>)
|
||||
myLoggingConsole = LoggingConsole:<span class="function-name">new</span>({
|
||||
name = <span class="string">"my logging console"</span>,
|
||||
x = <span class="number">0</span>,
|
||||
y = <span class="number">0</span>,
|
||||
height = <span class="number">200</span>,
|
||||
width = <span class="number">400</span>,
|
||||
}) <span class="comment">-- just like making a miniconsole, really</span></pre>
|
||||
</ul>
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "loggingconsole:getExtension"></a>
|
||||
<strong>loggingconsole:getExtension()</strong>
|
||||
<a style="float:right;" href="../source/LoggingConsole.lua.html#67">line 67</a>
|
||||
</dt>
|
||||
<dd>
|
||||
Returns the file extension of the logfile this console will log to
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "loggingconsole:getPath"></a>
|
||||
<strong>loggingconsole:getPath()</strong>
|
||||
<a style="float:right;" href="../source/LoggingConsole.lua.html#95">line 95</a>
|
||||
</dt>
|
||||
<dd>
|
||||
Returns the path to the logfile for this console
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "loggingconsole:setPath"></a>
|
||||
<strong>loggingconsole:setPath(path)</strong>
|
||||
<a style="float:right;" href="../source/LoggingConsole.lua.html#105">line 105</a>
|
||||
</dt>
|
||||
<dd>
|
||||
Sets the path to use for the log file.
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">path</span>
|
||||
the path to put the log file in. It is templated.<br>|h is replaced by the profile homedir.<br>|y by 4 digit year.<br>|m by 2 digit month<br>|d by 2 digit day<br>|n by the name constraint<br>|e by the file extension (html for h logType, log for others)
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "loggingconsole:getFileName"></a>
|
||||
<strong>loggingconsole:getFileName()</strong>
|
||||
<a style="float:right;" href="../source/LoggingConsole.lua.html#110">line 110</a>
|
||||
</dt>
|
||||
<dd>
|
||||
Returns the filename for the logfile for this console
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "loggingconsole:setFileName"></a>
|
||||
<strong>loggingconsole:setFileName(fileName)</strong>
|
||||
<a style="float:right;" href="../source/LoggingConsole.lua.html#118">line 118</a>
|
||||
</dt>
|
||||
<dd>
|
||||
Sets the fileName to use for the log file.
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">fileName</span>
|
||||
the fileName to use for the logfile. It is templated.<br>|h is replaced by the profile homedir.<br>|y by 4 digit year.<br>|m by 2 digit month<br>|d by 2 digit day<br>|n by the name constraint<br>|e by the file extension (html for h logType, log for others)
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "loggingconsole:getFullFilename"></a>
|
||||
<strong>loggingconsole:getFullFilename()</strong>
|
||||
<a style="float:right;" href="../source/LoggingConsole.lua.html#123">line 123</a>
|
||||
</dt>
|
||||
<dd>
|
||||
Returns the pull path and filename for the logfile for this console
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "loggingconsole:enableLogging"></a>
|
||||
<strong>loggingconsole:enableLogging()</strong>
|
||||
<a style="float:right;" href="../source/LoggingConsole.lua.html#132">line 132</a>
|
||||
</dt>
|
||||
<dd>
|
||||
Turns logging for this console on
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "loggingconsole:disableLogging"></a>
|
||||
<strong>loggingconsole:disableLogging()</strong>
|
||||
<a style="float:right;" href="../source/LoggingConsole.lua.html#137">line 137</a>
|
||||
</dt>
|
||||
<dd>
|
||||
Turns logging for this console off
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "loggingconsole:cechoLink"></a>
|
||||
<strong>loggingconsole:cechoLink(text, command, hint, log)</strong>
|
||||
<a style="float:right;" href="../source/LoggingConsole.lua.html#309">line 309</a>
|
||||
</dt>
|
||||
<dd>
|
||||
cechoLink for LoggingConsole
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">text</span>
|
||||
the text to use for the link
|
||||
</li>
|
||||
<li><span class="parameter">command</span>
|
||||
the command to send when the link is clicked, as text. IE [[send("sleep")]]
|
||||
</li>
|
||||
<li><span class="parameter">hint</span>
|
||||
A tooltip which is displayed when the mouse is over the link
|
||||
</li>
|
||||
<li><span class="parameter">log</span>
|
||||
Should we log this line? Defaults to self.log if not passed.
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "loggingconsole:dechoLink"></a>
|
||||
<strong>loggingconsole:dechoLink(text, command, hint, log)</strong>
|
||||
<a style="float:right;" href="../source/LoggingConsole.lua.html#318">line 318</a>
|
||||
</dt>
|
||||
<dd>
|
||||
dechoLink for LoggingConsole
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">text</span>
|
||||
the text to use for the link
|
||||
</li>
|
||||
<li><span class="parameter">command</span>
|
||||
the command to send when the link is clicked, as text. IE [[send("sleep")]]
|
||||
</li>
|
||||
<li><span class="parameter">hint</span>
|
||||
A tooltip which is displayed when the mouse is over the link
|
||||
</li>
|
||||
<li><span class="parameter">log</span>
|
||||
Should we log this line? Defaults to self.log if not passed.
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "loggingconsole:hechoLink"></a>
|
||||
<strong>loggingconsole:hechoLink(text, command, hint, log)</strong>
|
||||
<a style="float:right;" href="../source/LoggingConsole.lua.html#327">line 327</a>
|
||||
</dt>
|
||||
<dd>
|
||||
hechoLink for LoggingConsole
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">text</span>
|
||||
the text to use for the link
|
||||
</li>
|
||||
<li><span class="parameter">command</span>
|
||||
the command to send when the link is clicked, as text. IE [[send("sleep")]]
|
||||
</li>
|
||||
<li><span class="parameter">hint</span>
|
||||
A tooltip which is displayed when the mouse is over the link
|
||||
</li>
|
||||
<li><span class="parameter">log</span>
|
||||
Should we log this line? Defaults to self.log if not passed.
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "loggingconsole:echoLink"></a>
|
||||
<strong>loggingconsole:echoLink(text, command, hint, useCurrentFormat, log)</strong>
|
||||
<a style="float:right;" href="../source/LoggingConsole.lua.html#340">line 340</a>
|
||||
</dt>
|
||||
<dd>
|
||||
echoLink for LoggingConsole
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">text</span>
|
||||
the text to use for the link
|
||||
</li>
|
||||
<li><span class="parameter">command</span>
|
||||
the command to send when the link is clicked, as text. IE [[send("sleep")]]
|
||||
</li>
|
||||
<li><span class="parameter">hint</span>
|
||||
A tooltip which is displayed when the mouse is over the link
|
||||
</li>
|
||||
<li><span class="parameter">useCurrentFormat</span>
|
||||
If set to true, will look like the text around it. If false it will be blue and underline.
|
||||
</li>
|
||||
<li><span class="parameter">log</span>
|
||||
Should we log this line? Defaults to self.log if not passed. If you want to pass this you must pass in useCurrentFormat
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Usage:</h3>
|
||||
<ul>
|
||||
<li><pre class="example">myLoggingConsole:<span class="function-name">echoLink</span>(<span class="string">"This is a link!"</span>, <span class="string">[[send("sleep")]]</span>, <span class="string">"sleep"</span>) <span class="comment">-- text "This is a link" will send("sleep") when clicked and be blue w/ underline. Defaut log behaviour (self.log)</span></pre></li>
|
||||
<li><pre class="example">myLoggingConsole:<span class="function-name">echoLink</span>(<span class="string">"This is a link!"</span>, <span class="string">[[send("sleep")]]</span>, <span class="string">"sleep"</span>, <span class="keyword">false</span>, <span class="keyword">false</span>) <span class="comment">-- same as above, but forces it not to log regardless of self.log setting</span></pre></li>
|
||||
<li><pre class="example">myLoggingConsole:<span class="function-name">echoLink</span>(<span class="string">"This is a link!"</span>, <span class="string">[[send("sleep")]]</span>, <span class="string">"sleep"</span>, <span class="keyword">true</span>, <span class="keyword">true</span>) <span class="comment">-- same as above, but forces it to log regardless of self.log setting and the text will look like anything else echoed to the console.</span></pre></li>
|
||||
</ul>
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "loggingconsole:cechoPopup"></a>
|
||||
<strong>loggingconsole:cechoPopup(text, commands, hints, log)</strong>
|
||||
<a style="float:right;" href="../source/LoggingConsole.lua.html#349">line 349</a>
|
||||
</dt>
|
||||
<dd>
|
||||
cechoPopup for LoggingConsole
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">text</span>
|
||||
the text to use for the link
|
||||
</li>
|
||||
<li><span class="parameter">commands</span>
|
||||
the commands to send when the popup is activated, as table. IE {[[send("sleep")]], [[send("stand")]]}
|
||||
</li>
|
||||
<li><span class="parameter">hints</span>
|
||||
A tooltip which is displayed when the mouse is over the link. IE {{"sleep", "stand"}}
|
||||
</li>
|
||||
<li><span class="parameter">log</span>
|
||||
Should we log this line? Defaults to self.log if not passed.
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "loggingconsole:dechoPopup"></a>
|
||||
<strong>loggingconsole:dechoPopup(text, commands, hints, log)</strong>
|
||||
<a style="float:right;" href="../source/LoggingConsole.lua.html#358">line 358</a>
|
||||
</dt>
|
||||
<dd>
|
||||
dechoPopup for LoggingConsole
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">text</span>
|
||||
the text to use for the link
|
||||
</li>
|
||||
<li><span class="parameter">commands</span>
|
||||
the commands to send when the popup is activated, as table. IE {[[send("sleep")]], [[send("stand")]]}
|
||||
</li>
|
||||
<li><span class="parameter">hints</span>
|
||||
A tooltip which is displayed when the mouse is over the link. IE {{"sleep", "stand"}}
|
||||
</li>
|
||||
<li><span class="parameter">log</span>
|
||||
Should we log this line? Defaults to self.log if not passed.
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "loggingconsole:hechoPopup"></a>
|
||||
<strong>loggingconsole:hechoPopup(text, commands, hints, log)</strong>
|
||||
<a style="float:right;" href="../source/LoggingConsole.lua.html#367">line 367</a>
|
||||
</dt>
|
||||
<dd>
|
||||
hechoPopup for LoggingConsole
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">text</span>
|
||||
the text to use for the link
|
||||
</li>
|
||||
<li><span class="parameter">commands</span>
|
||||
the commands to send when the popup is activated, as table. IE {[[send("sleep")]], [[send("stand")]]}
|
||||
</li>
|
||||
<li><span class="parameter">hints</span>
|
||||
A tooltip which is displayed when the mouse is over the link. IE {{"sleep", "stand"}}
|
||||
</li>
|
||||
<li><span class="parameter">log</span>
|
||||
Should we log this line? Defaults to self.log if not passed.
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "loggingconsole:echoPopup"></a>
|
||||
<strong>loggingconsole:echoPopup(text, commands, hints, useCurrentFormat, log)</strong>
|
||||
<a style="float:right;" href="../source/LoggingConsole.lua.html#380">line 380</a>
|
||||
</dt>
|
||||
<dd>
|
||||
echoPopup for LoggingConsole
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">text</span>
|
||||
the text to use for the link
|
||||
</li>
|
||||
<li><span class="parameter">commands</span>
|
||||
the commands to send when the popup is activated, as table. IE {[[send("sleep")]], [[send("stand")]]}
|
||||
</li>
|
||||
<li><span class="parameter">hints</span>
|
||||
A tooltip which is displayed when the mouse is over the link. IE {{"sleep", "stand"}}
|
||||
</li>
|
||||
<li><span class="parameter">useCurrentFormat</span>
|
||||
If set to true, will look like the text around it. If false it will be blue and underline.
|
||||
</li>
|
||||
<li><span class="parameter">log</span>
|
||||
Should we log this line? Defaults to self.log if not passed. If you want to pass this you must pass in useCurrentFormat
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Usage:</h3>
|
||||
<ul>
|
||||
<li><pre class="example">myLoggingConsole:<span class="function-name">echoPopup</span>(<span class="string">"This is a link!"</span>, {<span class="string">[[send("sleep")]]</span>, <span class="string">[[send("stand")]]</span>, {<span class="string">"sleep"</span>, <span class="string">"stand"</span>}) <span class="comment">-- text "This is a link" will send("sleep") when clicked and be blue w/ underline. Defaut log behaviour (self.log)</span></pre></li>
|
||||
<li><pre class="example">myLoggingConsole:<span class="function-name">echoPopup</span>(<span class="string">"This is a link!"</span>, {<span class="string">[[send("sleep")]]</span>, <span class="string">[[send("stand")]]</span>, {<span class="string">"sleep"</span>, <span class="string">"stand"</span>}, <span class="keyword">false</span>, <span class="keyword">false</span>) <span class="comment">-- same as above, but forces it not to log regardless of self.log setting</span></pre></li>
|
||||
<li><pre class="example">myLoggingConsole:<span class="function-name">echoPopup</span>(<span class="string">"This is a link!"</span>, {<span class="string">[[send("sleep")]]</span>, <span class="string">[[send("stand")]]</span>, {<span class="string">"sleep"</span>, <span class="string">"stand"</span>}, <span class="keyword">true</span>, <span class="keyword">true</span>) <span class="comment">-- same as above, but forces it to log regardless of self.log setting and the text will look like anything else echoed to the console.</span></pre></li>
|
||||
</ul>
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "loggingconsole:appendBuffer"></a>
|
||||
<strong>loggingconsole:appendBuffer(log)</strong>
|
||||
<a style="float:right;" href="../source/LoggingConsole.lua.html#386">line 386</a>
|
||||
</dt>
|
||||
<dd>
|
||||
Append copy()ed text to the console
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">log</span>
|
||||
should we log this?
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "loggingconsole:append"></a>
|
||||
<strong>loggingconsole:append(log)</strong>
|
||||
<a style="float:right;" href="../source/LoggingConsole.lua.html#392">line 392</a>
|
||||
</dt>
|
||||
<dd>
|
||||
Append copy()ed text to the console
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">log</span>
|
||||
should we log this?
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "loggingconsole:echo"></a>
|
||||
<strong>loggingconsole:echo(str, log)</strong>
|
||||
<a style="float:right;" href="../source/LoggingConsole.lua.html#399">line 399</a>
|
||||
</dt>
|
||||
<dd>
|
||||
echo's a string to the console.
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">str</span>
|
||||
the string to echo
|
||||
</li>
|
||||
<li><span class="parameter">log</span>
|
||||
should this be logged? Used to override the .log constraint
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "loggingconsole:hecho"></a>
|
||||
<strong>loggingconsole:hecho(str, log)</strong>
|
||||
<a style="float:right;" href="../source/LoggingConsole.lua.html#406">line 406</a>
|
||||
</dt>
|
||||
<dd>
|
||||
hecho's a string to the console.
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">str</span>
|
||||
the string to hecho
|
||||
</li>
|
||||
<li><span class="parameter">log</span>
|
||||
should this be logged? Used to override the .log constraint
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "loggingconsole:decho"></a>
|
||||
<strong>loggingconsole:decho(str, log)</strong>
|
||||
<a style="float:right;" href="../source/LoggingConsole.lua.html#413">line 413</a>
|
||||
</dt>
|
||||
<dd>
|
||||
decho's a string to the console.
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">str</span>
|
||||
the string to decho
|
||||
</li>
|
||||
<li><span class="parameter">log</span>
|
||||
should this be logged? Used to override the .log constraint
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "loggingconsole:cecho"></a>
|
||||
<strong>loggingconsole:cecho(str, log)</strong>
|
||||
<a style="float:right;" href="../source/LoggingConsole.lua.html#420">line 420</a>
|
||||
</dt>
|
||||
<dd>
|
||||
cecho's a string to the console.
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">str</span>
|
||||
the string to cecho
|
||||
</li>
|
||||
<li><span class="parameter">log</span>
|
||||
should this be logged? Used to override the .log constraint
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "loggingconsole:replay"></a>
|
||||
<strong>loggingconsole:replay(numberOfLines)</strong>
|
||||
<a style="float:right;" href="../source/LoggingConsole.lua.html#426">line 426</a>
|
||||
</dt>
|
||||
<dd>
|
||||
Replays the last X lines from the console's log file, if it exists
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">numberOfLines</span>
|
||||
The number of lines to replay from the end of the file
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
|
||||
</div> <!-- id="content" -->
|
||||
</div> <!-- id="main" -->
|
||||
<div id="about">
|
||||
<i>generated by <a href="http://github.com/lunarmodules/LDoc">LDoc 1.5.0</a></i>
|
||||
<i style="float:right;">Last updated 2023-05-29 18:41:27 </i>
|
||||
</div> <!-- id="about" -->
|
||||
</div> <!-- id="container" -->
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,546 +0,0 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
||||
<head>
|
||||
<title>Reference</title>
|
||||
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div id="container">
|
||||
|
||||
<div id="product">
|
||||
<div id="product_logo"></div>
|
||||
<div id="product_name"><big><b></b></big></div>
|
||||
<div id="product_description"></div>
|
||||
</div> <!-- id="product" -->
|
||||
|
||||
|
||||
<div id="main">
|
||||
|
||||
|
||||
<!-- Menu -->
|
||||
|
||||
<div id="navigation">
|
||||
<br/>
|
||||
<h1>MDK</h1>
|
||||
|
||||
|
||||
<ul>
|
||||
<li><a href="../index.html">Index</a></li>
|
||||
</ul>
|
||||
|
||||
<h2>Contents</h2>
|
||||
<ul>
|
||||
<li><a href="#Methods">Methods</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h2>Classes</h2>
|
||||
<ul class="nowrap">
|
||||
<li><a href="../classes/aliasmgr.html">aliasmgr</a></li>
|
||||
<li><a href="../classes/Chyron.html">Chyron</a></li>
|
||||
<li><a href="../classes/EMCO.html">EMCO</a></li>
|
||||
<li><a href="../classes/LoggingConsole.html">LoggingConsole</a></li>
|
||||
<li><strong>Loginator</strong></li>
|
||||
<li><a href="../classes/MasterMindSolver.html">MasterMindSolver</a></li>
|
||||
<li><a href="../classes/revisionator.html">revisionator</a></li>
|
||||
<li><a href="../classes/SortBox.html">SortBox</a></li>
|
||||
<li><a href="../classes/spinbox.html">spinbox</a></li>
|
||||
<li><a href="../classes/SUG.html">SUG</a></li>
|
||||
<li><a href="../classes/TextGauge.html">TextGauge</a></li>
|
||||
<li><a href="../classes/TimerGauge.html">TimerGauge</a></li>
|
||||
</ul>
|
||||
<h2>Modules</h2>
|
||||
<ul class="nowrap">
|
||||
<li><a href="../modules/demontools.html">demontools</a></li>
|
||||
<li><a href="../modules/echofile.html">echofile</a></li>
|
||||
<li><a href="../modules/figlet.html">figlet</a></li>
|
||||
<li><a href="../modules/ftext.html">ftext</a></li>
|
||||
<li><a href="../modules/GradientMaker.html">GradientMaker</a></li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
|
||||
<h1>Class <code>Loginator</code></h1>
|
||||
<p>Loginator creates an object which allows you to log things to file at
|
||||
various severity levels, with the ability to only log items above a specific
|
||||
severity to file.</p>
|
||||
<p></p>
|
||||
<h3>Info:</h3>
|
||||
<ul>
|
||||
<li><strong>Copyright</strong>: 2021 Damian Monogue</li>
|
||||
<li><strong>License</strong>: MIT, see LICENSE.lua</li>
|
||||
<li><strong>Author</strong>: Damian Monogue <demonnic@gmail.com></li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h2><a href="#Methods">Methods</a></h2>
|
||||
<table class="function_list">
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#loginator:new">loginator:new(options)</a></td>
|
||||
<td class="summary">Creates a new Loginator object</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#loginator:setColorForLevel">loginator:setColorForLevel(color, level)</a></td>
|
||||
<td class="summary">Set the color to associate with a logging level post-creation</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#loginator:getFullFilename">loginator:getFullFilename()</a></td>
|
||||
<td class="summary">Returns the full path and filename to the logfile</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#loginator:error">loginator:error(msg)</a></td>
|
||||
<td class="summary">Write an error level message to the logfile.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#loginator:warn">loginator:warn(msg)</a></td>
|
||||
<td class="summary">Write a warn level message to the logfile.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#loginator:info">loginator:info(msg)</a></td>
|
||||
<td class="summary">Write an info level message to the logfile.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#loginator:debug">loginator:debug(msg)</a></td>
|
||||
<td class="summary">Write a debug level message to the logfile.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#loginator:log">loginator:log(msg, level)</a></td>
|
||||
<td class="summary">Write a message to the log file and optionally specify the level</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#loginator:open">loginator:open()</a></td>
|
||||
<td class="summary">Uses openUrl() to request your OS open the logfile in the appropriate application.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#loginator:openDir">loginator:openDir()</a></td>
|
||||
<td class="summary">Uses openUrl() to request your OS open the directory the logfile resides in.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#loginator:getPath">loginator:getPath(filename)</a></td>
|
||||
<td class="summary">Returns the path to the log file (directory in which the file resides) as a string</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br/>
|
||||
<br/>
|
||||
|
||||
|
||||
<h2 class="section-header "><a name="Methods"></a>Methods</h2>
|
||||
|
||||
<dl class="function">
|
||||
<dt>
|
||||
<a name = "loginator:new"></a>
|
||||
<strong>loginator:new(options)</strong>
|
||||
<a style="float:right;" href="../source/Loginator.lua.html#214">line 214</a>
|
||||
</dt>
|
||||
<dd>
|
||||
Creates a new Loginator object
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">options</span>
|
||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.5">table</a></span>
|
||||
table of options for the logger
|
||||
<table class="tg">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>option name</th>
|
||||
<th>description</th>
|
||||
<th>default</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="tg-1">format</td>
|
||||
<td class="tg-1">What format to log in? "h" for html, "a" for ansi, anything else for plaintext.</td>
|
||||
<td class="tg-1">"h"</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tg-2">name</td>
|
||||
<td class="tg-2">What is the name of the logger? Will replace |n in templates</td>
|
||||
<td class="tg-2">logname</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tg-1">level</td>
|
||||
<td class="tg-1">What level should the logger operate at? This will control what level the log function defaults to, as well as what logs will actually be written<br>
|
||||
Only items of an equal or higher severity to this will be written to the log file.</td>
|
||||
<td class="tg-1">"info"</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tg-2">bgColor</td>
|
||||
<td class="tg-2">What background color to use for html logs</td>
|
||||
<td class="tg-2">"black"</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tg-1">fgColor</td>
|
||||
<td class="tg-1">What color to use for the main text in html logs</td>
|
||||
<td class="tg-1">"white"</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tg-2">fontSize</td>
|
||||
<td class="tg-2">What font size to use in html logs</td>
|
||||
<td class="tg-2">12</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tg-1">levelColors</td>
|
||||
<td class="tg-1">Table with the log level as the key, and the color which corresponds to it as the value</td>
|
||||
<td class="tg-1">{ error = "red", warn = "DarkOrange", info = "ForestGreen", debug = "ansi_yellow" }</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tg-2">fileNameTemplate</td>
|
||||
<td class="tg-2">A template which will be transformed into the full filename, with path. See template options below for replacements</td>
|
||||
<td class="tg-2">"|p/log/Loginator/|y-|M-|d-|n.|e"</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tg-1">entryTemplate</td>
|
||||
<td class="tg-1">The template which controls the look of each log entry. See template options below for replacements</td>
|
||||
<td class="tg-1">"|y-|M-|d |h:|m:|s.|x [|c|l|r] |t"</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table><br>
|
||||
Table of template options
|
||||
<table class="tg">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>template code</th>
|
||||
<th>what it is replaced with</th>
|
||||
<th>example</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="tg-1">|y</td>
|
||||
<td class="tg-1">the year in 4 digits</td>
|
||||
<td class="tg-1">2021</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tg-2">|p</td>
|
||||
<td class="tg-2">getMudletHomeDir()</td>
|
||||
<td class="tg-2">/home/demonnic/.config/mudlet/profiles/testprofile</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tg-1">|M</td>
|
||||
<td class="tg-1">Month as 2 digits</td>
|
||||
<td class="tg-1">05</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tg-2">|d</td>
|
||||
<td class="tg-2">day, as 2 digits</td>
|
||||
<td class="tg-2">23</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tg-1">|h</td>
|
||||
<td class="tg-1">hour in 24hr time format, 2 digits</td>
|
||||
<td class="tg-1">03</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tg-2">|m</td>
|
||||
<td class="tg-2">minute as 2 digits</td>
|
||||
<td class="tg-2">42</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tg-1">|s</td>
|
||||
<td class="tg-1">seconds as 2 digits</td>
|
||||
<td class="tg-1">34</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tg-2">|x</td>
|
||||
<td class="tg-2">milliseconds as 3 digits</td>
|
||||
<td class="tg-2">194</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tg-1">|e</td>
|
||||
<td class="tg-1">Filename extension expected. "html" for html format, "log" for everything else</td>
|
||||
<td class="tg-1">html</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tg-2">|l</td>
|
||||
<td class="tg-2">The logging level of the entry, in ALLCAPS</td>
|
||||
<td class="tg-2">WARN</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tg-1">|c</td>
|
||||
<td class="tg-1">The color which corresponds with the logging level. Set via the levelColors table in the options. Example not included.</td>
|
||||
<td class="tg-1"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tg-2">|r</td>
|
||||
<td class="tg-2">Reset back to standard color. Used to close |c. Example not included</td>
|
||||
<td class="tg-2"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tg-1">|n</td>
|
||||
<td class="tg-1">The name of the logger, set via the options when you have Loginator create it.</td>
|
||||
<td class="tg-1">CoolPackageLog</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
newly created logger object
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "loginator:setColorForLevel"></a>
|
||||
<strong>loginator:setColorForLevel(color, level)</strong>
|
||||
<a style="float:right;" href="../source/Loginator.lua.html#288">line 288</a>
|
||||
</dt>
|
||||
<dd>
|
||||
Set the color to associate with a logging level post-creation
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">color</span>
|
||||
The color to set for the level, as a string. Can be any valid color string for cecho, decho, or hecho.
|
||||
</li>
|
||||
<li><span class="parameter">level</span>
|
||||
The level to set the color for. Must be one of 'error', 'warn', 'info', or 'debug'
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
true if the color is updated, or nil+error if it could not be updated for some reason.
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "loginator:getFullFilename"></a>
|
||||
<strong>loginator:getFullFilename()</strong>
|
||||
<a style="float:right;" href="../source/Loginator.lua.html#332">line 332</a>
|
||||
</dt>
|
||||
<dd>
|
||||
Returns the full path and filename to the logfile
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "loginator:error"></a>
|
||||
<strong>loginator:error(msg)</strong>
|
||||
<a style="float:right;" href="../source/Loginator.lua.html#339">line 339</a>
|
||||
</dt>
|
||||
<dd>
|
||||
Write an error level message to the logfile. Error level messages are always written.
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">msg</span>
|
||||
the message to log
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
true if msg written, nil+error if error
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "loginator:warn"></a>
|
||||
<strong>loginator:warn(msg)</strong>
|
||||
<a style="float:right;" href="../source/Loginator.lua.html#349">line 349</a>
|
||||
</dt>
|
||||
<dd>
|
||||
Write a warn level message to the logfile.
|
||||
Msg is only written if the logger level is <= warn
|
||||
From most to least severe the levels are:
|
||||
error > warn > info > debug
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">msg</span>
|
||||
the message to log
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
true if msg written, false if skipped due to level, nil+error if error
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "loginator:info"></a>
|
||||
<strong>loginator:info(msg)</strong>
|
||||
<a style="float:right;" href="../source/Loginator.lua.html#359">line 359</a>
|
||||
</dt>
|
||||
<dd>
|
||||
Write an info level message to the logfile.
|
||||
Msg is only written if the logger level is <= info
|
||||
From most to least severe the levels are:
|
||||
error > warn > info > debug
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">msg</span>
|
||||
the message to log
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
true if msg written, false if skipped due to level, nil+error if error
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "loginator:debug"></a>
|
||||
<strong>loginator:debug(msg)</strong>
|
||||
<a style="float:right;" href="../source/Loginator.lua.html#369">line 369</a>
|
||||
</dt>
|
||||
<dd>
|
||||
Write a debug level message to the logfile.
|
||||
Msg is only written if the logger level is debug
|
||||
From most to least severe the levels are:
|
||||
error > warn > info > debug
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">msg</span>
|
||||
the message to log
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
true if msg written, false if skipped due to level, nil+error if error
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "loginator:log"></a>
|
||||
<strong>loginator:log(msg, level)</strong>
|
||||
<a style="float:right;" href="../source/Loginator.lua.html#377">line 377</a>
|
||||
</dt>
|
||||
<dd>
|
||||
Write a message to the log file and optionally specify the level
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">msg</span>
|
||||
the message to log
|
||||
</li>
|
||||
<li><span class="parameter">level</span>
|
||||
the level to log the message at. Defaults to the level of the logger itself if not provided.
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
true if msg written, false if skipped due to level, nil+error if error
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "loginator:open"></a>
|
||||
<strong>loginator:open()</strong>
|
||||
<a style="float:right;" href="../source/Loginator.lua.html#409">line 409</a>
|
||||
</dt>
|
||||
<dd>
|
||||
Uses openUrl() to request your OS open the logfile in the appropriate application. Usually your web browser for html and text editor for all others.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "loginator:openDir"></a>
|
||||
<strong>loginator:openDir()</strong>
|
||||
<a style="float:right;" href="../source/Loginator.lua.html#414">line 414</a>
|
||||
</dt>
|
||||
<dd>
|
||||
Uses openUrl() to request your OS open the directory the logfile resides in. This allows for easier browsing if you have more than one file.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "loginator:getPath"></a>
|
||||
<strong>loginator:getPath(filename)</strong>
|
||||
<a style="float:right;" href="../source/Loginator.lua.html#420">line 420</a>
|
||||
</dt>
|
||||
<dd>
|
||||
Returns the path to the log file (directory in which the file resides) as a string
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">filename</span>
|
||||
optional filename to return the path of. If not supplied, with use the logger's current filename
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
|
||||
</div> <!-- id="content" -->
|
||||
</div> <!-- id="main" -->
|
||||
<div id="about">
|
||||
<i>generated by <a href="http://github.com/lunarmodules/LDoc">LDoc 1.5.0</a></i>
|
||||
<i style="float:right;">Last updated 2023-05-29 18:41:27 </i>
|
||||
</div> <!-- id="about" -->
|
||||
</div> <!-- id="container" -->
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,277 +0,0 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
||||
<head>
|
||||
<title>Reference</title>
|
||||
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div id="container">
|
||||
|
||||
<div id="product">
|
||||
<div id="product_logo"></div>
|
||||
<div id="product_name"><big><b></b></big></div>
|
||||
<div id="product_description"></div>
|
||||
</div> <!-- id="product" -->
|
||||
|
||||
|
||||
<div id="main">
|
||||
|
||||
|
||||
<!-- Menu -->
|
||||
|
||||
<div id="navigation">
|
||||
<br/>
|
||||
<h1>MDK</h1>
|
||||
|
||||
|
||||
<ul>
|
||||
<li><a href="../index.html">Index</a></li>
|
||||
</ul>
|
||||
|
||||
<h2>Contents</h2>
|
||||
<ul>
|
||||
<li><a href="#Methods">Methods</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h2>Classes</h2>
|
||||
<ul class="nowrap">
|
||||
<li><a href="../classes/aliasmgr.html">aliasmgr</a></li>
|
||||
<li><a href="../classes/Chyron.html">Chyron</a></li>
|
||||
<li><a href="../classes/EMCO.html">EMCO</a></li>
|
||||
<li><a href="../classes/LoggingConsole.html">LoggingConsole</a></li>
|
||||
<li><a href="../classes/Loginator.html">Loginator</a></li>
|
||||
<li><strong>MasterMindSolver</strong></li>
|
||||
<li><a href="../classes/revisionator.html">revisionator</a></li>
|
||||
<li><a href="../classes/SortBox.html">SortBox</a></li>
|
||||
<li><a href="../classes/spinbox.html">spinbox</a></li>
|
||||
<li><a href="../classes/SUG.html">SUG</a></li>
|
||||
<li><a href="../classes/TextGauge.html">TextGauge</a></li>
|
||||
<li><a href="../classes/TimerGauge.html">TimerGauge</a></li>
|
||||
</ul>
|
||||
<h2>Modules</h2>
|
||||
<ul class="nowrap">
|
||||
<li><a href="../modules/demontools.html">demontools</a></li>
|
||||
<li><a href="../modules/echofile.html">echofile</a></li>
|
||||
<li><a href="../modules/figlet.html">figlet</a></li>
|
||||
<li><a href="../modules/ftext.html">ftext</a></li>
|
||||
<li><a href="../modules/GradientMaker.html">GradientMaker</a></li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
|
||||
<h1>Class <code>MasterMindSolver</code></h1>
|
||||
<p>Interactive object which helps you solve a Master Mind puzzle.</p>
|
||||
<p></p>
|
||||
<h3>Info:</h3>
|
||||
<ul>
|
||||
<li><strong>Copyright</strong>: 2021 Damian Monogue,2008,2009 Konstantinos Asimakis for code used to turn an index number into a guess (indexToGuess method)</li>
|
||||
<li><strong>Author</strong>: Damian Monogue <demonnic@gmail.com></li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h2><a href="#Methods">Methods</a></h2>
|
||||
<table class="function_list">
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#mastermindsolver:new">mastermindsolver:new(options)</a></td>
|
||||
<td class="summary">Creates a new Master Mind solver</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#mastermindsolver:reducePossible">mastermindsolver:reducePossible(guess, coloredPins, whitePins)</a></td>
|
||||
<td class="summary">Function used to reduce the remaining possible answers, given a guess and the answer to that guess.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#mastermindsolver:checkLastSuggestion">mastermindsolver:checkLastSuggestion(coloredPins, whitePins)</a></td>
|
||||
<td class="summary">Function which assumes you used the last suggested guess from the solver, and reduces the number of possible correct solutions based on the answer given</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#mastermindsolver:getValidGuess">mastermindsolver:getValidGuess(useActions)</a></td>
|
||||
<td class="summary">Used to get one of the remaining valid possible guesses</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br/>
|
||||
<br/>
|
||||
|
||||
|
||||
<h2 class="section-header "><a name="Methods"></a>Methods</h2>
|
||||
|
||||
<dl class="function">
|
||||
<dt>
|
||||
<a name = "mastermindsolver:new"></a>
|
||||
<strong>mastermindsolver:new(options)</strong>
|
||||
<a style="float:right;" href="../source/MasterMindSolver.lua.html#81">line 81</a>
|
||||
</dt>
|
||||
<dd>
|
||||
Creates a new Master Mind solver
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">options</span>
|
||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.5">table</a></span>
|
||||
table of configuration options for the solver
|
||||
<table class="tg">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>option name</th>
|
||||
<th>description</th>
|
||||
<th>default</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="tg-1">places</td>
|
||||
<td class="tg-1">How many spots in the code we're breaking?</td>
|
||||
<td class="tg-1">4</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tg-2">items</td>
|
||||
<td class="tg-2">The table of colors/gemstones/whatever which can be part of the code</td>
|
||||
<td class="tg-2">{"red", "orange", "yellow", "green", "blue", "purple"}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tg-1">template</td>
|
||||
<td class="tg-1">The string template to use for the guess. Within the template, |t is replaced by the item. Used as the command if autoSend is true</td>
|
||||
<td class="tg-1">"|t"</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tg-2">autoSend</td>
|
||||
<td class="tg-2">Should we send the guess directly to the server?</td>
|
||||
<td class="tg-2">false</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tg-1">allowDuplicates</td>
|
||||
<td class="tg-1">Can the same item be used more than once in a code?</td>
|
||||
<td class="tg-1">true</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tg-2">singleCommand</td>
|
||||
<td class="tg-2">If true, combines the guess into a single command, with each one separated by the separator</td>
|
||||
<td class="tg-2">false</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tg-1">separator</td>
|
||||
<td class="tg-1">If sending the guess as a single command, what should we put between the guesses to separate them?</td>
|
||||
<td class="tg-1">" "</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "mastermindsolver:reducePossible"></a>
|
||||
<strong>mastermindsolver:reducePossible(guess, coloredPins, whitePins)</strong>
|
||||
<a style="float:right;" href="../source/MasterMindSolver.lua.html#178">line 178</a>
|
||||
</dt>
|
||||
<dd>
|
||||
Function used to reduce the remaining possible answers, given a guess and the answer to that guess. This is not undoable.
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">guess</span>
|
||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.5">table</a></span>
|
||||
guess which the answer belongs to. Uses numbers, rather than item names. IE { 1, 1, 2, 2} rather than { "blue", "blue", "green", "green" }
|
||||
</li>
|
||||
<li><span class="parameter">coloredPins</span>
|
||||
<span class="types"><span class="type">number</span></span>
|
||||
how many parts of the guess are both the right color and the right place
|
||||
</li>
|
||||
<li><span class="parameter">whitePins</span>
|
||||
<span class="types"><span class="type">number</span></span>
|
||||
how many parts of the guess are the right color, but in the wrong place
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
true if you solved the puzzle (coloredPins == number of positions in the code), or false otherwise
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "mastermindsolver:checkLastSuggestion"></a>
|
||||
<strong>mastermindsolver:checkLastSuggestion(coloredPins, whitePins)</strong>
|
||||
<a style="float:right;" href="../source/MasterMindSolver.lua.html#202">line 202</a>
|
||||
</dt>
|
||||
<dd>
|
||||
Function which assumes you used the last suggested guess from the solver, and reduces the number of possible correct solutions based on the answer given
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">coloredPins</span>
|
||||
<span class="types"><span class="type">number</span></span>
|
||||
how many parts of the guess are both the right color and the right place
|
||||
</li>
|
||||
<li><span class="parameter">whitePins</span>
|
||||
<span class="types"><span class="type">number</span></span>
|
||||
how many parts of the guess are the right color, but in the wrong place
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
true if you solved the puzzle (coloredPins == number of positions in the code), or false otherwise
|
||||
</ol>
|
||||
|
||||
|
||||
<h3>See also:</h3>
|
||||
<ul>
|
||||
<a href="../classes/MasterMindSolver.html#mastermindsolver:reducePossible">MasterMindSolver:reducePossible</a>
|
||||
</ul>
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "mastermindsolver:getValidGuess"></a>
|
||||
<strong>mastermindsolver:getValidGuess(useActions)</strong>
|
||||
<a style="float:right;" href="../source/MasterMindSolver.lua.html#208">line 208</a>
|
||||
</dt>
|
||||
<dd>
|
||||
Used to get one of the remaining valid possible guesses
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">useActions</span>
|
||||
<span class="types"><span class="type">boolean</span></span>
|
||||
if true, will return the guess as the commands which would be sent, rather than the numbered items
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
|
||||
</div> <!-- id="content" -->
|
||||
</div> <!-- id="main" -->
|
||||
<div id="about">
|
||||
<i>generated by <a href="http://github.com/lunarmodules/LDoc">LDoc 1.5.0</a></i>
|
||||
<i style="float:right;">Last updated 2023-05-29 18:41:27 </i>
|
||||
</div> <!-- id="about" -->
|
||||
</div> <!-- id="container" -->
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,407 +0,0 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
||||
<head>
|
||||
<title>Reference</title>
|
||||
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div id="container">
|
||||
|
||||
<div id="product">
|
||||
<div id="product_logo"></div>
|
||||
<div id="product_name"><big><b></b></big></div>
|
||||
<div id="product_description"></div>
|
||||
</div> <!-- id="product" -->
|
||||
|
||||
|
||||
<div id="main">
|
||||
|
||||
|
||||
<!-- Menu -->
|
||||
|
||||
<div id="navigation">
|
||||
<br/>
|
||||
<h1>MDK</h1>
|
||||
|
||||
|
||||
<ul>
|
||||
<li><a href="../index.html">Index</a></li>
|
||||
</ul>
|
||||
|
||||
<h2>Contents</h2>
|
||||
<ul>
|
||||
<li><a href="#Methods">Methods</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h2>Classes</h2>
|
||||
<ul class="nowrap">
|
||||
<li><a href="../classes/aliasmgr.html">aliasmgr</a></li>
|
||||
<li><a href="../classes/Chyron.html">Chyron</a></li>
|
||||
<li><a href="../classes/EMCO.html">EMCO</a></li>
|
||||
<li><a href="../classes/LoggingConsole.html">LoggingConsole</a></li>
|
||||
<li><a href="../classes/Loginator.html">Loginator</a></li>
|
||||
<li><a href="../classes/MasterMindSolver.html">MasterMindSolver</a></li>
|
||||
<li><a href="../classes/revisionator.html">revisionator</a></li>
|
||||
<li><a href="../classes/SortBox.html">SortBox</a></li>
|
||||
<li><a href="../classes/spinbox.html">spinbox</a></li>
|
||||
<li><strong>SUG</strong></li>
|
||||
<li><a href="../classes/TextGauge.html">TextGauge</a></li>
|
||||
<li><a href="../classes/TimerGauge.html">TimerGauge</a></li>
|
||||
</ul>
|
||||
<h2>Modules</h2>
|
||||
<ul class="nowrap">
|
||||
<li><a href="../modules/demontools.html">demontools</a></li>
|
||||
<li><a href="../modules/echofile.html">echofile</a></li>
|
||||
<li><a href="../modules/figlet.html">figlet</a></li>
|
||||
<li><a href="../modules/ftext.html">ftext</a></li>
|
||||
<li><a href="../modules/GradientMaker.html">GradientMaker</a></li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
|
||||
<h1>Class <code>SUG</code></h1>
|
||||
<p>Self Updating Gauge, extends <a href="https://www.mudlet.org/geyser/files/geyser/GeyserGauge.html">Geyser.Gauge</a></p>
|
||||
<p></p>
|
||||
<h3>Info:</h3>
|
||||
<ul>
|
||||
<li><strong>Copyright</strong>: 2020 Damian Monogue</li>
|
||||
<li><strong>License</strong>: MIT, see LICENSE.lua</li>
|
||||
<li><strong>Author</strong>: Damian Monogue <demonnic@gmail.com></li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h2><a href="#Methods">Methods</a></h2>
|
||||
<table class="function_list">
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#sug:new">sug:new(cons, container)</a></td>
|
||||
<td class="summary">Creates a new Self Updating Gauge.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#sug:setUpdateTime">sug:setUpdateTime(time)</a></td>
|
||||
<td class="summary">Set how often to update the gauge on a timer</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#sug:setUpdateEvent">sug:setUpdateEvent(event)</a></td>
|
||||
<td class="summary">Set the event to listen for to update the gauge</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#sug:setCurrentVariable">sug:setCurrentVariable(variableName)</a></td>
|
||||
<td class="summary">Set the name of the variable the Self Updating Gauge watches for the 'current' value of the gauge</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#sug:setMaxVariable">sug:setMaxVariable(variableName)</a></td>
|
||||
<td class="summary">Set the name of the variable the Self Updating Gauge watches for the 'max' value of the gauge</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#sug:setTextTemplate">sug:setTextTemplate(template)</a></td>
|
||||
<td class="summary">Set the template for the Self Updating Gauge to set the text with.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#sug:setUpdateHook">sug:setUpdateHook(func)</a></td>
|
||||
<td class="summary">Set the updateHook function which is run just prior to the gauge updating</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#sug:stop">sug:stop()</a></td>
|
||||
<td class="summary">Stops the Self Updating Gauge from updating</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#sug:start">sug:start()</a></td>
|
||||
<td class="summary">Starts the Self Updating Gauge updating.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#sug:update">sug:update()</a></td>
|
||||
<td class="summary">Reads the values from currentVariable and maxVariable, and updates the gauge's value and text.</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br/>
|
||||
<br/>
|
||||
|
||||
|
||||
<h2 class="section-header "><a name="Methods"></a>Methods</h2>
|
||||
|
||||
<dl class="function">
|
||||
<dt>
|
||||
<a name = "sug:new"></a>
|
||||
<strong>sug:new(cons, container)</strong>
|
||||
<a style="float:right;" href="../source/SUG.lua.html#91">line 91</a>
|
||||
</dt>
|
||||
<dd>
|
||||
Creates a new Self Updating Gauge.
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">cons</span>
|
||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.5">table</a></span>
|
||||
table of options which control the Gauge's behaviour. In addition to all valid contraints for Geyser.Gauge, SUG adds:
|
||||
<br>
|
||||
<table class="tg">
|
||||
<tr>
|
||||
<th>name</th>
|
||||
<th>description</th>
|
||||
<th>default</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tg-1">active</td>
|
||||
<td class="tg-1">boolean, if true starts the timer updating</td>
|
||||
<td class="tg-1">true</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tg-2">updateTime</td>
|
||||
<td class="tg-2">How often should the gauge autoupdate? Milliseconds. 0 to disable the timer but still allow event updates</td>
|
||||
<td class="tg-2">333</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tg-1">currentVariable</td>
|
||||
<td class="tg-1">What variable will hold the 'current' value of the gauge? Pass the name as a string, IE "currentHP" or "gmcp.Char.Vitals.hp"</td>
|
||||
<td class="tg-1">""</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tg-2">maxVariable</td>
|
||||
<td class="tg-2">What variable will hold the 'current' value of the gauge? Pass the name as a string, IE "maxHP" or "gmcp.Char.Vitals.maxhp"</td>
|
||||
<td class="tg-2">""</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tg-1">textTemplate</td>
|
||||
<td class="tg-1">Template to use for the text on the gauge. "|c" replaced with current value, "|m" replaced with max value, "|p" replaced with the % full the gauge should be</td>
|
||||
<td class="tg-1">" |c/|m |p%"</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tg-2">defaultCurrent</td>
|
||||
<td class="tg-2">What value to use if the currentVariable points to nil or something which cannot be made a number?</td>
|
||||
<td class="tg-2">50</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tg-1">defaultMax</td>
|
||||
<td class="tg-1">What value to use if the maxVariable points to nil or something which cannot be made a number?</td>
|
||||
<td class="tg-1">100</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tg-2">updateEvent</td>
|
||||
<td class="tg-2">The name of an event to listen for to perform an update. Can be run alongside or instead of the timer updates. Empty string to turn off</td>
|
||||
<td class="tg-2">""</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tg-1">updateHook</td>
|
||||
<td class="tg-1">A function which is run each time the gauge updates. Should take 3 arguments, the gauge itself, current value, and max value. You can return new current and max values to be used, for example `return 34, 120` would cause the gauge to use 34 for current and 120 for max regardless of what the variables it reads say.</td>
|
||||
<td class="tg-1"></td>
|
||||
</tr>
|
||||
</table>
|
||||
</li>
|
||||
<li><span class="parameter">container</span>
|
||||
The Geyser container for this gauge
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Usage:</h3>
|
||||
<ul>
|
||||
<pre class="example"><span class="keyword">local</span> SUG = <span class="global">require</span>(<span class="string">"MDK.sug"</span>) <span class="comment">--the following will watch "gmcp.Char.Vitals.hp" and "gmcp.Char.Vitals.maxhp" and update itself every 333 milliseconds
|
||||
</span>myGauge = SUG:<span class="function-name">new</span>({
|
||||
name = <span class="string">"myGauge"</span>,
|
||||
currentVariable = <span class="string">"gmcp.Char.Vitals.hp"</span>, <span class="comment">--if this is nil, it will use the defaultCurrent of 50
|
||||
</span> maxVariable = <span class="string">"gmcp.Char.Vitals.maxhp"</span>, <span class="comment">--if this is nil, it will use the defaultMax of 100.
|
||||
</span> height = <span class="number">50</span>,
|
||||
})</pre>
|
||||
</ul>
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "sug:setUpdateTime"></a>
|
||||
<strong>sug:setUpdateTime(time)</strong>
|
||||
<a style="float:right;" href="../source/SUG.lua.html#115">line 115</a>
|
||||
</dt>
|
||||
<dd>
|
||||
Set how often to update the gauge on a timer
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">time</span>
|
||||
<span class="types"><span class="type">number</span></span>
|
||||
time in milliseconds. 0 to disable the timer
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "sug:setUpdateEvent"></a>
|
||||
<strong>sug:setUpdateEvent(event)</strong>
|
||||
<a style="float:right;" href="../source/SUG.lua.html#126">line 126</a>
|
||||
</dt>
|
||||
<dd>
|
||||
Set the event to listen for to update the gauge
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">event</span>
|
||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a></span>
|
||||
the name of the event to listen for, use "" to disable events without stopping any existing timers
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "sug:setCurrentVariable"></a>
|
||||
<strong>sug:setCurrentVariable(variableName)</strong>
|
||||
<a style="float:right;" href="../source/SUG.lua.html#137">line 137</a>
|
||||
</dt>
|
||||
<dd>
|
||||
Set the name of the variable the Self Updating Gauge watches for the 'current' value of the gauge
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">variableName</span>
|
||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a></span>
|
||||
The name of the variable to get the current value for the gauge. For instance "currentHP", "gmcp.Char.Vitals.hp" etc
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "sug:setMaxVariable"></a>
|
||||
<strong>sug:setMaxVariable(variableName)</strong>
|
||||
<a style="float:right;" href="../source/SUG.lua.html#152">line 152</a>
|
||||
</dt>
|
||||
<dd>
|
||||
Set the name of the variable the Self Updating Gauge watches for the 'max' value of the gauge
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">variableName</span>
|
||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a></span>
|
||||
The name of the variable to get the max value for the gauge. For instance "maxHP", "gmcp.Char.Vitals.maxhp" etc. Set to "" to only check the current value
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "sug:setTextTemplate"></a>
|
||||
<strong>sug:setTextTemplate(template)</strong>
|
||||
<a style="float:right;" href="../source/SUG.lua.html#172">line 172</a>
|
||||
</dt>
|
||||
<dd>
|
||||
Set the template for the Self Updating Gauge to set the text with. "|c" is replaced by the current value, "|m" is replaced by the max value, and "|p" is replaced by the percentage current/max
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">template</span>
|
||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a></span>
|
||||
The template to use for the text on the gauge. If the max value is 200 and current is 68, then |c will be replace by 68, |m replaced by 200, and |p replaced by 34.
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "sug:setUpdateHook"></a>
|
||||
<strong>sug:setUpdateHook(func)</strong>
|
||||
<a style="float:right;" href="../source/SUG.lua.html#182">line 182</a>
|
||||
</dt>
|
||||
<dd>
|
||||
Set the updateHook function which is run just prior to the gauge updating
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">func</span>
|
||||
<span class="types"><span class="type">function</span></span>
|
||||
The function which will be called when the gauge updates. It should take 3 arguments, the gauge itself, the current value, and the max value. If you wish to override the current or max values used for the gauge, you can return new current and max values, like `return newCurrent newMax`
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "sug:stop"></a>
|
||||
<strong>sug:stop()</strong>
|
||||
<a style="float:right;" href="../source/SUG.lua.html#191">line 191</a>
|
||||
</dt>
|
||||
<dd>
|
||||
Stops the Self Updating Gauge from updating
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "sug:start"></a>
|
||||
<strong>sug:start()</strong>
|
||||
<a style="float:right;" href="../source/SUG.lua.html#204">line 204</a>
|
||||
</dt>
|
||||
<dd>
|
||||
Starts the Self Updating Gauge updating. If it is already updating, it will restart it.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "sug:update"></a>
|
||||
<strong>sug:update()</strong>
|
||||
<a style="float:right;" href="../source/SUG.lua.html#218">line 218</a>
|
||||
</dt>
|
||||
<dd>
|
||||
Reads the values from currentVariable and maxVariable, and updates the gauge's value and text.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
|
||||
</div> <!-- id="content" -->
|
||||
</div> <!-- id="main" -->
|
||||
<div id="about">
|
||||
<i>generated by <a href="http://github.com/lunarmodules/LDoc">LDoc 1.5.0</a></i>
|
||||
<i style="float:right;">Last updated 2023-05-29 18:41:27 </i>
|
||||
</div> <!-- id="about" -->
|
||||
</div> <!-- id="container" -->
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,593 +0,0 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
||||
<head>
|
||||
<title>Reference</title>
|
||||
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div id="container">
|
||||
|
||||
<div id="product">
|
||||
<div id="product_logo"></div>
|
||||
<div id="product_name"><big><b></b></big></div>
|
||||
<div id="product_description"></div>
|
||||
</div> <!-- id="product" -->
|
||||
|
||||
|
||||
<div id="main">
|
||||
|
||||
|
||||
<!-- Menu -->
|
||||
|
||||
<div id="navigation">
|
||||
<br/>
|
||||
<h1>MDK</h1>
|
||||
|
||||
|
||||
<ul>
|
||||
<li><a href="../index.html">Index</a></li>
|
||||
</ul>
|
||||
|
||||
<h2>Contents</h2>
|
||||
<ul>
|
||||
<li><a href="#Tables">Tables</a></li>
|
||||
<li><a href="#Methods">Methods</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h2>Classes</h2>
|
||||
<ul class="nowrap">
|
||||
<li><a href="../classes/aliasmgr.html">aliasmgr</a></li>
|
||||
<li><a href="../classes/Chyron.html">Chyron</a></li>
|
||||
<li><a href="../classes/EMCO.html">EMCO</a></li>
|
||||
<li><a href="../classes/LoggingConsole.html">LoggingConsole</a></li>
|
||||
<li><a href="../classes/Loginator.html">Loginator</a></li>
|
||||
<li><a href="../classes/MasterMindSolver.html">MasterMindSolver</a></li>
|
||||
<li><a href="../classes/revisionator.html">revisionator</a></li>
|
||||
<li><strong>SortBox</strong></li>
|
||||
<li><a href="../classes/spinbox.html">spinbox</a></li>
|
||||
<li><a href="../classes/SUG.html">SUG</a></li>
|
||||
<li><a href="../classes/TextGauge.html">TextGauge</a></li>
|
||||
<li><a href="../classes/TimerGauge.html">TimerGauge</a></li>
|
||||
</ul>
|
||||
<h2>Modules</h2>
|
||||
<ul class="nowrap">
|
||||
<li><a href="../modules/demontools.html">demontools</a></li>
|
||||
<li><a href="../modules/echofile.html">echofile</a></li>
|
||||
<li><a href="../modules/figlet.html">figlet</a></li>
|
||||
<li><a href="../modules/ftext.html">ftext</a></li>
|
||||
<li><a href="../modules/GradientMaker.html">GradientMaker</a></li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
|
||||
<h1>Class <code>SortBox</code></h1>
|
||||
<p>An H/VBox alternative which can be set to either vertical or horizontal, and will autosort the windows</p>
|
||||
<p></p>
|
||||
<h3>Info:</h3>
|
||||
<ul>
|
||||
<li><strong>Copyright</strong>: 2020 Damian Monogue</li>
|
||||
<li><strong>License</strong>: MIT, see LICENSE.lua</li>
|
||||
<li><strong>Author</strong>: Damian Monogue <demonnic@gmail.com></li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h2><a href="#Tables">Tables</a></h2>
|
||||
<table class="function_list">
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#sortbox.SortFunctions">sortbox.SortFunctions</a></td>
|
||||
<td class="summary">Sorting functions for spairs, should you wish</td>
|
||||
</tr>
|
||||
</table>
|
||||
<h2><a href="#Methods">Methods</a></h2>
|
||||
<table class="function_list">
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#sortbox:new">sortbox:new(options[, container])</a></td>
|
||||
<td class="summary">Creates a new SortBox</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#sortbox:organize">sortbox:organize()</a></td>
|
||||
<td class="summary">Calling this will cause the SortBox to reposition/resize everything</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#sortbox:enableElastic">sortbox:enableElastic()</a></td>
|
||||
<td class="summary">Enables elasticity for the SortBox.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#sortbox:disableElastic">sortbox:disableElastic()</a></td>
|
||||
<td class="summary">Disables elasticity for the SortBox</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#sortbox:setElastic">sortbox:setElastic(enabled)</a></td>
|
||||
<td class="summary">Set elasticity specifically</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#sortbox:setMaxWidth">sortbox:setMaxWidth(maxWidth)</a></td>
|
||||
<td class="summary">Set the max width of the SortBox if it's elastic</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#sortbox:setMaxHeight">sortbox:setMaxHeight(maxHeight)</a></td>
|
||||
<td class="summary">Set the max height of the SortBox if it's elastic</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#sortbox:enableTimer">sortbox:enableTimer()</a></td>
|
||||
<td class="summary">Starts the SortBox sorting and organizing itself on a timer</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#sortbox:disableTimer">sortbox:disableTimer()</a></td>
|
||||
<td class="summary">Stops the SortBox from sorting and organizing itself on a timer</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#sortbox:setSortInterval">sortbox:setSortInterval(sortInterval)</a></td>
|
||||
<td class="summary">Sets the sortInterval, or amount of time in milliseconds between auto sorting on a timer if timerSort is true</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#sortbox:enableSort">sortbox:enableSort()</a></td>
|
||||
<td class="summary">Enables sorting when items are added/removed, or if timerSort is true, every sortInterval milliseconds</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#sortbox:disableSort">sortbox:disableSort()</a></td>
|
||||
<td class="summary">Disables sorting when items are added or removed</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#sortbox:setBoxType">sortbox:setBoxType(boxType)</a></td>
|
||||
<td class="summary">Set whether the SortBox acts as a VBox or HBox.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#sortbox:setSortFunction">sortbox:setSortFunction(functionName)</a></td>
|
||||
<td class="summary">Sets the type of sorting in use by this SortBox.</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br/>
|
||||
<br/>
|
||||
|
||||
|
||||
<h2 class="section-header "><a name="Tables"></a>Tables</h2>
|
||||
|
||||
<dl class="function">
|
||||
<dt>
|
||||
<a name = "sortbox.SortFunctions"></a>
|
||||
<strong>sortbox.SortFunctions</strong>
|
||||
<a style="float:right;" href="../source/SortBox.lua.html#29">line 29</a>
|
||||
</dt>
|
||||
<dd>
|
||||
Sorting functions for spairs, should you wish
|
||||
|
||||
|
||||
<h3>Fields:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">gaugeValue</span>
|
||||
sorts Geyser gauges by value, ascending
|
||||
</li>
|
||||
<li><span class="parameter">reverseGaugeValue</span>
|
||||
sorts Geyser gauges by value, descending
|
||||
</li>
|
||||
<li><span class="parameter">timeLeft</span>
|
||||
sorts TimerGauges by how much time is left, ascending
|
||||
</li>
|
||||
<li><span class="parameter">reverseTimeLeft</span>
|
||||
sorts TimerGauges by how much time is left, descending.
|
||||
</li>
|
||||
<li><span class="parameter">name</span>
|
||||
sorts Geyser objects by name, ascending
|
||||
</li>
|
||||
<li><span class="parameter">reverseName</span>
|
||||
sorts Geyser objects by name, descending
|
||||
</li>
|
||||
<li><span class="parameter">message</span>
|
||||
sorts Geyser labels and gauges by their echoed text, ascending
|
||||
</li>
|
||||
<li><span class="parameter">reverseMessage</span>
|
||||
sorts Geyser labels and gauges by their echoed text, descending
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<h2 class="section-header "><a name="Methods"></a>Methods</h2>
|
||||
|
||||
<dl class="function">
|
||||
<dt>
|
||||
<a name = "sortbox:new"></a>
|
||||
<strong>sortbox:new(options[, container])</strong>
|
||||
<a style="float:right;" href="../source/SortBox.lua.html#144">line 144</a>
|
||||
</dt>
|
||||
<dd>
|
||||
Creates a new SortBox
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">options</span>
|
||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.5">table</a></span>
|
||||
the options to use for the SortBox. See table below for added options
|
||||
</li>
|
||||
<li><span class="parameter">container</span>
|
||||
the container to add the SortBox into
|
||||
<br><br>Table of new options
|
||||
<table class="tg">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>option name</th>
|
||||
<th>description</th>
|
||||
<th>default</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="tg-1">autoSort</td>
|
||||
<td class="tg-1">should the SortBox perform function based sorting? If false, will behave like a normal H/VBox</td>
|
||||
<td class="tg-1">true</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tg-2">timerSort</td>
|
||||
<td class="tg-2">should the SortBox automatically perform sorting on a timer?</td>
|
||||
<td class="tg-2">true</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tg-1">sortInterval</td>
|
||||
<td class="tg-1">how frequently should we sort on a timer if timerSort is true, in milliseconds</td>
|
||||
<td class="tg-1">500</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tg-2">boxType</td>
|
||||
<td class="tg-2">Should we stack like an HBox or VBox? use 'h' for hbox and 'v' for vbox</td>
|
||||
<td class="tg-2">v</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tg-1">sortFunction</td>
|
||||
<td class="tg-1">how should we sort the items in the SortBox? see setSortFunction for valid options</td>
|
||||
<td class="tg-1">gaugeValue</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tg-2">elastic</td>
|
||||
<td class="tg-2">Should this container stretch to fit its contents? boxType v stretches in height, h stretches in width.</td>
|
||||
<td class="tg-2">false</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tg-1">maxHeight</td>
|
||||
<td class="tg-1">If elastic, what's the biggest a 'v' style box should grow in height? Use 0 for unlimited</td>
|
||||
<td class="tg-1">0</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tg-2">maxWidth</td>
|
||||
<td class="tg-2">If elastic, what's the biggest a 'h' style box should grow in width? Use 0 for unlimited</td>
|
||||
<td class="tg-2">0</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
(<em>optional</em>)
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Usage:</h3>
|
||||
<ul>
|
||||
<pre class="example"><span class="keyword">local</span> SortBox = <span class="global">require</span>(<span class="string">"MDK.sortbox"</span>)
|
||||
mySortBox = SortBox:<span class="function-name">new</span>({
|
||||
name = <span class="string">"mySortBox"</span>,
|
||||
x = <span class="number">400</span>,
|
||||
y = <span class="number">100</span>,
|
||||
height = <span class="number">150</span>,
|
||||
width = <span class="number">300</span>,
|
||||
sortFunction = <span class="string">"timeLeft"</span>
|
||||
})</pre>
|
||||
</ul>
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "sortbox:organize"></a>
|
||||
<strong>sortbox:organize()</strong>
|
||||
<a style="float:right;" href="../source/SortBox.lua.html#196">line 196</a>
|
||||
</dt>
|
||||
<dd>
|
||||
Calling this will cause the SortBox to reposition/resize everything
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "sortbox:enableElastic"></a>
|
||||
<strong>sortbox:enableElastic()</strong>
|
||||
<a style="float:right;" href="../source/SortBox.lua.html#372">line 372</a>
|
||||
</dt>
|
||||
<dd>
|
||||
Enables elasticity for the SortBox.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "sortbox:disableElastic"></a>
|
||||
<strong>sortbox:disableElastic()</strong>
|
||||
<a style="float:right;" href="../source/SortBox.lua.html#377">line 377</a>
|
||||
</dt>
|
||||
<dd>
|
||||
Disables elasticity for the SortBox
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "sortbox:setElastic"></a>
|
||||
<strong>sortbox:setElastic(enabled)</strong>
|
||||
<a style="float:right;" href="../source/SortBox.lua.html#383">line 383</a>
|
||||
</dt>
|
||||
<dd>
|
||||
Set elasticity specifically
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">enabled</span>
|
||||
<span class="types"><span class="type">boolean</span></span>
|
||||
if true, enable elasticity. If false, disable it.
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "sortbox:setMaxWidth"></a>
|
||||
<strong>sortbox:setMaxWidth(maxWidth)</strong>
|
||||
<a style="float:right;" href="../source/SortBox.lua.html#389">line 389</a>
|
||||
</dt>
|
||||
<dd>
|
||||
Set the max width of the SortBox if it's elastic
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">maxWidth</span>
|
||||
<span class="types"><span class="type">number</span></span>
|
||||
The maximum width in pixels to resize the SortBox to. Use 0 for unlimited.
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "sortbox:setMaxHeight"></a>
|
||||
<strong>sortbox:setMaxHeight(maxHeight)</strong>
|
||||
<a style="float:right;" href="../source/SortBox.lua.html#398">line 398</a>
|
||||
</dt>
|
||||
<dd>
|
||||
Set the max height of the SortBox if it's elastic
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">maxHeight</span>
|
||||
<span class="types"><span class="type">number</span></span>
|
||||
The maximum height in pixels to resize the SortBox to. Use 0 for unlimited.
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "sortbox:enableTimer"></a>
|
||||
<strong>sortbox:enableTimer()</strong>
|
||||
<a style="float:right;" href="../source/SortBox.lua.html#406">line 406</a>
|
||||
</dt>
|
||||
<dd>
|
||||
Starts the SortBox sorting and organizing itself on a timer
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "sortbox:disableTimer"></a>
|
||||
<strong>sortbox:disableTimer()</strong>
|
||||
<a style="float:right;" href="../source/SortBox.lua.html#417">line 417</a>
|
||||
</dt>
|
||||
<dd>
|
||||
Stops the SortBox from sorting and organizing itself on a timer
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "sortbox:setSortInterval"></a>
|
||||
<strong>sortbox:setSortInterval(sortInterval)</strong>
|
||||
<a style="float:right;" href="../source/SortBox.lua.html#425">line 425</a>
|
||||
</dt>
|
||||
<dd>
|
||||
Sets the sortInterval, or amount of time in milliseconds between auto sorting on a timer if timerSort is true
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">sortInterval</span>
|
||||
<span class="types"><span class="type">number</span></span>
|
||||
time in milliseconds between auto sorting if timerSort is true
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "sortbox:enableSort"></a>
|
||||
<strong>sortbox:enableSort()</strong>
|
||||
<a style="float:right;" href="../source/SortBox.lua.html#436">line 436</a>
|
||||
</dt>
|
||||
<dd>
|
||||
Enables sorting when items are added/removed, or if timerSort is true, every sortInterval milliseconds
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "sortbox:disableSort"></a>
|
||||
<strong>sortbox:disableSort()</strong>
|
||||
<a style="float:right;" href="../source/SortBox.lua.html#442">line 442</a>
|
||||
</dt>
|
||||
<dd>
|
||||
Disables sorting when items are added or removed
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "sortbox:setBoxType"></a>
|
||||
<strong>sortbox:setBoxType(boxType)</strong>
|
||||
<a style="float:right;" href="../source/SortBox.lua.html#451">line 451</a>
|
||||
</dt>
|
||||
<dd>
|
||||
Set whether the SortBox acts as a VBox or HBox.
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">boxType</span>
|
||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a></span>
|
||||
If you pass 'h' or 'horizontal' it will act like an HBox. Anything else it will act like a VBox.
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Usage:</h3>
|
||||
<ul>
|
||||
<pre class="example">mySortBox:<span class="function-name">setBoxType</span>(<span class="string">"v"</span>) <span class="comment">-- behave like a VBox
|
||||
</span>mySortBox:<span class="function-name">setBoxType</span>(<span class="string">"h"</span>) <span class="comment">-- behave like an HBox
|
||||
</span>mySortBox:<span class="function-name">setBoxType</span>(<span class="string">"beeblebrox"</span>) <span class="comment">-- why?! Why would you do this? It'll behave like a VBox</span></pre>
|
||||
</ul>
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "sortbox:setSortFunction"></a>
|
||||
<strong>sortbox:setSortFunction(functionName)</strong>
|
||||
<a style="float:right;" href="../source/SortBox.lua.html#508">line 508</a>
|
||||
</dt>
|
||||
<dd>
|
||||
Sets the type of sorting in use by this SortBox.
|
||||
<br>If an item in the box does not have the appropriate property or function, then 999999999 is used for sorting except as otherwise noted.
|
||||
<br>If an invalid option is given, then existing H/VBox behaviour is maintained, just like if autoSort is false.
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">functionName</span>
|
||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a></span>
|
||||
what type of sorting should we use? See table below for valid options and their descriptions.
|
||||
<table class="tg">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>sort type</th>
|
||||
<th>description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="tg-1">gaugeValue</td>
|
||||
<td class="tg-1">sort gauges based on how full the gauge is, from less full to more</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tg-2">reverseGaugeValue</td>
|
||||
<td class="tg-2">sort gauges based on how full the gauge is, from more full to less</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tg-1">timeLeft</td>
|
||||
<td class="tg-1">sort TimerGauges based on the total time left in the gauge, from less time to more</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tg-2">reverseTimeLeft</td>
|
||||
<td class="tg-2">sort TimerGauges based on the total time left in the gauge, from more time to less</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tg-1">name</td>
|
||||
<td class="tg-1">sort any item (and mixed types) by name, alphabetically.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tg-2">reverseName</td>
|
||||
<td class="tg-2">sort any item (and mixed types) by name, reverse alphabetically.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tg-1">message</td>
|
||||
<td class="tg-1">sorts Labels based on their echoed message, alphabetically. If not a label, the empty string will be used</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tg-2">reverseMessage</td>
|
||||
<td class="tg-2">sorts Labels based on their echoed message, reverse alphabetically. If not a label, the empty string will be used</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Usage:</h3>
|
||||
<ul>
|
||||
<pre class="example">mySortBox:<span class="function-name">setSortFunction</span>(<span class="string">"gaugeValue"</span>)</pre>
|
||||
</ul>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
|
||||
</div> <!-- id="content" -->
|
||||
</div> <!-- id="main" -->
|
||||
<div id="about">
|
||||
<i>generated by <a href="http://github.com/lunarmodules/LDoc">LDoc 1.5.0</a></i>
|
||||
<i style="float:right;">Last updated 2023-05-29 18:41:27 </i>
|
||||
</div> <!-- id="about" -->
|
||||
</div> <!-- id="container" -->
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,622 +0,0 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
||||
<head>
|
||||
<title>Reference</title>
|
||||
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div id="container">
|
||||
|
||||
<div id="product">
|
||||
<div id="product_logo"></div>
|
||||
<div id="product_name"><big><b></b></big></div>
|
||||
<div id="product_description"></div>
|
||||
</div> <!-- id="product" -->
|
||||
|
||||
|
||||
<div id="main">
|
||||
|
||||
|
||||
<!-- Menu -->
|
||||
|
||||
<div id="navigation">
|
||||
<br/>
|
||||
<h1>MDK</h1>
|
||||
|
||||
|
||||
<ul>
|
||||
<li><a href="../index.html">Index</a></li>
|
||||
</ul>
|
||||
|
||||
<h2>Contents</h2>
|
||||
<ul>
|
||||
<li><a href="#Methods">Methods</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h2>Classes</h2>
|
||||
<ul class="nowrap">
|
||||
<li><a href="../classes/aliasmgr.html">aliasmgr</a></li>
|
||||
<li><a href="../classes/Chyron.html">Chyron</a></li>
|
||||
<li><a href="../classes/EMCO.html">EMCO</a></li>
|
||||
<li><a href="../classes/LoggingConsole.html">LoggingConsole</a></li>
|
||||
<li><a href="../classes/Loginator.html">Loginator</a></li>
|
||||
<li><a href="../classes/MasterMindSolver.html">MasterMindSolver</a></li>
|
||||
<li><a href="../classes/revisionator.html">revisionator</a></li>
|
||||
<li><a href="../classes/SortBox.html">SortBox</a></li>
|
||||
<li><a href="../classes/spinbox.html">spinbox</a></li>
|
||||
<li><a href="../classes/SUG.html">SUG</a></li>
|
||||
<li><strong>TextGauge</strong></li>
|
||||
<li><a href="../classes/TimerGauge.html">TimerGauge</a></li>
|
||||
</ul>
|
||||
<h2>Modules</h2>
|
||||
<ul class="nowrap">
|
||||
<li><a href="../modules/demontools.html">demontools</a></li>
|
||||
<li><a href="../modules/echofile.html">echofile</a></li>
|
||||
<li><a href="../modules/figlet.html">figlet</a></li>
|
||||
<li><a href="../modules/ftext.html">ftext</a></li>
|
||||
<li><a href="../modules/GradientMaker.html">GradientMaker</a></li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
|
||||
<h1>Class <code>TextGauge</code></h1>
|
||||
<p>Creates a text based gauge, for use in miniconsoles and the like.</p>
|
||||
<p></p>
|
||||
<h3>Info:</h3>
|
||||
<ul>
|
||||
<li><strong>Copyright</strong>: 2020 Damian Monogue,2021 Damian Monogue</li>
|
||||
<li><strong>License</strong>: MIT, see LICENSE.lua</li>
|
||||
<li><strong>Author</strong>: Damian Monogue <demonnic@gmail.com></li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h2><a href="#Methods">Methods</a></h2>
|
||||
<table class="function_list">
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#textgauge:new">textgauge:new([options])</a></td>
|
||||
<td class="summary">Creates a new TextGauge.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#textgauge:setWidth">textgauge:setWidth(width)</a></td>
|
||||
<td class="summary">Sets the width in characters of the gauge</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#textgauge:setFillCharacter">textgauge:setFillCharacter(character)</a></td>
|
||||
<td class="summary">Sets the character to use for the 'full' part of the gauge</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#textgauge:setOverflowCharacter">textgauge:setOverflowCharacter(character)</a></td>
|
||||
<td class="summary">Sets the character to use for the 'overflow' (>100%) part of the gauge</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#textgauge:setEmptyCharacter">textgauge:setEmptyCharacter(character)</a></td>
|
||||
<td class="summary">Sets the character to use for the 'full' part of the gauge</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#textgauge:setFillColor">textgauge:setFillColor(color)</a></td>
|
||||
<td class="summary">Sets the fill color for the gauge.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#textgauge:setOverflowColor">textgauge:setOverflowColor(color)</a></td>
|
||||
<td class="summary">Sets the overflow color for the gauge.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#textgauge:setEmptyColor">textgauge:setEmptyColor(color)</a></td>
|
||||
<td class="summary">Sets the empty color for the gauge.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#textgauge:setPercentColor">textgauge:setPercentColor(color)</a></td>
|
||||
<td class="summary">Sets the fill color for the gauge.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#textgauge:setPercentSymbolColor">textgauge:setPercentSymbolColor(color)</a></td>
|
||||
<td class="summary">Sets the fill color for the gauge.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#textgauge:enableReverse">textgauge:enableReverse()</a></td>
|
||||
<td class="summary">Enables reversing the fill direction (right to left instead of the usual left to right)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#textgauge:disableReverse">textgauge:disableReverse()</a></td>
|
||||
<td class="summary">Disables reversing the fill direction (go back to the usual left to right)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#textgauge:enableShowPercent">textgauge:enableShowPercent()</a></td>
|
||||
<td class="summary">Enables showing the percent value of the gauge</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#textgauge:disableShowPercent">textgauge:disableShowPercent()</a></td>
|
||||
<td class="summary">Disables showing the percent value of the gauge</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#textgauge:enableShowPercentSymbol">textgauge:enableShowPercentSymbol()</a></td>
|
||||
<td class="summary">Enables showing the percent symbol (appears after the value)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#textgauge:disableShowPercentSymbol">textgauge:disableShowPercentSymbol()</a></td>
|
||||
<td class="summary">Enables showing the percent symbol (appears after the value)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#textgauge:setValue">textgauge:setValue([current[, max]])</a></td>
|
||||
<td class="summary">Used to set the gauge's value and return the string representation of the gauge</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#textgauge:print">textgauge:print(...)</a></td>
|
||||
<td class="summary">Synonym for setValue</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br/>
|
||||
<br/>
|
||||
|
||||
|
||||
<h2 class="section-header "><a name="Methods"></a>Methods</h2>
|
||||
|
||||
<dl class="function">
|
||||
<dt>
|
||||
<a name = "textgauge:new"></a>
|
||||
<strong>textgauge:new([options])</strong>
|
||||
<a style="float:right;" href="../source/TextGauge.lua.html#92">line 92</a>
|
||||
</dt>
|
||||
<dd>
|
||||
Creates a new TextGauge.
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">options</span>
|
||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.5">table</a></span>
|
||||
The table of options you would like the TextGauge to start with.
|
||||
<br><br>Table of new options
|
||||
<table class="tg">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>option name</th>
|
||||
<th>description</th>
|
||||
<th>default</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="tg-1">width</td>
|
||||
<td class="tg-1">How many characters wide to make the gauge</td>
|
||||
<td class="tg-1">24</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tg-2">fillCharacter</td>
|
||||
<td class="tg-2">What character to use for the 'full' part of the gauge</td>
|
||||
<td class="tg-2">:</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tg-1">overflowCharacter</td>
|
||||
<td class="tg-1">What character to use for >100% part of the gauge</td>
|
||||
<td class="tg-1">if not set, it uses whatever you set fillCharacter to</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tg-2">emptyCharacter</td>
|
||||
<td class="tg-2">What character to use for the 'empty' part of the gauge</td>
|
||||
<td class="tg-2">-</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tg-1">showPercentSymbol</td>
|
||||
<td class="tg-1">Should we show the % sign itself?</td>
|
||||
<td class="tg-1">true</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tg-2">showPercent</td>
|
||||
<td class="tg-2">Should we show what % of the gauge is filled?</td>
|
||||
<td class="tg-2">true</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tg-1">value</td>
|
||||
<td class="tg-1">How much of the gauge should be filled</td>
|
||||
<td class="tg-1">50</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tg-2">format</td>
|
||||
<td class="tg-2">What type of color formatting to use? 'c' for cecho, 'd' for decho, 'h' for hecho</td>
|
||||
<td class="tg-2">c</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tg-1">fillColor</td>
|
||||
<td class="tg-1">What color to make the full part of the bar?</td>
|
||||
<td class="tg-1">"DarkOrange" or equivalent for your format type</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tg-2">emptyColor</td>
|
||||
<td class="tg-2">what color to use for the empty part of the bar?</td>
|
||||
<td class="tg-2">"white" or format appropriate equivalent</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tg-1">percentColor</td>
|
||||
<td class="tg-1">What color to print the percentage numvers in, if shown?</td>
|
||||
<td class="tg-1">"white" or fortmat appropriate equivalent</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tg-2">percentSymbolColor</td>
|
||||
<td class="tg-2">What color to make the % if shown?</td>
|
||||
<td class="tg-2">If not set, uses what percentColor is set to.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tg-1">overflowColor</td>
|
||||
<td class="tg-1">What color to make the >100% portion of the bar?</td>
|
||||
<td class="tg-1">If not set, will use the same color as fillColor</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
(<em>optional</em>)
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Usage:</h3>
|
||||
<ul>
|
||||
<pre class="example"><span class="keyword">local</span> TextGauge = <span class="global">require</span>(<span class="string">"MDK.textgauge"</span>)
|
||||
myTextGauge = TextGauge:<span class="function-name">new</span>()
|
||||
gaugeText = myTextGauge:<span class="function-name">setValue</span>(<span class="number">382</span>, <span class="number">830</span>)</pre>
|
||||
</ul>
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "textgauge:setWidth"></a>
|
||||
<strong>textgauge:setWidth(width)</strong>
|
||||
<a style="float:right;" href="../source/TextGauge.lua.html#105">line 105</a>
|
||||
</dt>
|
||||
<dd>
|
||||
Sets the width in characters of the gauge
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">width</span>
|
||||
<span class="types"><span class="type">number</span></span>
|
||||
number of characters wide to make the gauge
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "textgauge:setFillCharacter"></a>
|
||||
<strong>textgauge:setFillCharacter(character)</strong>
|
||||
<a style="float:right;" href="../source/TextGauge.lua.html#118">line 118</a>
|
||||
</dt>
|
||||
<dd>
|
||||
Sets the character to use for the 'full' part of the gauge
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">character</span>
|
||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a></span>
|
||||
the character to use.
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "textgauge:setOverflowCharacter"></a>
|
||||
<strong>textgauge:setOverflowCharacter(character)</strong>
|
||||
<a style="float:right;" href="../source/TextGauge.lua.html#126">line 126</a>
|
||||
</dt>
|
||||
<dd>
|
||||
Sets the character to use for the 'overflow' (>100%) part of the gauge
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">character</span>
|
||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a></span>
|
||||
the character to use.
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "textgauge:setEmptyCharacter"></a>
|
||||
<strong>textgauge:setEmptyCharacter(character)</strong>
|
||||
<a style="float:right;" href="../source/TextGauge.lua.html#134">line 134</a>
|
||||
</dt>
|
||||
<dd>
|
||||
Sets the character to use for the 'full' part of the gauge
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">character</span>
|
||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a></span>
|
||||
the character to use.
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "textgauge:setFillColor"></a>
|
||||
<strong>textgauge:setFillColor(color)</strong>
|
||||
<a style="float:right;" href="../source/TextGauge.lua.html#142">line 142</a>
|
||||
</dt>
|
||||
<dd>
|
||||
Sets the fill color for the gauge.
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">color</span>
|
||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a></span>
|
||||
the color to use for the full portion of the gauge. Will be run through Geyser.Golor
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "textgauge:setOverflowColor"></a>
|
||||
<strong>textgauge:setOverflowColor(color)</strong>
|
||||
<a style="float:right;" href="../source/TextGauge.lua.html#149">line 149</a>
|
||||
</dt>
|
||||
<dd>
|
||||
Sets the overflow color for the gauge.
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">color</span>
|
||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a></span>
|
||||
the color to use for the full portion of the gauge. Will be run through Geyser.Golor
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "textgauge:setEmptyColor"></a>
|
||||
<strong>textgauge:setEmptyColor(color)</strong>
|
||||
<a style="float:right;" href="../source/TextGauge.lua.html#156">line 156</a>
|
||||
</dt>
|
||||
<dd>
|
||||
Sets the empty color for the gauge.
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">color</span>
|
||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a></span>
|
||||
the color to use for the empty portion of the gauge. Will be run through Geyser.Golor
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "textgauge:setPercentColor"></a>
|
||||
<strong>textgauge:setPercentColor(color)</strong>
|
||||
<a style="float:right;" href="../source/TextGauge.lua.html#163">line 163</a>
|
||||
</dt>
|
||||
<dd>
|
||||
Sets the fill color for the gauge.
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">color</span>
|
||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a></span>
|
||||
the color to use for the numeric value. Will be run through Geyser.Golor
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "textgauge:setPercentSymbolColor"></a>
|
||||
<strong>textgauge:setPercentSymbolColor(color)</strong>
|
||||
<a style="float:right;" href="../source/TextGauge.lua.html#169">line 169</a>
|
||||
</dt>
|
||||
<dd>
|
||||
Sets the fill color for the gauge.
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">color</span>
|
||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a></span>
|
||||
the color to use for the numeric value. Will be run through Geyser.Golor
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "textgauge:enableReverse"></a>
|
||||
<strong>textgauge:enableReverse()</strong>
|
||||
<a style="float:right;" href="../source/TextGauge.lua.html#175">line 175</a>
|
||||
</dt>
|
||||
<dd>
|
||||
Enables reversing the fill direction (right to left instead of the usual left to right)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "textgauge:disableReverse"></a>
|
||||
<strong>textgauge:disableReverse()</strong>
|
||||
<a style="float:right;" href="../source/TextGauge.lua.html#180">line 180</a>
|
||||
</dt>
|
||||
<dd>
|
||||
Disables reversing the fill direction (go back to the usual left to right)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "textgauge:enableShowPercent"></a>
|
||||
<strong>textgauge:enableShowPercent()</strong>
|
||||
<a style="float:right;" href="../source/TextGauge.lua.html#185">line 185</a>
|
||||
</dt>
|
||||
<dd>
|
||||
Enables showing the percent value of the gauge
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "textgauge:disableShowPercent"></a>
|
||||
<strong>textgauge:disableShowPercent()</strong>
|
||||
<a style="float:right;" href="../source/TextGauge.lua.html#190">line 190</a>
|
||||
</dt>
|
||||
<dd>
|
||||
Disables showing the percent value of the gauge
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "textgauge:enableShowPercentSymbol"></a>
|
||||
<strong>textgauge:enableShowPercentSymbol()</strong>
|
||||
<a style="float:right;" href="../source/TextGauge.lua.html#195">line 195</a>
|
||||
</dt>
|
||||
<dd>
|
||||
Enables showing the percent symbol (appears after the value)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "textgauge:disableShowPercentSymbol"></a>
|
||||
<strong>textgauge:disableShowPercentSymbol()</strong>
|
||||
<a style="float:right;" href="../source/TextGauge.lua.html#200">line 200</a>
|
||||
</dt>
|
||||
<dd>
|
||||
Enables showing the percent symbol (appears after the value)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "textgauge:setValue"></a>
|
||||
<strong>textgauge:setValue([current[, max]])</strong>
|
||||
<a style="float:right;" href="../source/TextGauge.lua.html#270">line 270</a>
|
||||
</dt>
|
||||
<dd>
|
||||
Used to set the gauge's value and return the string representation of the gauge
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">current</span>
|
||||
<span class="types"><span class="type">number</span></span>
|
||||
current value. If no value is passed it will use the stored value. Defaults to 50 to prevent errors.
|
||||
(<em>optional</em>)
|
||||
</li>
|
||||
<li><span class="parameter">max</span>
|
||||
<span class="types"><span class="type">number</span></span>
|
||||
maximum value. If not passed, the internally stored one will be used. Defaults to 100 so that it can be used with single values as a percent
|
||||
(<em>optional</em>)
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Usage:</h3>
|
||||
<ul>
|
||||
<li><pre class="example">myGauge:<span class="function-name">setValue</span>(<span class="number">55</span>) <span class="comment">-- sets the gauge to 55% full</span></pre></li>
|
||||
<li><pre class="example">myGauge:<span class="function-name">setValue</span>(<span class="number">2345</span>, <span class="number">2780</span>) <span class="comment">-- will figure out what the percentage fill is based on the given current/max values</span></pre></li>
|
||||
</ul>
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "textgauge:print"></a>
|
||||
<strong>textgauge:print(...)</strong>
|
||||
<a style="float:right;" href="../source/TextGauge.lua.html#331">line 331</a>
|
||||
</dt>
|
||||
<dd>
|
||||
Synonym for setValue
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">...</span>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
|
||||
</div> <!-- id="content" -->
|
||||
</div> <!-- id="main" -->
|
||||
<div id="about">
|
||||
<i>generated by <a href="http://github.com/lunarmodules/LDoc">LDoc 1.5.0</a></i>
|
||||
<i style="float:right;">Last updated 2023-05-29 18:41:27 </i>
|
||||
</div> <!-- id="about" -->
|
||||
</div> <!-- id="container" -->
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,631 +0,0 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
||||
<head>
|
||||
<title>Reference</title>
|
||||
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div id="container">
|
||||
|
||||
<div id="product">
|
||||
<div id="product_logo"></div>
|
||||
<div id="product_name"><big><b></b></big></div>
|
||||
<div id="product_description"></div>
|
||||
</div> <!-- id="product" -->
|
||||
|
||||
|
||||
<div id="main">
|
||||
|
||||
|
||||
<!-- Menu -->
|
||||
|
||||
<div id="navigation">
|
||||
<br/>
|
||||
<h1>MDK</h1>
|
||||
|
||||
|
||||
<ul>
|
||||
<li><a href="../index.html">Index</a></li>
|
||||
</ul>
|
||||
|
||||
<h2>Contents</h2>
|
||||
<ul>
|
||||
<li><a href="#Methods">Methods</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h2>Classes</h2>
|
||||
<ul class="nowrap">
|
||||
<li><a href="../classes/aliasmgr.html">aliasmgr</a></li>
|
||||
<li><a href="../classes/Chyron.html">Chyron</a></li>
|
||||
<li><a href="../classes/EMCO.html">EMCO</a></li>
|
||||
<li><a href="../classes/LoggingConsole.html">LoggingConsole</a></li>
|
||||
<li><a href="../classes/Loginator.html">Loginator</a></li>
|
||||
<li><a href="../classes/MasterMindSolver.html">MasterMindSolver</a></li>
|
||||
<li><a href="../classes/revisionator.html">revisionator</a></li>
|
||||
<li><a href="../classes/SortBox.html">SortBox</a></li>
|
||||
<li><a href="../classes/spinbox.html">spinbox</a></li>
|
||||
<li><a href="../classes/SUG.html">SUG</a></li>
|
||||
<li><a href="../classes/TextGauge.html">TextGauge</a></li>
|
||||
<li><strong>TimerGauge</strong></li>
|
||||
</ul>
|
||||
<h2>Modules</h2>
|
||||
<ul class="nowrap">
|
||||
<li><a href="../modules/demontools.html">demontools</a></li>
|
||||
<li><a href="../modules/echofile.html">echofile</a></li>
|
||||
<li><a href="../modules/figlet.html">figlet</a></li>
|
||||
<li><a href="../modules/ftext.html">ftext</a></li>
|
||||
<li><a href="../modules/GradientMaker.html">GradientMaker</a></li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
|
||||
<h1>Class <code>TimerGauge</code></h1>
|
||||
<p>Animated countdown timer, extends <a href="https://www.mudlet.org/geyser/files/geyser/GeyserGauge.html">Geyser.Gauge</a></p>
|
||||
<p></p>
|
||||
<h3>Info:</h3>
|
||||
<ul>
|
||||
<li><strong>Copyright</strong>: 2020 Damian Monogue</li>
|
||||
<li><strong>License</strong>: MIT, see LICENSE.lua</li>
|
||||
<li><strong>Author</strong>: Damian Monogue <demonnic@gmail.com></li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h2><a href="#Methods">Methods</a></h2>
|
||||
<table class="function_list">
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#timergauge:show2">timergauge:show2()</a></td>
|
||||
<td class="summary">Shows the TimerGauge.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#timergauge:hide2">timergauge:hide2()</a></td>
|
||||
<td class="summary">Hides the TimerGauge.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#timergauge:start">timergauge:start([show])</a></td>
|
||||
<td class="summary">Starts the timergauge.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#timergauge:stop">timergauge:stop([hide])</a></td>
|
||||
<td class="summary">Stops the timergauge.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#timergauge:pause">timergauge:pause([hide])</a></td>
|
||||
<td class="summary">Alias for stop.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#timergauge:reset">timergauge:reset()</a></td>
|
||||
<td class="summary">Resets the time on the timergauge to its original value.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#timergauge:restart">timergauge:restart([show])</a></td>
|
||||
<td class="summary">Resets and starts the timergauge.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#timergauge:getTime">timergauge:getTime(format)</a></td>
|
||||
<td class="summary">Get the amount of time remaining on the timer, in seconds</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#timergauge:finish">timergauge:finish([skipHook])</a></td>
|
||||
<td class="summary">Sets the timer's remaining time to 0, stops it, and executes the hook if one exists.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#timergauge:setTime">timergauge:setTime(time)</a></td>
|
||||
<td class="summary">Sets the amount of time the timer will run for.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#timergauge:setUpdateTime">timergauge:setUpdateTime(updateTime)</a></td>
|
||||
<td class="summary">Changes the time between gauge updates.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#timergauge:new">timergauge:new(cons, parent)</a></td>
|
||||
<td class="summary">Creates a new TimerGauge instance.</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br/>
|
||||
<br/>
|
||||
|
||||
|
||||
<h2 class="section-header "><a name="Methods"></a>Methods</h2>
|
||||
|
||||
<dl class="function">
|
||||
<dt>
|
||||
<a name = "timergauge:show2"></a>
|
||||
<strong>timergauge:show2()</strong>
|
||||
<a style="float:right;" href="../source/TimerGauge.lua.html#40">line 40</a>
|
||||
</dt>
|
||||
<dd>
|
||||
Shows the TimerGauge. If the manageContainer property is true, then will add it back to its container
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "timergauge:hide2"></a>
|
||||
<strong>timergauge:hide2()</strong>
|
||||
<a style="float:right;" href="../source/TimerGauge.lua.html#49">line 49</a>
|
||||
</dt>
|
||||
<dd>
|
||||
Hides the TimerGauge. If manageContainer property is true, then it will remove it from its container and if the container is an HBox or VBox it will initiate size/position management
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "timergauge:start"></a>
|
||||
<strong>timergauge:start([show])</strong>
|
||||
<a style="float:right;" href="../source/TimerGauge.lua.html#70">line 70</a>
|
||||
</dt>
|
||||
<dd>
|
||||
Starts the timergauge. Works whether the timer is stopped or not. Does not start a timer which is already at 0
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">show</span>
|
||||
<span class="types"><span class="type">boolean</span></span>
|
||||
override the autoShow property. True will always show, false will never show.
|
||||
(<em>optional</em>)
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Usage:</h3>
|
||||
<ul>
|
||||
<pre class="example">myTimerGauge:<span class="function-name">start</span>() <span class="comment">--starts the timer, will show or not based on autoShow property
|
||||
</span>myTimerGauge:<span class="function-name">start</span>(<span class="keyword">false</span>) <span class="comment">--starts the timer, will not change hidden status, regardless of autoShow property
|
||||
</span>myTimerGauge:<span class="function-name">start</span>(<span class="keyword">true</span>) <span class="comment">--starts the timer, will show it regardless of autoShow property</span></pre>
|
||||
</ul>
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "timergauge:stop"></a>
|
||||
<strong>timergauge:stop([hide])</strong>
|
||||
<a style="float:right;" href="../source/TimerGauge.lua.html#94">line 94</a>
|
||||
</dt>
|
||||
<dd>
|
||||
Stops the timergauge. Works whether the timer is started or not.
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">hide</span>
|
||||
<span class="types"><span class="type">boolean</span></span>
|
||||
override the autoHide property. True will always hide, false will never hide.
|
||||
(<em>optional</em>)
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Usage:</h3>
|
||||
<ul>
|
||||
<pre class="example">myTimerGauge:<span class="function-name">stop</span>() <span class="comment">--stops the timer, will hide or not based on autoHide property
|
||||
</span>myTimerGauge:<span class="function-name">stop</span>(<span class="keyword">false</span>) <span class="comment">--stops the timer, will not change hidden status, regardless of autoHide property
|
||||
</span>myTimerGauge:<span class="function-name">stop</span>(<span class="keyword">true</span>) <span class="comment">--stops the timer, will hide it regardless of autoHide property</span></pre>
|
||||
</ul>
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "timergauge:pause"></a>
|
||||
<strong>timergauge:pause([hide])</strong>
|
||||
<a style="float:right;" href="../source/TimerGauge.lua.html#111">line 111</a>
|
||||
</dt>
|
||||
<dd>
|
||||
Alias for stop.
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">hide</span>
|
||||
<span class="types"><span class="type">boolean</span></span>
|
||||
override the autoHide property. True will always hide, false will never hide.
|
||||
(<em>optional</em>)
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "timergauge:reset"></a>
|
||||
<strong>timergauge:reset()</strong>
|
||||
<a style="float:right;" href="../source/TimerGauge.lua.html#116">line 116</a>
|
||||
</dt>
|
||||
<dd>
|
||||
Resets the time on the timergauge to its original value. Does not alter the running state of the timer
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "timergauge:restart"></a>
|
||||
<strong>timergauge:restart([show])</strong>
|
||||
<a style="float:right;" href="../source/TimerGauge.lua.html#127">line 127</a>
|
||||
</dt>
|
||||
<dd>
|
||||
Resets and starts the timergauge.
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">show</span>
|
||||
<span class="types"><span class="type">boolean</span></span>
|
||||
override the autoShow property. true will always show, false will never show
|
||||
(<em>optional</em>)
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Usage:</h3>
|
||||
<ul>
|
||||
<pre class="example">myTimerGauge:<span class="function-name">restart</span>() <span class="comment">--restarts the timer, will show or not based on autoShow property
|
||||
</span>myTimerGauge:<span class="function-name">restart</span>(<span class="keyword">false</span>) <span class="comment">--restarts the timer, will not change hidden status, regardless of autoShow property
|
||||
</span>myTimerGauge:<span class="function-name">restart</span>(<span class="keyword">true</span>) <span class="comment">--restarts the timer, will show it regardless of autoShow property</span></pre>
|
||||
</ul>
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "timergauge:getTime"></a>
|
||||
<strong>timergauge:getTime(format)</strong>
|
||||
<a style="float:right;" href="../source/TimerGauge.lua.html#197">line 197</a>
|
||||
</dt>
|
||||
<dd>
|
||||
Get the amount of time remaining on the timer, in seconds
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">format</span>
|
||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a></span>
|
||||
Format string for how to return the time. If not provided defaults to self.timeFormat(which defaults to "S.t").<br>
|
||||
If "" is passed will return "" as the time. See below table for formatting codes<br>
|
||||
<table class="tg">
|
||||
<tr>
|
||||
<th>format code</th>
|
||||
<th>what it is replaced with</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tg-1">S</td>
|
||||
<td class="tg-1">Time left in seconds, unbroken down. Does not include milliseconds.<br>
|
||||
IE a timer with 2 minutes left it would replace S with 120
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tg-2">dd</td>
|
||||
<td class="tg-2">Days, with 1 leading 0 (0, 01, 02-...)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tg-1">d</td>
|
||||
<td class="tg-1">Days, with no leading 0 (1,2,3-...)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tg-2">hh</td>
|
||||
<td class="tg-2">hours, with leading 0 (00-24)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tg-1">h</td>
|
||||
<td class="tg-1">hours, without leading 0 (0-24)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tg-2">MM</td>
|
||||
<td class="tg-2">minutes, with a leading 0 (00-59)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tg-1">M</td>
|
||||
<td class="tg-1">minutes, no leading 0 (0-59)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tg-2">ss</td>
|
||||
<td class="tg-2">seconds, with leading 0 (00-59)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tg-1">s</td>
|
||||
<td class="tg-1">seconds, no leading 0 (0-59)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tg-2">t</td>
|
||||
<td class="tg-2">tenths of a second<br>
|
||||
timer with 12.345 seconds left, t would<br>
|
||||
br replaced by 3.
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tg-1">mm</td>
|
||||
<td class="tg-1">milliseconds with leadings 0s (000-999)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tg-2">m</td>
|
||||
<td class="tg-2">milliseconds with no leading 0s (0-999)</td>
|
||||
</tr>
|
||||
</table><br>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Usage:</h3>
|
||||
<ul>
|
||||
<pre class="example">myTimerGauge:<span class="function-name">getTime</span>() <span class="comment">--returns the time using myTimerGauge.format
|
||||
</span>myTimerGauge:<span class="function-name">getTime</span>(<span class="string">"hh:MM:ss"</span>) <span class="comment">--returns the time as hours, minutes, and seconds, with leading 0s (01:23:04)
|
||||
</span>myTimerGauge:<span class="function-name">getTime</span>(<span class="string">"S.mm"</span>) <span class="comment">--returns the time as the total number of seconds, including milliseconds (114.004)</span></pre>
|
||||
</ul>
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "timergauge:finish"></a>
|
||||
<strong>timergauge:finish([skipHook])</strong>
|
||||
<a style="float:right;" href="../source/TimerGauge.lua.html#263">line 263</a>
|
||||
</dt>
|
||||
<dd>
|
||||
Sets the timer's remaining time to 0, stops it, and executes the hook if one exists.
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">skipHook</span>
|
||||
<span class="types"><span class="type">boolean</span></span>
|
||||
use true to have it set the timer to 0 and stop, but not execute the hook.
|
||||
(<em>optional</em>)
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Usage:</h3>
|
||||
<ul>
|
||||
<pre class="example">myTimerGauge:<span class="function-name">finish</span>() <span class="comment">--executes the hook if it has one
|
||||
</span> myTimerGauge:<span class="function-name">finish</span>(<span class="keyword">false</span>) <span class="comment">--will not execute the hook</span></pre>
|
||||
</ul>
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "timergauge:setTime"></a>
|
||||
<strong>timergauge:setTime(time)</strong>
|
||||
<a style="float:right;" href="../source/TimerGauge.lua.html#294">line 294</a>
|
||||
</dt>
|
||||
<dd>
|
||||
Sets the amount of time the timer will run for. Make sure to call :reset() or :restart()
|
||||
if you want to cause the timer to run for that amount of time. If you set it to a time lower
|
||||
than the time left on the timer currently, it will reset the current time, otherwise it is left alone
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">time</span>
|
||||
<span class="types"><span class="type">number</span></span>
|
||||
how long in seconds the timer should run for
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Usage:</h3>
|
||||
<ul>
|
||||
<pre class="example">myTimerGauge:<span class="function-name">setTime</span>(<span class="number">50</span>) <span class="comment">-- sets myTimerGauge's max time to 50.</span></pre>
|
||||
</ul>
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "timergauge:setUpdateTime"></a>
|
||||
<strong>timergauge:setUpdateTime(updateTime)</strong>
|
||||
<a style="float:right;" href="../source/TimerGauge.lua.html#318">line 318</a>
|
||||
</dt>
|
||||
<dd>
|
||||
Changes the time between gauge updates.
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">updateTime</span>
|
||||
<span class="types"><span class="type">number</span></span>
|
||||
amount of time in milliseconds between gauge updates. Must be a positive number.
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "timergauge:new"></a>
|
||||
<strong>timergauge:new(cons, parent)</strong>
|
||||
<a style="float:right;" href="../source/TimerGauge.lua.html#474">line 474</a>
|
||||
</dt>
|
||||
<dd>
|
||||
Creates a new TimerGauge instance.
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">cons</span>
|
||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.5">table</a></span>
|
||||
a table of options (or constraints) for how the TimerGauge will behave. Valid options include:
|
||||
<br>
|
||||
<table class="tg">
|
||||
<tr>
|
||||
<th>name</th>
|
||||
<th>description</th>
|
||||
<th>default</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tg-1">time</td>
|
||||
<td class="tg-1">how long the timer should run for</td>
|
||||
<td class="tg-1"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tg-2">active</td>
|
||||
<td class="tg-2">whether the timer should run or not</td>
|
||||
<td class="tg-2">true</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tg-1">showTime</td>
|
||||
<td class="tg-1">should we show the time remaining on the gauge?</td>
|
||||
<td class="tg-1">true</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tg-2">prefix</td>
|
||||
<td class="tg-2">text you want shown before the time.</td>
|
||||
<td class="tg-2">""</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tg-1">suffix</td>
|
||||
<td class="tg-1">text you want shown after the time.</td>
|
||||
<td class="tg-1">""</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tg-2">timerCaption</td>
|
||||
<td class="tg-2">Alias for suffix. Deprecated and may be remove in the future</td>
|
||||
<td class="tg-2"/>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tg-1">updateTime</td>
|
||||
<td class="tg-1">number of milliseconds between gauge updates.</td>
|
||||
<td class="tg-1">10</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tg-2">autoHide</td>
|
||||
<td class="tg-2">should the timer :hide() itself when it runs out/you stop it?</td>
|
||||
<td class="tg-2">true</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tg-1">autoShow</td>
|
||||
<td class="tg-1">should the timer :show() itself when you start it?</td>
|
||||
<td class="tg-1">true</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tg-2">manageContainer</td>
|
||||
<td class="tg-2">should the timer remove itself from its container when you call <br>:hide() and add itself back when you call :show()?</td>
|
||||
<td class="tg-2">false</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tg-1">timeFormat</td>
|
||||
<td class="tg-1">how should the time be displayed/returned if you call :getTime()? <br>See table below for more information</td>
|
||||
<td class="tg-1">"S.t"</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>Table of time format options
|
||||
<table class="tg">
|
||||
<tr>
|
||||
<th>format code</th>
|
||||
<th>what it is replaced with</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tg-1">S</td>
|
||||
<td class="tg-1">Time left in seconds, unbroken down. Does not include milliseconds.<br>
|
||||
IE a timer with 2 minutes left it would replace S with 120
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tg-2">dd</td>
|
||||
<td class="tg-2">Days, with 1 leading 0 (0, 01, 02-...)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tg-1">d</td>
|
||||
<td class="tg-1">Days, with no leading 0 (1,2,3-...)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tg-2">hh</td>
|
||||
<td class="tg-2">hours, with leading 0 (00-24)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tg-1">h</td>
|
||||
<td class="tg-1">hours, without leading 0 (0-24)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tg-2">MM</td>
|
||||
<td class="tg-2">minutes, with a leading 0 (00-59)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tg-1">M</td>
|
||||
<td class="tg-1">minutes, no leading 0 (0-59)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tg-2">ss</td>
|
||||
<td class="tg-2">seconds, with leading 0 (00-59)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tg-1">s</td>
|
||||
<td class="tg-1">seconds, no leading 0 (0-59)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tg-2">t</td>
|
||||
<td class="tg-2">tenths of a second<br>
|
||||
timer with 12.345 seconds left, t would<br>
|
||||
br replaced by 3.
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tg-1">mm</td>
|
||||
<td class="tg-1">milliseconds with leadings 0s (000-999)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tg-2">m</td>
|
||||
<td class="tg-2">milliseconds with no leading 0s (0-999)</td>
|
||||
</tr>
|
||||
</table><br>
|
||||
</li>
|
||||
<li><span class="parameter">parent</span>
|
||||
The Geyser parent for this TimerGauge
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Usage:</h3>
|
||||
<ul>
|
||||
<pre class="example"><span class="keyword">local</span> TimerGauge = <span class="global">require</span>(<span class="string">"MDK.timergauge"</span>)
|
||||
myTimerGauge = TimerGauge:<span class="function-name">new</span>({
|
||||
name = <span class="string">"testGauge"</span>,
|
||||
x = <span class="number">100</span>,
|
||||
y = <span class="number">100</span>,
|
||||
height = <span class="number">40</span>,
|
||||
width = <span class="number">200</span>,
|
||||
time = <span class="number">10</span>
|
||||
})</pre>
|
||||
</ul>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
|
||||
</div> <!-- id="content" -->
|
||||
</div> <!-- id="main" -->
|
||||
<div id="about">
|
||||
<i>generated by <a href="http://github.com/lunarmodules/LDoc">LDoc 1.5.0</a></i>
|
||||
<i style="float:right;">Last updated 2023-05-29 18:41:27 </i>
|
||||
</div> <!-- id="about" -->
|
||||
</div> <!-- id="container" -->
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,415 +0,0 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
||||
<head>
|
||||
<title>Reference</title>
|
||||
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div id="container">
|
||||
|
||||
<div id="product">
|
||||
<div id="product_logo"></div>
|
||||
<div id="product_name"><big><b></b></big></div>
|
||||
<div id="product_description"></div>
|
||||
</div> <!-- id="product" -->
|
||||
|
||||
|
||||
<div id="main">
|
||||
|
||||
|
||||
<!-- Menu -->
|
||||
|
||||
<div id="navigation">
|
||||
<br/>
|
||||
<h1>MDK</h1>
|
||||
|
||||
|
||||
<ul>
|
||||
<li><a href="../index.html">Index</a></li>
|
||||
</ul>
|
||||
|
||||
<h2>Contents</h2>
|
||||
<ul>
|
||||
<li><a href="#Methods">Methods</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h2>Classes</h2>
|
||||
<ul class="nowrap">
|
||||
<li><strong>aliasmgr</strong></li>
|
||||
<li><a href="../classes/Chyron.html">Chyron</a></li>
|
||||
<li><a href="../classes/EMCO.html">EMCO</a></li>
|
||||
<li><a href="../classes/LoggingConsole.html">LoggingConsole</a></li>
|
||||
<li><a href="../classes/Loginator.html">Loginator</a></li>
|
||||
<li><a href="../classes/MasterMindSolver.html">MasterMindSolver</a></li>
|
||||
<li><a href="../classes/revisionator.html">revisionator</a></li>
|
||||
<li><a href="../classes/SortBox.html">SortBox</a></li>
|
||||
<li><a href="../classes/spinbox.html">spinbox</a></li>
|
||||
<li><a href="../classes/SUG.html">SUG</a></li>
|
||||
<li><a href="../classes/TextGauge.html">TextGauge</a></li>
|
||||
<li><a href="../classes/TimerGauge.html">TimerGauge</a></li>
|
||||
</ul>
|
||||
<h2>Modules</h2>
|
||||
<ul class="nowrap">
|
||||
<li><a href="../modules/demontools.html">demontools</a></li>
|
||||
<li><a href="../modules/echofile.html">echofile</a></li>
|
||||
<li><a href="../modules/figlet.html">figlet</a></li>
|
||||
<li><a href="../modules/ftext.html">ftext</a></li>
|
||||
<li><a href="../modules/GradientMaker.html">GradientMaker</a></li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
|
||||
<h1>Class <code>aliasmgr</code></h1>
|
||||
<p>Alias Manager</p>
|
||||
<p></p>
|
||||
<h3>Info:</h3>
|
||||
<ul>
|
||||
<li><strong>Copyright</strong>: 2022 Damian Monogue</li>
|
||||
<li><strong>License</strong>: MIT, see LICENSE.lua</li>
|
||||
<li><strong>Author</strong>: Damian Monogue <demonnic@gmail.com></li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h2><a href="#Methods">Methods</a></h2>
|
||||
<table class="function_list">
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#aliasmgr:new">aliasmgr:new()</a></td>
|
||||
<td class="summary">Creates a new alias manager</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#aliasmgr:register">aliasmgr:register(name, regex, func)</a></td>
|
||||
<td class="summary">Registers an alias with the alias manager</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#aliasmgr:add">aliasmgr:add(name, regex, func)</a></td>
|
||||
<td class="summary">Registers an alias with the alias manager.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#aliasmgr:disable">aliasmgr:disable(name)</a></td>
|
||||
<td class="summary">Disables an alias, but does not delete it so it can be enabled later without being redefined</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#aliasmgr:disableAll">aliasmgr:disableAll()</a></td>
|
||||
<td class="summary">Disables all aliases registered with the manager</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#aliasmgr:enable">aliasmgr:enable(name)</a></td>
|
||||
<td class="summary">Enables an alias by name</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#aliasmgr:enableAll">aliasmgr:enableAll()</a></td>
|
||||
<td class="summary">Enables all aliases registered with the manager</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#aliasmgr:kill">aliasmgr:kill(name)</a></td>
|
||||
<td class="summary">Kill an alias, deleting it from the manager</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#aliasmgr:killAll">aliasmgr:killAll()</a></td>
|
||||
<td class="summary">Kills all aliases registered with the manager, clearing it out</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#aliasmgr:delete">aliasmgr:delete(name)</a></td>
|
||||
<td class="summary">Kills an alias, deleting it from the manager</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#aliasmgr:deleteAll">aliasmgr:deleteAll()</a></td>
|
||||
<td class="summary">Kills all aliases, deleting them from the manager</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#aliasmgr:getAliases">aliasmgr:getAliases()</a></td>
|
||||
<td class="summary">Returns the list of aliases and the information being tracked for them</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br/>
|
||||
<br/>
|
||||
|
||||
|
||||
<h2 class="section-header "><a name="Methods"></a>Methods</h2>
|
||||
|
||||
<dl class="function">
|
||||
<dt>
|
||||
<a name = "aliasmgr:new"></a>
|
||||
<strong>aliasmgr:new()</strong>
|
||||
<a style="float:right;" href="../source/aliasmgr.lua.html#10">line 10</a>
|
||||
</dt>
|
||||
<dd>
|
||||
Creates a new alias manager
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "aliasmgr:register"></a>
|
||||
<strong>aliasmgr:register(name, regex, func)</strong>
|
||||
<a style="float:right;" href="../source/aliasmgr.lua.html#27">line 27</a>
|
||||
</dt>
|
||||
<dd>
|
||||
Registers an alias with the alias manager
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">name</span>
|
||||
the name for the alias
|
||||
</li>
|
||||
<li><span class="parameter">regex</span>
|
||||
the regular expression the alias matches against
|
||||
</li>
|
||||
<li><span class="parameter">func</span>
|
||||
The code to run when the alias matches. Can wrap code in [[ ]] or pass an actual function
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "aliasmgr:add"></a>
|
||||
<strong>aliasmgr:add(name, regex, func)</strong>
|
||||
<a style="float:right;" href="../source/aliasmgr.lua.html#63">line 63</a>
|
||||
</dt>
|
||||
<dd>
|
||||
Registers an alias with the alias manager. Alias for register
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">name</span>
|
||||
the name for the alias
|
||||
</li>
|
||||
<li><span class="parameter">regex</span>
|
||||
the regular expression the alias matches against
|
||||
</li>
|
||||
<li><span class="parameter">func</span>
|
||||
The code to run when the alias matches. Can wrap code in [[ ]] or pass an actual function
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
<h3>See also:</h3>
|
||||
<ul>
|
||||
<a href="../classes/aliasmgr.html#aliasmgr:register">register</a>
|
||||
</ul>
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "aliasmgr:disable"></a>
|
||||
<strong>aliasmgr:disable(name)</strong>
|
||||
<a style="float:right;" href="../source/aliasmgr.lua.html#70">line 70</a>
|
||||
</dt>
|
||||
<dd>
|
||||
Disables an alias, but does not delete it so it can be enabled later without being redefined
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">name</span>
|
||||
the name of the alias to disable
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
true if the alias exists and gets disabled, false if it does not exist or is already disabled
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "aliasmgr:disableAll"></a>
|
||||
<strong>aliasmgr:disableAll()</strong>
|
||||
<a style="float:right;" href="../source/aliasmgr.lua.html#86">line 86</a>
|
||||
</dt>
|
||||
<dd>
|
||||
Disables all aliases registered with the manager
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "aliasmgr:enable"></a>
|
||||
<strong>aliasmgr:enable(name)</strong>
|
||||
<a style="float:right;" href="../source/aliasmgr.lua.html#96">line 96</a>
|
||||
</dt>
|
||||
<dd>
|
||||
Enables an alias by name
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">name</span>
|
||||
the name of the alias to enable
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
true if the alias exists and was enabled, false if it does not exist.
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "aliasmgr:enableAll"></a>
|
||||
<strong>aliasmgr:enableAll()</strong>
|
||||
<a style="float:right;" href="../source/aliasmgr.lua.html#110">line 110</a>
|
||||
</dt>
|
||||
<dd>
|
||||
Enables all aliases registered with the manager
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "aliasmgr:kill"></a>
|
||||
<strong>aliasmgr:kill(name)</strong>
|
||||
<a style="float:right;" href="../source/aliasmgr.lua.html#121">line 121</a>
|
||||
</dt>
|
||||
<dd>
|
||||
Kill an alias, deleting it from the manager
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">name</span>
|
||||
the name of the alias to kill
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
true if the alias exists and gets deleted, false if the alias does not exist
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "aliasmgr:killAll"></a>
|
||||
<strong>aliasmgr:killAll()</strong>
|
||||
<a style="float:right;" href="../source/aliasmgr.lua.html#137">line 137</a>
|
||||
</dt>
|
||||
<dd>
|
||||
Kills all aliases registered with the manager, clearing it out
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "aliasmgr:delete"></a>
|
||||
<strong>aliasmgr:delete(name)</strong>
|
||||
<a style="float:right;" href="../source/aliasmgr.lua.html#148">line 148</a>
|
||||
</dt>
|
||||
<dd>
|
||||
Kills an alias, deleting it from the manager
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">name</span>
|
||||
the name of the alias to delete
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
true if the alias exists and gets deleted, false if the alias does not exist
|
||||
</ol>
|
||||
|
||||
|
||||
<h3>See also:</h3>
|
||||
<ul>
|
||||
<a href="../classes/aliasmgr.html#aliasmgr:kill">kill</a>
|
||||
</ul>
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "aliasmgr:deleteAll"></a>
|
||||
<strong>aliasmgr:deleteAll()</strong>
|
||||
<a style="float:right;" href="../source/aliasmgr.lua.html#154">line 154</a>
|
||||
</dt>
|
||||
<dd>
|
||||
Kills all aliases, deleting them from the manager
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>See also:</h3>
|
||||
<ul>
|
||||
<a href="../classes/aliasmgr.html#aliasmgr:killAll">killAll</a>
|
||||
</ul>
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "aliasmgr:getAliases"></a>
|
||||
<strong>aliasmgr:getAliases()</strong>
|
||||
<a style="float:right;" href="../source/aliasmgr.lua.html#160">line 160</a>
|
||||
</dt>
|
||||
<dd>
|
||||
Returns the list of aliases and the information being tracked for them
|
||||
|
||||
|
||||
|
||||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
the table of alias information, with names as keys and a table of information as the values.
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
|
||||
</div> <!-- id="content" -->
|
||||
</div> <!-- id="main" -->
|
||||
<div id="about">
|
||||
<i>generated by <a href="http://github.com/lunarmodules/LDoc">LDoc 1.5.0</a></i>
|
||||
<i style="float:right;">Last updated 2023-05-29 18:41:27 </i>
|
||||
</div> <!-- id="about" -->
|
||||
</div> <!-- id="container" -->
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,252 +0,0 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
||||
<head>
|
||||
<title>Reference</title>
|
||||
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div id="container">
|
||||
|
||||
<div id="product">
|
||||
<div id="product_logo"></div>
|
||||
<div id="product_name"><big><b></b></big></div>
|
||||
<div id="product_description"></div>
|
||||
</div> <!-- id="product" -->
|
||||
|
||||
|
||||
<div id="main">
|
||||
|
||||
|
||||
<!-- Menu -->
|
||||
|
||||
<div id="navigation">
|
||||
<br/>
|
||||
<h1>MDK</h1>
|
||||
|
||||
|
||||
<ul>
|
||||
<li><a href="../index.html">Index</a></li>
|
||||
</ul>
|
||||
|
||||
<h2>Contents</h2>
|
||||
<ul>
|
||||
<li><a href="#Methods">Methods</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h2>Classes</h2>
|
||||
<ul class="nowrap">
|
||||
<li><a href="../classes/aliasmgr.html">aliasmgr</a></li>
|
||||
<li><a href="../classes/Chyron.html">Chyron</a></li>
|
||||
<li><a href="../classes/EMCO.html">EMCO</a></li>
|
||||
<li><a href="../classes/LoggingConsole.html">LoggingConsole</a></li>
|
||||
<li><a href="../classes/Loginator.html">Loginator</a></li>
|
||||
<li><a href="../classes/MasterMindSolver.html">MasterMindSolver</a></li>
|
||||
<li><strong>revisionator</strong></li>
|
||||
<li><a href="../classes/SortBox.html">SortBox</a></li>
|
||||
<li><a href="../classes/spinbox.html">spinbox</a></li>
|
||||
<li><a href="../classes/SUG.html">SUG</a></li>
|
||||
<li><a href="../classes/TextGauge.html">TextGauge</a></li>
|
||||
<li><a href="../classes/TimerGauge.html">TimerGauge</a></li>
|
||||
</ul>
|
||||
<h2>Modules</h2>
|
||||
<ul class="nowrap">
|
||||
<li><a href="../modules/demontools.html">demontools</a></li>
|
||||
<li><a href="../modules/echofile.html">echofile</a></li>
|
||||
<li><a href="../modules/figlet.html">figlet</a></li>
|
||||
<li><a href="../modules/ftext.html">ftext</a></li>
|
||||
<li><a href="../modules/GradientMaker.html">GradientMaker</a></li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
|
||||
<h1>Class <code>revisionator</code></h1>
|
||||
<p>The revisionator provides a standardized way of migrating configurations between revisions
|
||||
for instance, it will track what the currently applied revision number is, and when you tell
|
||||
tell it to migrate, it will apply every individual migration between the currently applied
|
||||
revision and the latest/current revision.</p>
|
||||
<p> This should allow for more seamlessly moving from
|
||||
an older version of a package to a new one.</p>
|
||||
<h3>Info:</h3>
|
||||
<ul>
|
||||
<li><strong>Copyright</strong>: 2023</li>
|
||||
<li><strong>License</strong>: MIT, see https://raw.githubusercontent.com/demonnic/MDK/main/src/scripts/LICENSE.lua</li>
|
||||
<li><strong>Author</strong>: Damian Monogue <demonnic@gmail.com></li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h2><a href="#Methods">Methods</a></h2>
|
||||
<table class="function_list">
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#revisionator:new">revisionator:new(options)</a></td>
|
||||
<td class="summary">Creates a new revisionator</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#revisionator:getAppliedPatch">revisionator:getAppliedPatch()</a></td>
|
||||
<td class="summary">Get the currently applied revision from file</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#revisionator:migrate">revisionator:migrate()</a></td>
|
||||
<td class="summary">go through all the patches in order and apply any which are still necessary</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#revisionator:addPatch">revisionator:addPatch(func[, position])</a></td>
|
||||
<td class="summary">add a patch to the table of patches</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br/>
|
||||
<br/>
|
||||
|
||||
|
||||
<h2 class="section-header "><a name="Methods"></a>Methods</h2>
|
||||
|
||||
<dl class="function">
|
||||
<dt>
|
||||
<a name = "revisionator:new"></a>
|
||||
<strong>revisionator:new(options)</strong>
|
||||
<a style="float:right;" href="../source/revisionator.lua.html#47">line 47</a>
|
||||
</dt>
|
||||
<dd>
|
||||
Creates a new revisionator
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">options</span>
|
||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.5">table</a></span>
|
||||
the options to create the revisionator with.
|
||||
<table class="tg">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>option name</th>
|
||||
<th>description</th>
|
||||
<th>default</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="tg-1">name</td>
|
||||
<td class="tg-1">The name of the revisionator. This is absolutely required, as the name is used for tracking the currently applied patch level</td>
|
||||
<td class="tg-1">raises an error if not provided</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tg-2">patches</td>
|
||||
<td class="tg-2">A table of patch functions. It is traversed using ipairs, so must be in the form of {function1, function2, function3} etc. If you do not provide it, you can add the patches by calling :addPatch for each patch in order.</td>
|
||||
<td class="tg-2">{}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "revisionator:getAppliedPatch"></a>
|
||||
<strong>revisionator:getAppliedPatch()</strong>
|
||||
<a style="float:right;" href="../source/revisionator.lua.html#65">line 65</a>
|
||||
</dt>
|
||||
<dd>
|
||||
Get the currently applied revision from file
|
||||
|
||||
|
||||
|
||||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
<span class="types"><span class="type">number</span></span>
|
||||
the revision number currently applied, or 0 if it can't read a current version
|
||||
</ol>
|
||||
<h3>Or</h3>
|
||||
<ol>
|
||||
<li>
|
||||
<span class="types"><span class="type">nil</span></span>
|
||||
nil</li>
|
||||
<li>
|
||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a></span>
|
||||
error message</li>
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "revisionator:migrate"></a>
|
||||
<strong>revisionator:migrate()</strong>
|
||||
<a style="float:right;" href="../source/revisionator.lua.html#86">line 86</a>
|
||||
</dt>
|
||||
<dd>
|
||||
go through all the patches in order and apply any which are still necessary
|
||||
|
||||
|
||||
|
||||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
<span class="types"><span class="type">boolean</span></span>
|
||||
true if it successfully applied patches, false if it was already at the latest patch level
|
||||
</ol>
|
||||
<h3>Or</h3>
|
||||
<ol>
|
||||
<li>
|
||||
<span class="types"><span class="type">nil</span></span>
|
||||
</li>
|
||||
<li>
|
||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a></span>
|
||||
error message</li>
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "revisionator:addPatch"></a>
|
||||
<strong>revisionator:addPatch(func[, position])</strong>
|
||||
<a style="float:right;" href="../source/revisionator.lua.html#111">line 111</a>
|
||||
</dt>
|
||||
<dd>
|
||||
add a patch to the table of patches
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">func</span>
|
||||
<span class="types"><span class="type">function</span></span>
|
||||
the function to run as the patch
|
||||
</li>
|
||||
<li><span class="parameter">position</span>
|
||||
<span class="types"><span class="type">number</span></span>
|
||||
which patch to insert it as? If not supplied, inserts it as the last patch. Which is usually what you want.
|
||||
(<em>optional</em>)
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
|
||||
</div> <!-- id="content" -->
|
||||
</div> <!-- id="main" -->
|
||||
<div id="about">
|
||||
<i>generated by <a href="http://github.com/lunarmodules/LDoc">LDoc 1.5.0</a></i>
|
||||
<i style="float:right;">Last updated 2023-05-29 18:41:27 </i>
|
||||
</div> <!-- id="about" -->
|
||||
</div> <!-- id="container" -->
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,337 +0,0 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
||||
<head>
|
||||
<title>Reference</title>
|
||||
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div id="container">
|
||||
|
||||
<div id="product">
|
||||
<div id="product_logo"></div>
|
||||
<div id="product_name"><big><b></b></big></div>
|
||||
<div id="product_description"></div>
|
||||
</div> <!-- id="product" -->
|
||||
|
||||
|
||||
<div id="main">
|
||||
|
||||
|
||||
<!-- Menu -->
|
||||
|
||||
<div id="navigation">
|
||||
<br/>
|
||||
<h1>MDK</h1>
|
||||
|
||||
|
||||
<ul>
|
||||
<li><a href="../index.html">Index</a></li>
|
||||
</ul>
|
||||
|
||||
<h2>Contents</h2>
|
||||
<ul>
|
||||
<li><a href="#Methods">Methods</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h2>Classes</h2>
|
||||
<ul class="nowrap">
|
||||
<li><a href="../classes/aliasmgr.html">aliasmgr</a></li>
|
||||
<li><a href="../classes/Chyron.html">Chyron</a></li>
|
||||
<li><a href="../classes/EMCO.html">EMCO</a></li>
|
||||
<li><a href="../classes/LoggingConsole.html">LoggingConsole</a></li>
|
||||
<li><a href="../classes/Loginator.html">Loginator</a></li>
|
||||
<li><a href="../classes/MasterMindSolver.html">MasterMindSolver</a></li>
|
||||
<li><a href="../classes/revisionator.html">revisionator</a></li>
|
||||
<li><a href="../classes/SortBox.html">SortBox</a></li>
|
||||
<li><strong>spinbox</strong></li>
|
||||
<li><a href="../classes/SUG.html">SUG</a></li>
|
||||
<li><a href="../classes/TextGauge.html">TextGauge</a></li>
|
||||
<li><a href="../classes/TimerGauge.html">TimerGauge</a></li>
|
||||
</ul>
|
||||
<h2>Modules</h2>
|
||||
<ul class="nowrap">
|
||||
<li><a href="../modules/demontools.html">demontools</a></li>
|
||||
<li><a href="../modules/echofile.html">echofile</a></li>
|
||||
<li><a href="../modules/figlet.html">figlet</a></li>
|
||||
<li><a href="../modules/ftext.html">ftext</a></li>
|
||||
<li><a href="../modules/GradientMaker.html">GradientMaker</a></li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
|
||||
<h1>Class <code>spinbox</code></h1>
|
||||
<p>A Geyser object to create a spinbox for adjusting a number</p>
|
||||
<p></p>
|
||||
<h3>Info:</h3>
|
||||
<ul>
|
||||
<li><strong>Copyright</strong>: 2023</li>
|
||||
<li><strong>License</strong>: MIT, see https://raw.githubusercontent.com/demonnic/MDK/main/src/scripts/LICENSE.lua</li>
|
||||
<li><strong>Author</strong>: Damian Monogue <demonnic@gmail.com></li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h2><a href="#Methods">Methods</a></h2>
|
||||
<table class="function_list">
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#spinbox:new">spinbox:new(cons, container)</a></td>
|
||||
<td class="summary">Creates a new spinbox.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#spinbox:setValue">spinbox:setValue(value)</a></td>
|
||||
<td class="summary">Used to directly set the value of the spinbox.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#spinbox:generateStyles">spinbox:generateStyles()</a></td>
|
||||
<td class="summary">(Re)generates the stylesheets for the spinbox
|
||||
Should not need to call but if you change something and it doesn't take effect
|
||||
you can try calling this followed by applyStyles</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#spinbox:applyStyles">spinbox:applyStyles()</a></td>
|
||||
<td class="summary">Applies updated stylesheets to the components of the spinbox
|
||||
Should not need to call this directly</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#spinbox:setActiveButtonColor">spinbox:setActiveButtonColor(color)</a></td>
|
||||
<td class="summary">sets the color for active buttons on the spinbox</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#spinbox:setInactiveButtonColor">spinbox:setInactiveButtonColor(color)</a></td>
|
||||
<td class="summary">sets the color for inactive buttons on the spinbox</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#spinbox:setCallBack">spinbox:setCallBack(func)</a></td>
|
||||
<td class="summary">Set a callback function for the spinbox to call any time the value of the spinbox is changed
|
||||
the function will be called as func(self.value, self.name)</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br/>
|
||||
<br/>
|
||||
|
||||
|
||||
<h2 class="section-header "><a name="Methods"></a>Methods</h2>
|
||||
|
||||
<dl class="function">
|
||||
<dt>
|
||||
<a name = "spinbox:new"></a>
|
||||
<strong>spinbox:new(cons, container)</strong>
|
||||
<a style="float:right;" href="../source/spinbox.lua.html#89">line 89</a>
|
||||
</dt>
|
||||
<dd>
|
||||
Creates a new spinbox.
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">cons</span>
|
||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.5">table</a></span>
|
||||
a table containing the options for this spinbox.
|
||||
<table class="tg">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>option name</th>
|
||||
<th>description</th>
|
||||
<th>default</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="tg-1">min</td>
|
||||
<td class="tg-1">The minimum value for this spinbox</td>
|
||||
<td class="tg-1">0</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tg-2">max</td>
|
||||
<td class="tg-2">The maximum value for this spinbox</td>
|
||||
<td class="tg-2">10</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tg-1">activeButtonColor</td>
|
||||
<td class="tg-1">The color the up/down buttons should be when they are active/able to be used</td>
|
||||
<td class="tg-1">gray</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tg-2">inactiveButtonColor</td>
|
||||
<td class="tg-2">The color the up/down buttons should be when they are inactive/unable to be used</td>
|
||||
<td class="tg-2">dimgray</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tg-1">integer</td>
|
||||
<td class="tg-1">Boolean value. When true, values must always be integers (no decimal place)</td>
|
||||
<td class="tg-1">true</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tg-2">delta</td>
|
||||
<td class="tg-2">The amount to change the spinbox's value when the up or down button is pressed.</td>
|
||||
<td class="tg-2">1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tg-1">upArrowLocation</td>
|
||||
<td class="tg-1">The location of the up arrow image. Either a web URL where it can be downloaded, or the location on disk to read it from</td>
|
||||
<td class="tg-1">https://demonnic.github.io/image-assets/uparrow.png</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tg-2">downArrowLocation</td>
|
||||
<td class="tg-2">The location of the down arrow image. Either a web URL where it can be downloaded, or the location on disk to read it from</td>
|
||||
<td class="tg-2">https://demonnic.github.io/image-assets/downarrow.png</td>
|
||||
<tr>
|
||||
<td class="tg-1">callBack</td>
|
||||
<td class="tg-1">The function to run when the spinbox's value is updated. Is called with parameters (self.name, value, oldValue)</td>
|
||||
<td class="tg-1">nil</td>
|
||||
</tr>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</li>
|
||||
<li><span class="parameter">container</span>
|
||||
The Geyser container for this spinbox
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "spinbox:setValue"></a>
|
||||
<strong>spinbox:setValue(value)</strong>
|
||||
<a style="float:right;" href="../source/spinbox.lua.html#270">line 270</a>
|
||||
</dt>
|
||||
<dd>
|
||||
Used to directly set the value of the spinbox.
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">value</span>
|
||||
The new value to set
|
||||
Rounds the value to an integer if the spinbox is integer only.
|
||||
Checks if the new value is within the min/max range and clamps it if not.
|
||||
Updates the display label with the new value.
|
||||
Applies any styles that depend on the value.
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "spinbox:generateStyles"></a>
|
||||
<strong>spinbox:generateStyles()</strong>
|
||||
<a style="float:right;" href="../source/spinbox.lua.html#387">line 387</a>
|
||||
</dt>
|
||||
<dd>
|
||||
(Re)generates the stylesheets for the spinbox
|
||||
Should not need to call but if you change something and it doesn't take effect
|
||||
you can try calling this followed by applyStyles
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "spinbox:applyStyles"></a>
|
||||
<strong>spinbox:applyStyles()</strong>
|
||||
<a style="float:right;" href="../source/spinbox.lua.html#412">line 412</a>
|
||||
</dt>
|
||||
<dd>
|
||||
Applies updated stylesheets to the components of the spinbox
|
||||
Should not need to call this directly
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "spinbox:setActiveButtonColor"></a>
|
||||
<strong>spinbox:setActiveButtonColor(color)</strong>
|
||||
<a style="float:right;" href="../source/spinbox.lua.html#430">line 430</a>
|
||||
</dt>
|
||||
<dd>
|
||||
sets the color for active buttons on the spinbox
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">color</span>
|
||||
any valid color formatting string, such a "red" or "#880000" or "<128,0,0>" or a table of colors, like {128, 0,0}. See Geyser.Color.parse at https://www.mudlet.org/geyser/files/geyser/GeyserColor.html#Geyser.Color.parse
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "spinbox:setInactiveButtonColor"></a>
|
||||
<strong>spinbox:setInactiveButtonColor(color)</strong>
|
||||
<a style="float:right;" href="../source/spinbox.lua.html#445">line 445</a>
|
||||
</dt>
|
||||
<dd>
|
||||
sets the color for inactive buttons on the spinbox
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">color</span>
|
||||
any valid color formatting string, such a "<red>" or "red" or "<128,0,0>" or a table of colors, like {128, 0,0}. See Geyser.Color.parse at https://www.mudlet.org/geyser/files/geyser/GeyserColor.html#Geyser.Color.parse
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "spinbox:setCallBack"></a>
|
||||
<strong>spinbox:setCallBack(func)</strong>
|
||||
<a style="float:right;" href="../source/spinbox.lua.html#472">line 472</a>
|
||||
</dt>
|
||||
<dd>
|
||||
Set a callback function for the spinbox to call any time the value of the spinbox is changed
|
||||
the function will be called as func(self.value, self.name)
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">func</span>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
|
||||
</div> <!-- id="content" -->
|
||||
</div> <!-- id="main" -->
|
||||
<div id="about">
|
||||
<i>generated by <a href="http://github.com/lunarmodules/LDoc">LDoc 1.5.0</a></i>
|
||||
<i style="float:right;">Last updated 2023-05-29 18:41:27 </i>
|
||||
</div> <!-- id="about" -->
|
||||
</div> <!-- id="container" -->
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,237 +0,0 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
||||
<head>
|
||||
<title>Reference</title>
|
||||
<link rel="stylesheet" href="ldoc.css" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div id="container">
|
||||
|
||||
<div id="product">
|
||||
<div id="product_logo"></div>
|
||||
<div id="product_name"><big><b></b></big></div>
|
||||
<div id="product_description"></div>
|
||||
</div> <!-- id="product" -->
|
||||
|
||||
|
||||
<div id="main">
|
||||
|
||||
|
||||
<!-- Menu -->
|
||||
|
||||
<div id="navigation">
|
||||
<br/>
|
||||
<h1>MDK</h1>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h2>Modules</h2>
|
||||
<ul class="nowrap">
|
||||
<li><a href="modules/demontools.html">demontools</a></li>
|
||||
<li><a href="modules/echofile.html">echofile</a></li>
|
||||
<li><a href="modules/figlet.html">figlet</a></li>
|
||||
<li><a href="modules/ftext.html">ftext</a></li>
|
||||
<li><a href="modules/GradientMaker.html">GradientMaker</a></li>
|
||||
</ul>
|
||||
<h2>Classes</h2>
|
||||
<ul class="nowrap">
|
||||
<li><a href="classes/aliasmgr.html">aliasmgr</a></li>
|
||||
<li><a href="classes/Chyron.html">Chyron</a></li>
|
||||
<li><a href="classes/EMCO.html">EMCO</a></li>
|
||||
<li><a href="classes/LoggingConsole.html">LoggingConsole</a></li>
|
||||
<li><a href="classes/Loginator.html">Loginator</a></li>
|
||||
<li><a href="classes/MasterMindSolver.html">MasterMindSolver</a></li>
|
||||
<li><a href="classes/revisionator.html">revisionator</a></li>
|
||||
<li><a href="classes/SortBox.html">SortBox</a></li>
|
||||
<li><a href="classes/spinbox.html">spinbox</a></li>
|
||||
<li><a href="classes/SUG.html">SUG</a></li>
|
||||
<li><a href="classes/TextGauge.html">TextGauge</a></li>
|
||||
<li><a href="classes/TimerGauge.html">TimerGauge</a></li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
|
||||
|
||||
|
||||
<h2>Modules</h2>
|
||||
<table class="module_list">
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="modules/demontools.html">demontools</a></td>
|
||||
<td class="summary">Collection of miscellaneous functions and tools which don't necessarily warrant their own module/class</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="modules/echofile.html">echofile</a></td>
|
||||
<td class="summary">set of functions for echoing files to things.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="modules/figlet.html">figlet</a></td>
|
||||
<td class="summary">Figlet
|
||||
A module to read figlet fonts and produce figlet ascii art from text</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="modules/ftext.html">ftext</a></td>
|
||||
<td class="summary">ftext
|
||||
functions to format and print text, and the objects which use them</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="modules/GradientMaker.html">GradientMaker</a></td>
|
||||
<td class="summary">Module which provides for creating color gradients for your text.</td>
|
||||
</tr>
|
||||
</table>
|
||||
<h2>Classes</h2>
|
||||
<table class="module_list">
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="classes/aliasmgr.html">aliasmgr</a></td>
|
||||
<td class="summary">Alias Manager</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="classes/Chyron.html">Chyron</a></td>
|
||||
<td class="summary">Creates a label with a scrolling text element.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="classes/EMCO.html">EMCO</a></td>
|
||||
<td class="summary">Embeddable Multi Console Object.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="classes/LoggingConsole.html">LoggingConsole</a></td>
|
||||
<td class="summary">MiniConsole with logging capabilities</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="classes/Loginator.html">Loginator</a></td>
|
||||
<td class="summary">Loginator creates an object which allows you to log things to file at
|
||||
various severity levels, with the ability to only log items above a specific
|
||||
severity to file.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="classes/MasterMindSolver.html">MasterMindSolver</a></td>
|
||||
<td class="summary">Interactive object which helps you solve a Master Mind puzzle.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="classes/revisionator.html">revisionator</a></td>
|
||||
<td class="summary">The revisionator provides a standardized way of migrating configurations between revisions
|
||||
for instance, it will track what the currently applied revision number is, and when you tell
|
||||
tell it to migrate, it will apply every individual migration between the currently applied
|
||||
revision and the latest/current revision.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="classes/SortBox.html">SortBox</a></td>
|
||||
<td class="summary">An H/VBox alternative which can be set to either vertical or horizontal, and will autosort the windows</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="classes/spinbox.html">spinbox</a></td>
|
||||
<td class="summary">A Geyser object to create a spinbox for adjusting a number</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="classes/SUG.html">SUG</a></td>
|
||||
<td class="summary">Self Updating Gauge, extends <a href="https://www.mudlet.org/geyser/files/geyser/GeyserGauge.html">Geyser.Gauge</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="classes/TextGauge.html">TextGauge</a></td>
|
||||
<td class="summary">Creates a text based gauge, for use in miniconsoles and the like.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="classes/TimerGauge.html">TimerGauge</a></td>
|
||||
<td class="summary">Animated countdown timer, extends <a href="https://www.mudlet.org/geyser/files/geyser/GeyserGauge.html">Geyser.Gauge</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
<h2>Source</h2>
|
||||
<table class="module_list">
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="source/LICENSE.lua.html">LICENSE.lua</a></td>
|
||||
<td class="summary"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="source/aliasmgr.lua.html">aliasmgr.lua</a></td>
|
||||
<td class="summary"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="source/chyron.lua.html">chyron.lua</a></td>
|
||||
<td class="summary"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="source/demontools.lua.html">demontools.lua</a></td>
|
||||
<td class="summary"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="source/echofile.lua.html">echofile.lua</a></td>
|
||||
<td class="summary"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="source/emco.lua.html">emco.lua</a></td>
|
||||
<td class="summary"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="source/figlet.lua.html">figlet.lua</a></td>
|
||||
<td class="summary"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="source/ftext.lua.html">ftext.lua</a></td>
|
||||
<td class="summary"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="source/gradientmaker.lua.html">gradientmaker.lua</a></td>
|
||||
<td class="summary"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="source/loggingconsole.lua.html">loggingconsole.lua</a></td>
|
||||
<td class="summary"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="source/loginator.lua.html">loginator.lua</a></td>
|
||||
<td class="summary"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="source/mastermindsolver.lua.html">mastermindsolver.lua</a></td>
|
||||
<td class="summary"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="source/revisionator.lua.html">revisionator.lua</a></td>
|
||||
<td class="summary"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="source/schema.lua.html">schema.lua</a></td>
|
||||
<td class="summary"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="source/sortbox.lua.html">sortbox.lua</a></td>
|
||||
<td class="summary"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="source/spinbox.lua.html">spinbox.lua</a></td>
|
||||
<td class="summary"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="source/sug.lua.html">sug.lua</a></td>
|
||||
<td class="summary"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="source/ftext_spec.lua.html">ftext_spec.lua</a></td>
|
||||
<td class="summary"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="source/textgauge.lua.html">textgauge.lua</a></td>
|
||||
<td class="summary"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="source/timergauge.lua.html">timergauge.lua</a></td>
|
||||
<td class="summary"></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</div> <!-- id="content" -->
|
||||
</div> <!-- id="main" -->
|
||||
<div id="about">
|
||||
<i>generated by <a href="http://github.com/lunarmodules/LDoc">LDoc 1.5.0</a></i>
|
||||
<i style="float:right;">Last updated 2023-05-29 18:41:27 </i>
|
||||
</div> <!-- id="about" -->
|
||||
</div> <!-- id="container" -->
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,315 +0,0 @@
|
||||
/* BEGIN RESET
|
||||
|
||||
Copyright (c) 2010, Yahoo! Inc. All rights reserved.
|
||||
Code licensed under the BSD License:
|
||||
http://developer.yahoo.com/yui/license.html
|
||||
version: 2.8.2r1
|
||||
*/
|
||||
html {
|
||||
color: #ccc;
|
||||
background: #222;
|
||||
}
|
||||
body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,button,textarea,p,blockquote,th,td {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
table {
|
||||
border-collapse: collapse;
|
||||
border-spacing: 0;
|
||||
}
|
||||
fieldset,img {
|
||||
border: 0;
|
||||
}
|
||||
address,caption,cite,code,dfn,em,strong,th,var,optgroup {
|
||||
font-style: inherit;
|
||||
font-weight: inherit;
|
||||
}
|
||||
del,ins {
|
||||
text-decoration: none;
|
||||
}
|
||||
li {
|
||||
margin-left: 20px;
|
||||
}
|
||||
caption,th {
|
||||
text-align: left;
|
||||
}
|
||||
h1,h2,h3,h4,h5,h6 {
|
||||
font-size: 100%;
|
||||
font-weight: bold;
|
||||
}
|
||||
q:before,q:after {
|
||||
content: '';
|
||||
}
|
||||
abbr,acronym {
|
||||
border: 0;
|
||||
font-variant: normal;
|
||||
}
|
||||
sup {
|
||||
vertical-align: baseline;
|
||||
}
|
||||
sub {
|
||||
vertical-align: baseline;
|
||||
}
|
||||
legend {
|
||||
color: #000;
|
||||
}
|
||||
input,button,textarea,select,optgroup,option {
|
||||
font-family: inherit;
|
||||
font-size: inherit;
|
||||
font-style: inherit;
|
||||
font-weight: inherit;
|
||||
}
|
||||
input,button,textarea,select {*font-size:100%;
|
||||
}
|
||||
/* END RESET */
|
||||
|
||||
body {
|
||||
margin-left: 1em;
|
||||
margin-right: 1em;
|
||||
font-family: arial, helvetica, geneva, sans-serif;
|
||||
background-color: #222222; margin: 0px;
|
||||
}
|
||||
|
||||
code, tt { font-family: monospace; font-size: 1.1em; }
|
||||
span.parameter { font-family:monospace; }
|
||||
span.parameter:after { content:":"; }
|
||||
span.types:before { content:"("; }
|
||||
span.types:after { content:")"; }
|
||||
.type { font-weight: bold; font-style:italic }
|
||||
|
||||
body, p, td, th { font-size: .95em; line-height: 1.2em;}
|
||||
|
||||
p, ul { margin: 10px 0 0 0px;}
|
||||
|
||||
strong { font-weight: bold;}
|
||||
|
||||
em { font-style: italic;}
|
||||
|
||||
h1 {
|
||||
font-size: 1.5em;
|
||||
margin: 20px 0 20px 0;
|
||||
}
|
||||
h2, h3, h4 { margin: 15px 0 10px 0; }
|
||||
h2 { font-size: 1.25em; }
|
||||
h3 { font-size: 1.15em; }
|
||||
h4 { font-size: 1.06em; }
|
||||
|
||||
a:link { font-weight: bold; color: #2266ee; text-decoration: none; }
|
||||
a:visited { font-weight: bold; color: #0099bb; text-decoration: none; }
|
||||
a:link:hover { text-decoration: underline; }
|
||||
|
||||
hr {
|
||||
color:#cccccc;
|
||||
background: #00007f;
|
||||
height: 1px;
|
||||
}
|
||||
|
||||
blockquote { margin-left: 3em; }
|
||||
|
||||
ul { list-style-type: disc; }
|
||||
|
||||
p.name {
|
||||
font-family: "Andale Mono", monospace;
|
||||
padding-top: 1em;
|
||||
}
|
||||
|
||||
pre {
|
||||
background-color: #000000;
|
||||
border: 1px solid #C0C0C0; /* silver */
|
||||
padding: 10px;
|
||||
margin: 10px 0 10px 0;
|
||||
overflow: auto;
|
||||
font-family: "Andale Mono", monospace;
|
||||
}
|
||||
|
||||
pre.example {
|
||||
font-size: .85em;
|
||||
}
|
||||
|
||||
table.index { border: 1px #00007f; }
|
||||
table.index td { text-align: left; vertical-align: top; }
|
||||
|
||||
#container {
|
||||
margin-left: 1em;
|
||||
margin-right: 1em;
|
||||
background-color: #222222;
|
||||
}
|
||||
|
||||
#product {
|
||||
text-align: center;
|
||||
border-bottom: 1px solid #cccccc;
|
||||
background-color: #222222;
|
||||
}
|
||||
|
||||
#product big {
|
||||
font-size: 2em;
|
||||
}
|
||||
|
||||
#main {
|
||||
background-color: #222222;
|
||||
border-left: 2px solid #cccccc;
|
||||
}
|
||||
|
||||
#navigation {
|
||||
float: left;
|
||||
width: 14em;
|
||||
vertical-align: top;
|
||||
background-color: #222222;
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
#navigation h1 {
|
||||
color: #cccccc;
|
||||
font-size: 1.5em;
|
||||
margin: 20px 0 20px 0;
|
||||
}
|
||||
|
||||
#navigation h2 {
|
||||
background-color:#333333;
|
||||
font-size:1.1em;
|
||||
color:#cccccc;
|
||||
text-align: left;
|
||||
padding:0.2em;
|
||||
border-top:1px solid #dddddd;
|
||||
border-bottom:1px solid #dddddd;
|
||||
}
|
||||
|
||||
#navigation ul
|
||||
{
|
||||
font-size:1em;
|
||||
list-style-type: none;
|
||||
margin: 1px 1px 10px 1px;
|
||||
}
|
||||
|
||||
#navigation li {
|
||||
text-indent: -1em;
|
||||
display: block;
|
||||
margin: 3px 0px 0px 22px;
|
||||
}
|
||||
|
||||
#navigation li li a {
|
||||
margin: 0px 3px 0px -1em;
|
||||
}
|
||||
|
||||
#content {
|
||||
margin-left: 14em;
|
||||
padding: 1em;
|
||||
border-left: 2px solid #cccccc;
|
||||
border-right: 2px solid #cccccc;
|
||||
background-color: #222222;
|
||||
}
|
||||
|
||||
#about {
|
||||
clear: both;
|
||||
padding: 5px;
|
||||
border-top: 2px solid #cccccc;
|
||||
background-color: #222222;
|
||||
}
|
||||
|
||||
@media print {
|
||||
body {
|
||||
font: 12pt "Times New Roman", "TimeNR", Times, serif;
|
||||
}
|
||||
a { font-weight: bold; color: #004080; text-decoration: underline; }
|
||||
|
||||
#main {
|
||||
background-color: #ffffff;
|
||||
border-left: 0px;
|
||||
}
|
||||
|
||||
#container {
|
||||
margin-left: 2%;
|
||||
margin-right: 2%;
|
||||
background-color: #ffffff;
|
||||
}
|
||||
|
||||
#content {
|
||||
padding: 1em;
|
||||
background-color: #ffffff;
|
||||
}
|
||||
|
||||
#navigation {
|
||||
display: none;
|
||||
}
|
||||
pre.example {
|
||||
font-family: "Andale Mono", monospace;
|
||||
font-size: 10pt;
|
||||
page-break-inside: avoid;
|
||||
}
|
||||
}
|
||||
|
||||
table.module_list {
|
||||
border-width: 1px;
|
||||
border-style: solid;
|
||||
border-color: #cccccc;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
table.module_list td {
|
||||
border-width: 1px;
|
||||
padding: 3px;
|
||||
border-style: solid;
|
||||
border-color: #cccccc;
|
||||
}
|
||||
table.module_list td.name { background-color: #222222; min-width: 200px; }
|
||||
table.module_list td.summary { width: 100%; }
|
||||
|
||||
|
||||
table.function_list {
|
||||
border-width: 1px;
|
||||
border-style: solid;
|
||||
border-color: #cccccc;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
table.function_list td {
|
||||
border-width: 1px;
|
||||
padding: 3px;
|
||||
border-style: solid;
|
||||
border-color: #cccccc;
|
||||
}
|
||||
table.function_list td.name { background-color: #222222; min-width: 200px; }
|
||||
table.function_list td.summary { width: 100%; }
|
||||
|
||||
ul.nowrap {
|
||||
overflow:auto;
|
||||
white-space:nowrap;
|
||||
}
|
||||
|
||||
dl.table dt, dl.function dt {border-top: 1px solid #ccc; padding-top: 1em;}
|
||||
dl.table dd, dl.function dd {padding-bottom: 1em; margin: 10px 0 0 20px;}
|
||||
dl.table h3, dl.function h3 {font-size: .95em;}
|
||||
|
||||
/* stop sublists from having initial vertical space */
|
||||
ul ul { margin-top: 0px; }
|
||||
ol ul { margin-top: 0px; }
|
||||
ol ol { margin-top: 0px; }
|
||||
ul ol { margin-top: 0px; }
|
||||
|
||||
/* make the target distinct; helps when we're navigating to a function */
|
||||
a:target + * {
|
||||
background-color: #060;
|
||||
}
|
||||
|
||||
|
||||
/* styles for prettification of source */
|
||||
pre .comment { color: #558817; }
|
||||
pre .constant { color: #a8660d; }
|
||||
pre .escape { color: #844631; }
|
||||
pre .keyword { color: #aa5050; font-weight: bold; }
|
||||
pre .library { color: #0e7c6b; }
|
||||
pre .marker { color: #512b1e; background: #fedc56; font-weight: bold; }
|
||||
pre .string { color: #8080ff; }
|
||||
pre .number { color: #f8660d; }
|
||||
pre .operator { color: #2239a8; font-weight: bold; }
|
||||
pre .preprocessor, pre .prepro { color: #a33243; }
|
||||
pre .global { color: #800080; }
|
||||
pre .user-keyword { color: #800080; }
|
||||
pre .prompt { color: #558817; }
|
||||
pre .url { color: #272fc2; text-decoration: underline; }
|
||||
|
||||
.tg {border-collapse:collapse;border-color:#ccc;border-spacing:0;}
|
||||
.tg td{background-color:#8b8b8b;border-color:#ccc;border-style:solid;border-width:1px;color:#000;
|
||||
font-family:Arial, sans-serif;font-size:14px;overflow:hidden;padding:10px 5px;word-break:normal;}
|
||||
.tg th{background-color:#000000;border-color:#ccc;border-style:solid;border-width:1px;color:#FFF;
|
||||
font-family:Arial, sans-serif;font-size:14px;font-weight:normal;overflow:hidden;padding:10px 5px;word-break:normal;}
|
||||
.tg .tg-2{background-color:#797979;border-color:inherit;text-align:left;vertical-align:top;color:#DDD}
|
||||
.tg .tg-1{background-color:#8b8b8b;border-color:#ccc;border-style:solid;border-width:1px;color:#000;text-align:left;vertical-align:top}
|
||||
@@ -1,422 +0,0 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
||||
<head>
|
||||
<title>Reference</title>
|
||||
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div id="container">
|
||||
|
||||
<div id="product">
|
||||
<div id="product_logo"></div>
|
||||
<div id="product_name"><big><b></b></big></div>
|
||||
<div id="product_description"></div>
|
||||
</div> <!-- id="product" -->
|
||||
|
||||
|
||||
<div id="main">
|
||||
|
||||
|
||||
<!-- Menu -->
|
||||
|
||||
<div id="navigation">
|
||||
<br/>
|
||||
<h1>MDK</h1>
|
||||
|
||||
|
||||
<ul>
|
||||
<li><a href="../index.html">Index</a></li>
|
||||
</ul>
|
||||
|
||||
<h2>Contents</h2>
|
||||
<ul>
|
||||
<li><a href="#Functions">Functions</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h2>Modules</h2>
|
||||
<ul class="nowrap">
|
||||
<li><a href="../modules/demontools.html">demontools</a></li>
|
||||
<li><a href="../modules/echofile.html">echofile</a></li>
|
||||
<li><a href="../modules/figlet.html">figlet</a></li>
|
||||
<li><a href="../modules/ftext.html">ftext</a></li>
|
||||
<li><strong>GradientMaker</strong></li>
|
||||
</ul>
|
||||
<h2>Classes</h2>
|
||||
<ul class="nowrap">
|
||||
<li><a href="../classes/aliasmgr.html">aliasmgr</a></li>
|
||||
<li><a href="../classes/Chyron.html">Chyron</a></li>
|
||||
<li><a href="../classes/EMCO.html">EMCO</a></li>
|
||||
<li><a href="../classes/LoggingConsole.html">LoggingConsole</a></li>
|
||||
<li><a href="../classes/Loginator.html">Loginator</a></li>
|
||||
<li><a href="../classes/MasterMindSolver.html">MasterMindSolver</a></li>
|
||||
<li><a href="../classes/revisionator.html">revisionator</a></li>
|
||||
<li><a href="../classes/SortBox.html">SortBox</a></li>
|
||||
<li><a href="../classes/spinbox.html">spinbox</a></li>
|
||||
<li><a href="../classes/SUG.html">SUG</a></li>
|
||||
<li><a href="../classes/TextGauge.html">TextGauge</a></li>
|
||||
<li><a href="../classes/TimerGauge.html">TimerGauge</a></li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
|
||||
<h1>Module <code>GradientMaker</code></h1>
|
||||
<p>Module which provides for creating color gradients for your text.</p>
|
||||
<p>
|
||||
Original functions found on <a href="https://forums.lusternia.com/discussion/3261/anyone-want-text-gradients">the Lusternia Forums</a>
|
||||
<br> I added functions to work with hecho.
|
||||
<br> I also made performance enhancements by storing already calculated gradients after first use for the session and only including the colorcode in the returned string if the color changed.</p>
|
||||
<h3>Info:</h3>
|
||||
<ul>
|
||||
<li><strong>Copyright</strong>: 2018 Sylphas,2020 Damian Monogue</li>
|
||||
<li><strong>Author</strong>: Sylphas on the Lusternia forums,Damian Monogue <demonnic@gmail.com></li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h2><a href="#Functions">Functions</a></h2>
|
||||
<table class="function_list">
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#color_name">color_name(r, g, b)</a></td>
|
||||
<td class="summary">Returns the closest color name to a given r,g,b color</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#dgradient">dgradient(text, first_color, second_color, next_color)</a></td>
|
||||
<td class="summary">Returns the text, with the defined color gradients applied and formatted for us with decho.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#cgradient">cgradient(text, first_color, second_color, next_color)</a></td>
|
||||
<td class="summary">Returns the text, with the defined color gradients applied and formatted for us with cecho.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#hgradient">hgradient(text, first_color, second_color, next_color)</a></td>
|
||||
<td class="summary">Returns the text, with the defined color gradients applied and formatted for us with hecho.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#cgradient_table">cgradient_table(text, first_color, second_color, next_color)</a></td>
|
||||
<td class="summary">Returns a table, each element of which is a table, the first element of which is the color name to use and the character which should be that color</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#dgradient_table">dgradient_table(text, first_color, second_color, next_color)</a></td>
|
||||
<td class="summary">Returns a table, each element of which is a table, the first element of which is the color({r,g,b} format) to use and the character which should be that color</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#hgradient_table">hgradient_table(text, first_color, second_color, next_color)</a></td>
|
||||
<td class="summary">Returns a table, each element of which is a table, the first element of which is the color(in hex) to use and the second element of which is the character which should be that color</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#install_global">install_global()</a></td>
|
||||
<td class="summary">Creates global copies of the c/d/hgradient(_table) functions and color_name for use without accessing the module table</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br/>
|
||||
<br/>
|
||||
|
||||
|
||||
<h2 class="section-header "><a name="Functions"></a>Functions</h2>
|
||||
|
||||
<dl class="function">
|
||||
<dt>
|
||||
<a name = "color_name"></a>
|
||||
<strong>color_name(r, g, b)</strong>
|
||||
<a style="float:right;" href="../source/GradientMaker.lua.html#228">line 228</a>
|
||||
</dt>
|
||||
<dd>
|
||||
Returns the closest color name to a given r,g,b color
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">r</span>
|
||||
The red component. Can also pass the full color as a table, IE { 255, 0, 0 }
|
||||
</li>
|
||||
<li><span class="parameter">g</span>
|
||||
The green component. If you pass the color as a table as noted above, this param should be empty
|
||||
</li>
|
||||
<li><span class="parameter">b</span>
|
||||
the blue components. If you pass the color as a table as noted above, this param should be empty
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Usage:</h3>
|
||||
<ul>
|
||||
<pre class="example">closest_color = GradientMaker.<span class="function-name">color_name</span>(<span class="number">128</span>,<span class="number">200</span>,<span class="number">30</span>) <span class="comment">-- returns "ansi_149"
|
||||
</span>closest_color = GradientMaker.<span class="function-name">color_name</span>({<span class="number">128</span>, <span class="number">200</span>, <span class="number">30</span>}) <span class="comment">-- this is functionally equivalent to the first one</span></pre>
|
||||
</ul>
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "dgradient"></a>
|
||||
<strong>dgradient(text, first_color, second_color, next_color)</strong>
|
||||
<a style="float:right;" href="../source/GradientMaker.lua.html#244">line 244</a>
|
||||
</dt>
|
||||
<dd>
|
||||
Returns the text, with the defined color gradients applied and formatted for us with decho. Usage example below produces the following text
|
||||
<br><img src="https://demonnic.github.io/mdk/images/dechogradient.png" alt="dgradient example">
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">text</span>
|
||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a></span>
|
||||
The text you want to apply the color gradients to
|
||||
</li>
|
||||
<li><span class="parameter">first_color</span>
|
||||
The color you want it to start at. Table of colors in { r, g, b } format
|
||||
</li>
|
||||
<li><span class="parameter">second_color</span>
|
||||
The color you want the gradient to transition to first. Table of colors in { r, g, b } format
|
||||
</li>
|
||||
<li><span class="parameter">next_color</span>
|
||||
Keep repeating if you want it to transition from the second color to a third, then a third to a fourth, etc
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
<h3>See also:</h3>
|
||||
<ul>
|
||||
<li><a href="../modules/GradientMaker.html#cgradient">cgradient</a></li>
|
||||
<li><a href="../modules/GradientMaker.html#hgradient">hgradient</a></li>
|
||||
</ul>
|
||||
|
||||
<h3>Usage:</h3>
|
||||
<ul>
|
||||
<pre class="example"><span class="function-name">decho</span>(GradientMaker.<span class="function-name">dgradient</span>(<span class="string">"a luminescent butterly floats about lazily on brillant blue and lilac wings\n"</span>, {<span class="number">255</span>,<span class="number">0</span>,<span class="number">0</span>}, {<span class="number">255</span>,<span class="number">128</span>,<span class="number">0</span>}, {<span class="number">255</span>,<span class="number">255</span>,<span class="number">0</span>}, {<span class="number">0</span>,<span class="number">255</span>,<span class="number">0</span>}, {<span class="number">0</span>,<span class="number">255</span>,<span class="number">255</span>}, {<span class="number">0</span>,<span class="number">128</span>,<span class="number">255</span>}, {<span class="number">128</span>,<span class="number">0</span>,<span class="number">255</span>}))
|
||||
<span class="function-name">decho</span>(GradientMaker.<span class="function-name">dgradient</span>(<span class="string">"a luminescent butterly floats about lazily on brillant blue and lilac wings\n"</span>, {<span class="number">255</span>,<span class="number">0</span>,<span class="number">0</span>}, {<span class="number">0</span>,<span class="number">0</span>,<span class="number">255</span>}))
|
||||
<span class="function-name">decho</span>(GradientMaker.<span class="function-name">dgradient</span>(<span class="string">"a luminescent butterly floats about lazily on brillant blue and lilac wings\n"</span>, {<span class="number">50</span>,<span class="number">50</span>,<span class="number">50</span>}, {<span class="number">0</span>,<span class="number">255</span>,<span class="number">0</span>}, {<span class="number">50</span>,<span class="number">50</span>,<span class="number">50</span>}))</pre>
|
||||
</ul>
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "cgradient"></a>
|
||||
<strong>cgradient(text, first_color, second_color, next_color)</strong>
|
||||
<a style="float:right;" href="../source/GradientMaker.lua.html#260">line 260</a>
|
||||
</dt>
|
||||
<dd>
|
||||
Returns the text, with the defined color gradients applied and formatted for us with cecho. Usage example below produces the following text
|
||||
<br><img src="https://demonnic.github.io/mdk/images/cechogradient.png" alt="cgradient example">
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">text</span>
|
||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a></span>
|
||||
The text you want to apply the color gradients to
|
||||
</li>
|
||||
<li><span class="parameter">first_color</span>
|
||||
The color you want it to start at. Table of colors in { r, g, b } format
|
||||
</li>
|
||||
<li><span class="parameter">second_color</span>
|
||||
The color you want the gradient to transition to first. Table of colors in { r, g, b } format
|
||||
</li>
|
||||
<li><span class="parameter">next_color</span>
|
||||
Keep repeating if you want it to transition from the second color to a third, then a third to a fourth, etc
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
<h3>See also:</h3>
|
||||
<ul>
|
||||
<li><a href="../modules/GradientMaker.html#dgradient">dgradient</a></li>
|
||||
<li><a href="../modules/GradientMaker.html#hgradient">hgradient</a></li>
|
||||
</ul>
|
||||
|
||||
<h3>Usage:</h3>
|
||||
<ul>
|
||||
<pre class="example"><span class="function-name">cecho</span>(GradientMaker.<span class="function-name">cgradient</span>(<span class="string">"a luminescent butterly floats about lazily on brillant blue and lilac wings\n"</span>, {<span class="number">255</span>,<span class="number">0</span>,<span class="number">0</span>}, {<span class="number">255</span>,<span class="number">128</span>,<span class="number">0</span>}, {<span class="number">255</span>,<span class="number">255</span>,<span class="number">0</span>}, {<span class="number">0</span>,<span class="number">255</span>,<span class="number">0</span>}, {<span class="number">0</span>,<span class="number">255</span>,<span class="number">255</span>}, {<span class="number">0</span>,<span class="number">128</span>,<span class="number">255</span>}, {<span class="number">128</span>,<span class="number">0</span>,<span class="number">255</span>}))
|
||||
<span class="function-name">cecho</span>(GradientMaker.<span class="function-name">cgradient</span>(<span class="string">"a luminescent butterly floats about lazily on brillant blue and lilac wings\n"</span>, {<span class="number">255</span>,<span class="number">0</span>,<span class="number">0</span>}, {<span class="number">0</span>,<span class="number">0</span>,<span class="number">255</span>}))
|
||||
<span class="function-name">cecho</span>(GradientMaker.<span class="function-name">cgradient</span>(<span class="string">"a luminescent butterly floats about lazily on brillant blue and lilac wings\n"</span>, {<span class="number">50</span>,<span class="number">50</span>,<span class="number">50</span>}, {<span class="number">0</span>,<span class="number">255</span>,<span class="number">0</span>}, {<span class="number">50</span>,<span class="number">50</span>,<span class="number">50</span>}))</pre>
|
||||
</ul>
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "hgradient"></a>
|
||||
<strong>hgradient(text, first_color, second_color, next_color)</strong>
|
||||
<a style="float:right;" href="../source/GradientMaker.lua.html#276">line 276</a>
|
||||
</dt>
|
||||
<dd>
|
||||
Returns the text, with the defined color gradients applied and formatted for us with hecho. Usage example below produces the following text
|
||||
<br><img src="https://demonnic.github.io/mdk/images/hechogradient.png" alt="hgradient example">
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">text</span>
|
||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a></span>
|
||||
The text you want to apply the color gradients to
|
||||
</li>
|
||||
<li><span class="parameter">first_color</span>
|
||||
The color you want it to start at. Table of colors in { r, g, b } format
|
||||
</li>
|
||||
<li><span class="parameter">second_color</span>
|
||||
The color you want the gradient to transition to first. Table of colors in { r, g, b } format
|
||||
</li>
|
||||
<li><span class="parameter">next_color</span>
|
||||
Keep repeating if you want it to transition from the second color to a third, then a third to a fourth, etc
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
<h3>See also:</h3>
|
||||
<ul>
|
||||
<li><a href="../modules/GradientMaker.html#cgradient">cgradient</a></li>
|
||||
<li><a href="../modules/GradientMaker.html#dgradient">dgradient</a></li>
|
||||
</ul>
|
||||
|
||||
<h3>Usage:</h3>
|
||||
<ul>
|
||||
<pre class="example"><span class="function-name">hecho</span>(GradientMaker.<span class="function-name">hgradient</span>(<span class="string">"a luminescent butterly floats about lazily on brillant blue and lilac wings\n"</span>, {<span class="number">255</span>,<span class="number">0</span>,<span class="number">0</span>}, {<span class="number">255</span>,<span class="number">128</span>,<span class="number">0</span>}, {<span class="number">255</span>,<span class="number">255</span>,<span class="number">0</span>}, {<span class="number">0</span>,<span class="number">255</span>,<span class="number">0</span>}, {<span class="number">0</span>,<span class="number">255</span>,<span class="number">255</span>}, {<span class="number">0</span>,<span class="number">128</span>,<span class="number">255</span>}, {<span class="number">128</span>,<span class="number">0</span>,<span class="number">255</span>}))
|
||||
<span class="function-name">hecho</span>(GradientMaker.<span class="function-name">hgradient</span>(<span class="string">"a luminescent butterly floats about lazily on brillant blue and lilac wings\n"</span>, {<span class="number">255</span>,<span class="number">0</span>,<span class="number">0</span>}, {<span class="number">0</span>,<span class="number">0</span>,<span class="number">255</span>}))
|
||||
<span class="function-name">hecho</span>(GradientMaker.<span class="function-name">hgradient</span>(<span class="string">"a luminescent butterly floats about lazily on brillant blue and lilac wings\n"</span>, {<span class="number">50</span>,<span class="number">50</span>,<span class="number">50</span>}, {<span class="number">0</span>,<span class="number">255</span>,<span class="number">0</span>}, {<span class="number">50</span>,<span class="number">50</span>,<span class="number">50</span>}))</pre>
|
||||
</ul>
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "cgradient_table"></a>
|
||||
<strong>cgradient_table(text, first_color, second_color, next_color)</strong>
|
||||
<a style="float:right;" href="../source/GradientMaker.lua.html#286">line 286</a>
|
||||
</dt>
|
||||
<dd>
|
||||
Returns a table, each element of which is a table, the first element of which is the color name to use and the character which should be that color
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">text</span>
|
||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a></span>
|
||||
The text you want to apply the color gradients to
|
||||
</li>
|
||||
<li><span class="parameter">first_color</span>
|
||||
The color you want it to start at. Table of colors in { r, g, b } format
|
||||
</li>
|
||||
<li><span class="parameter">second_color</span>
|
||||
The color you want the gradient to transition to first. Table of colors in { r, g, b } format
|
||||
</li>
|
||||
<li><span class="parameter">next_color</span>
|
||||
Keep repeating if you want it to transition from the second color to a third, then a third to a fourth, etc
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
<h3>See also:</h3>
|
||||
<ul>
|
||||
<a href="../modules/GradientMaker.html#cgradient">cgradient</a>
|
||||
</ul>
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "dgradient_table"></a>
|
||||
<strong>dgradient_table(text, first_color, second_color, next_color)</strong>
|
||||
<a style="float:right;" href="../source/GradientMaker.lua.html#296">line 296</a>
|
||||
</dt>
|
||||
<dd>
|
||||
Returns a table, each element of which is a table, the first element of which is the color({r,g,b} format) to use and the character which should be that color
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">text</span>
|
||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a></span>
|
||||
The text you want to apply the color gradients to
|
||||
</li>
|
||||
<li><span class="parameter">first_color</span>
|
||||
The color you want it to start at. Table of colors in { r, g, b } format
|
||||
</li>
|
||||
<li><span class="parameter">second_color</span>
|
||||
The color you want the gradient to transition to first. Table of colors in { r, g, b } format
|
||||
</li>
|
||||
<li><span class="parameter">next_color</span>
|
||||
Keep repeating if you want it to transition from the second color to a third, then a third to a fourth, etc
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
<h3>See also:</h3>
|
||||
<ul>
|
||||
<a href="../modules/GradientMaker.html#dgradient">dgradient</a>
|
||||
</ul>
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "hgradient_table"></a>
|
||||
<strong>hgradient_table(text, first_color, second_color, next_color)</strong>
|
||||
<a style="float:right;" href="../source/GradientMaker.lua.html#306">line 306</a>
|
||||
</dt>
|
||||
<dd>
|
||||
Returns a table, each element of which is a table, the first element of which is the color(in hex) to use and the second element of which is the character which should be that color
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">text</span>
|
||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a></span>
|
||||
The text you want to apply the color gradients to
|
||||
</li>
|
||||
<li><span class="parameter">first_color</span>
|
||||
The color you want it to start at. Table of colors in { r, g, b } format
|
||||
</li>
|
||||
<li><span class="parameter">second_color</span>
|
||||
The color you want the gradient to transition to first. Table of colors in { r, g, b } format
|
||||
</li>
|
||||
<li><span class="parameter">next_color</span>
|
||||
Keep repeating if you want it to transition from the second color to a third, then a third to a fourth, etc
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
<h3>See also:</h3>
|
||||
<ul>
|
||||
<a href="../modules/GradientMaker.html#hgradient">hgradient</a>
|
||||
</ul>
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "install_global"></a>
|
||||
<strong>install_global()</strong>
|
||||
<a style="float:right;" href="../source/GradientMaker.lua.html#314">line 314</a>
|
||||
</dt>
|
||||
<dd>
|
||||
Creates global copies of the c/d/hgradient(_table) functions and color_name for use without accessing the module table
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Usage:</h3>
|
||||
<ul>
|
||||
<pre class="example">GradientMaker.<span class="function-name">install_global</span>()
|
||||
<span class="function-name">cecho</span>(<span class="function-name">cgradient</span>(...)) <span class="comment">-- use cgradient directly now</span></pre>
|
||||
</ul>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
|
||||
</div> <!-- id="content" -->
|
||||
</div> <!-- id="main" -->
|
||||
<div id="about">
|
||||
<i>generated by <a href="http://github.com/lunarmodules/LDoc">LDoc 1.5.0</a></i>
|
||||
<i style="float:right;">Last updated 2023-05-29 18:41:27 </i>
|
||||
</div> <!-- id="about" -->
|
||||
</div> <!-- id="container" -->
|
||||
</body>
|
||||
</html>
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,552 +0,0 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
||||
<head>
|
||||
<title>Reference</title>
|
||||
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div id="container">
|
||||
|
||||
<div id="product">
|
||||
<div id="product_logo"></div>
|
||||
<div id="product_name"><big><b></b></big></div>
|
||||
<div id="product_description"></div>
|
||||
</div> <!-- id="product" -->
|
||||
|
||||
|
||||
<div id="main">
|
||||
|
||||
|
||||
<!-- Menu -->
|
||||
|
||||
<div id="navigation">
|
||||
<br/>
|
||||
<h1>MDK</h1>
|
||||
|
||||
|
||||
<ul>
|
||||
<li><a href="../index.html">Index</a></li>
|
||||
</ul>
|
||||
|
||||
<h2>Contents</h2>
|
||||
<ul>
|
||||
<li><a href="#Functions">Functions</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h2>Modules</h2>
|
||||
<ul class="nowrap">
|
||||
<li><a href="../modules/demontools.html">demontools</a></li>
|
||||
<li><strong>echofile</strong></li>
|
||||
<li><a href="../modules/figlet.html">figlet</a></li>
|
||||
<li><a href="../modules/ftext.html">ftext</a></li>
|
||||
<li><a href="../modules/GradientMaker.html">GradientMaker</a></li>
|
||||
</ul>
|
||||
<h2>Classes</h2>
|
||||
<ul class="nowrap">
|
||||
<li><a href="../classes/aliasmgr.html">aliasmgr</a></li>
|
||||
<li><a href="../classes/Chyron.html">Chyron</a></li>
|
||||
<li><a href="../classes/EMCO.html">EMCO</a></li>
|
||||
<li><a href="../classes/LoggingConsole.html">LoggingConsole</a></li>
|
||||
<li><a href="../classes/Loginator.html">Loginator</a></li>
|
||||
<li><a href="../classes/MasterMindSolver.html">MasterMindSolver</a></li>
|
||||
<li><a href="../classes/revisionator.html">revisionator</a></li>
|
||||
<li><a href="../classes/SortBox.html">SortBox</a></li>
|
||||
<li><a href="../classes/spinbox.html">spinbox</a></li>
|
||||
<li><a href="../classes/SUG.html">SUG</a></li>
|
||||
<li><a href="../classes/TextGauge.html">TextGauge</a></li>
|
||||
<li><a href="../classes/TimerGauge.html">TimerGauge</a></li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
|
||||
<h1>Module <code>echofile</code></h1>
|
||||
<p>set of functions for echoing files to things.</p>
|
||||
<p> Uses a slightly hacked up version of f-strings for interpolation/templating</p>
|
||||
<h3>Info:</h3>
|
||||
<ul>
|
||||
<li><strong>Copyright</strong>: 2021 Damian Monogue,2016 Hisham Muhammad (https://github.com/hishamhm/f-strings/blob/master/LICENSE)</li>
|
||||
<li><strong>License</strong>: MIT, see LICENSE.lua</li>
|
||||
<li><strong>Author</strong>: Damian Monogue <demonnic@gmail.com></li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h2><a href="#Functions">Functions</a></h2>
|
||||
<table class="function_list">
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#f">f(str)</a></td>
|
||||
<td class="summary">Takes a string and performs interpolation
|
||||
Uses {} as the delimiter.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#aechoFile">aechoFile(window, filename)</a></td>
|
||||
<td class="summary">reads the contents of a file, converts it to decho and then dechos it</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#aechoFilef">aechoFilef(window, filename)</a></td>
|
||||
<td class="summary">reads the contents of a file and then cechos it</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#cechoFile">cechoFile(window, filename)</a></td>
|
||||
<td class="summary">reads the contents of a file and then cechos it</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#cechoFilef">cechoFilef(window, filename)</a></td>
|
||||
<td class="summary">reads the contents of a file, interpolates it as per echofile.f and then cechos it</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#dechoFile">dechoFile(window, filename)</a></td>
|
||||
<td class="summary">reads the contents of a file and then dechos it</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#dechoFilef">dechoFilef(window, filename)</a></td>
|
||||
<td class="summary">reads the contents of a file, interpolates it as per echofile.f and then dechos it</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#hechoFile">hechoFile(window, filename)</a></td>
|
||||
<td class="summary">reads the contents of a file and then hechos it</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#hechoFilef">hechoFilef(window, filename)</a></td>
|
||||
<td class="summary">reads the contents of a file, interpolates it as per echofile.f and then hechos it</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#echoFile">echoFile(window, filename)</a></td>
|
||||
<td class="summary">reads the contents of a file, interpolates it as per echofile.f and then echos it</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#echoFilef">echoFilef(window, filename)</a></td>
|
||||
<td class="summary">reads the contents of a file, interpolates it as per echofile.f and then echos it</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#patchGeyser">patchGeyser()</a></td>
|
||||
<td class="summary">Adds c/d/h/echoFile functions to Geyser miniconsole and userwindow objects</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#installGlobal">installGlobal()</a></td>
|
||||
<td class="summary">Installs c/d/h/echoFile and f to the global namespace, and adds functions to Geyser</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br/>
|
||||
<br/>
|
||||
|
||||
|
||||
<h2 class="section-header "><a name="Functions"></a>Functions</h2>
|
||||
|
||||
<dl class="function">
|
||||
<dt>
|
||||
<a name = "f"></a>
|
||||
<strong>f(str)</strong>
|
||||
<a style="float:right;" href="../source/echofile.lua.html#109">line 109</a>
|
||||
</dt>
|
||||
<dd>
|
||||
Takes a string and performs interpolation
|
||||
Uses {} as the delimiter. Expressions will be evaluated
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">str</span>
|
||||
string: The string to interpolate
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Usage:</h3>
|
||||
<ul>
|
||||
<pre class="example">echofile = <span class="global">require</span>(<span class="string">"MDK.echofile"</span>)
|
||||
echofile.<span class="function-name">f</span>(<span class="string">"{1+1}"</span>) <span class="comment">-- returns "2"
|
||||
</span><span class="keyword">local</span> x = <span class="number">4</span>
|
||||
echofile.<span class="function-name">f</span><span class="string">"4+3 = {x+3}"</span> <span class="comment">-- returns "4+3 = 7"</span></pre>
|
||||
</ul>
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "aechoFile"></a>
|
||||
<strong>aechoFile(window, filename)</strong>
|
||||
<a style="float:right;" href="../source/echofile.lua.html#124">line 124</a>
|
||||
</dt>
|
||||
<dd>
|
||||
reads the contents of a file, converts it to decho and then dechos it
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">window</span>
|
||||
string: Optional window to cecho to
|
||||
</li>
|
||||
<li><span class="parameter">filename</span>
|
||||
string: Full path to file
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
<h3>See also:</h3>
|
||||
<ul>
|
||||
<li><a href="../modules/echofile.html#f">echofile.f</a></li>
|
||||
<li><a href="../modules/echofile.html#cechoFile">echofile.cechoFile</a></li>
|
||||
</ul>
|
||||
|
||||
<h3>Usage:</h3>
|
||||
<ul>
|
||||
<pre class="example"><span class="keyword">local</span> ec = <span class="global">require</span>(<span class="string">"MDK.echofile"</span>)
|
||||
<span class="keyword">local</span> cechoFile,f = ec.cechoFile, ec.f
|
||||
<span class="function-name">cechoFile</span>(<span class="string">"C:/path/to/file"</span>) <span class="comment">-- windows1
|
||||
</span><span class="function-name">cechoFile</span>(<span class="string">"C:\\path\\to\\file"</span>) <span class="comment">-- windows2
|
||||
</span><span class="function-name">cechoFile</span>(<span class="string">"/path/to/file"</span>) <span class="comment">-- Linux/MacOS
|
||||
</span><span class="function-name">cechoFile</span>(<span class="string">"aMiniConsole"</span>, <span class="function-name">f</span><span class="string">"{getMudletHomeDir()}/myPkgName/helpfile"</span>) <span class="comment">-- cecho a file from your pkg to a miniconsole</span></pre>
|
||||
</ul>
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "aechoFilef"></a>
|
||||
<strong>aechoFilef(window, filename)</strong>
|
||||
<a style="float:right;" href="../source/echofile.lua.html#140">line 140</a>
|
||||
</dt>
|
||||
<dd>
|
||||
reads the contents of a file and then cechos it
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">window</span>
|
||||
string: Optional window to cecho to
|
||||
</li>
|
||||
<li><span class="parameter">filename</span>
|
||||
string: Full path to file
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
<h3>See also:</h3>
|
||||
<ul>
|
||||
<li><a href="../modules/echofile.html#f">echofile.f</a></li>
|
||||
<li><a href="../modules/echofile.html#cechoFilef">echofile.cechoFilef</a></li>
|
||||
</ul>
|
||||
|
||||
<h3>Usage:</h3>
|
||||
<ul>
|
||||
<pre class="example"><span class="keyword">local</span> ec = <span class="global">require</span>(<span class="string">"MDK.echofile"</span>)
|
||||
<span class="keyword">local</span> cechoFile,f = ec.cechoFile, ec.f
|
||||
<span class="function-name">cechoFile</span>(<span class="string">"C:/path/to/file"</span>) <span class="comment">-- windows1
|
||||
</span><span class="function-name">cechoFile</span>(<span class="string">"C:\\path\\to\\file"</span>) <span class="comment">-- windows2
|
||||
</span><span class="function-name">cechoFile</span>(<span class="string">"/path/to/file"</span>) <span class="comment">-- Linux/MacOS
|
||||
</span><span class="function-name">cechoFile</span>(<span class="string">"aMiniConsole"</span>, <span class="function-name">f</span><span class="string">"{getMudletHomeDir()}/myPkgName/helpfile"</span>) <span class="comment">-- cecho a file from your pkg to a miniconsole</span></pre>
|
||||
</ul>
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "cechoFile"></a>
|
||||
<strong>cechoFile(window, filename)</strong>
|
||||
<a style="float:right;" href="../source/echofile.lua.html#155">line 155</a>
|
||||
</dt>
|
||||
<dd>
|
||||
reads the contents of a file and then cechos it
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">window</span>
|
||||
string: Optional window to cecho to
|
||||
</li>
|
||||
<li><span class="parameter">filename</span>
|
||||
string: Full path to file
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
<h3>See also:</h3>
|
||||
<ul>
|
||||
<a href="../modules/echofile.html#f">echofile.f</a>
|
||||
</ul>
|
||||
|
||||
<h3>Usage:</h3>
|
||||
<ul>
|
||||
<pre class="example"><span class="keyword">local</span> ec = <span class="global">require</span>(<span class="string">"MDK.echofile"</span>)
|
||||
<span class="keyword">local</span> cechoFile,f = ec.cechoFile, ec.f
|
||||
<span class="function-name">cechoFile</span>(<span class="string">"C:/path/to/file"</span>) <span class="comment">-- windows1
|
||||
</span><span class="function-name">cechoFile</span>(<span class="string">"C:\\path\\to\\file"</span>) <span class="comment">-- windows2
|
||||
</span><span class="function-name">cechoFile</span>(<span class="string">"/path/to/file"</span>) <span class="comment">-- Linux/MacOS
|
||||
</span><span class="function-name">cechoFile</span>(<span class="string">"aMiniConsole"</span>, <span class="function-name">f</span><span class="string">"{getMudletHomeDir()}/myPkgName/helpfile"</span>) <span class="comment">-- cecho a file from your pkg to a miniconsole</span></pre>
|
||||
</ul>
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "cechoFilef"></a>
|
||||
<strong>cechoFilef(window, filename)</strong>
|
||||
<a style="float:right;" href="../source/echofile.lua.html#170">line 170</a>
|
||||
</dt>
|
||||
<dd>
|
||||
reads the contents of a file, interpolates it as per echofile.f and then cechos it
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">window</span>
|
||||
string: Optional window to cecho to
|
||||
</li>
|
||||
<li><span class="parameter">filename</span>
|
||||
string: Full path to file
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
<h3>See also:</h3>
|
||||
<ul>
|
||||
<a href="../modules/echofile.html#f">echofile.f</a>
|
||||
</ul>
|
||||
|
||||
<h3>Usage:</h3>
|
||||
<ul>
|
||||
<pre class="example"><span class="keyword">local</span> ec = <span class="global">require</span>(<span class="string">"MDK.echofile"</span>)
|
||||
<span class="keyword">local</span> cechoFile,f = ec.cechoFile, ec.f
|
||||
<span class="function-name">cechoFile</span>(<span class="string">"C:/path/to/file"</span>) <span class="comment">-- windows1
|
||||
</span><span class="function-name">cechoFile</span>(<span class="string">"C:\\path\\to\\file"</span>) <span class="comment">-- windows2
|
||||
</span><span class="function-name">cechoFile</span>(<span class="string">"/path/to/file"</span>) <span class="comment">-- Linux/MacOS
|
||||
</span><span class="function-name">cechoFile</span>(<span class="string">"aMiniConsole"</span>, <span class="function-name">f</span><span class="string">"{getMudletHomeDir()}/myPkgName/helpfile"</span>) <span class="comment">-- cecho a file from your pkg to a miniconsole</span></pre>
|
||||
</ul>
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "dechoFile"></a>
|
||||
<strong>dechoFile(window, filename)</strong>
|
||||
<a style="float:right;" href="../source/echofile.lua.html#180">line 180</a>
|
||||
</dt>
|
||||
<dd>
|
||||
reads the contents of a file and then dechos it
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">window</span>
|
||||
string: Optional window to decho to
|
||||
</li>
|
||||
<li><span class="parameter">filename</span>
|
||||
string: Full path to file
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
<h3>See also:</h3>
|
||||
<ul>
|
||||
<li><a href="../modules/echofile.html#f">echofile.f</a></li>
|
||||
<li><a href="../modules/echofile.html#cechoFile">echofile.cechoFile</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "dechoFilef"></a>
|
||||
<strong>dechoFilef(window, filename)</strong>
|
||||
<a style="float:right;" href="../source/echofile.lua.html#190">line 190</a>
|
||||
</dt>
|
||||
<dd>
|
||||
reads the contents of a file, interpolates it as per echofile.f and then dechos it
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">window</span>
|
||||
string: Optional window to decho to
|
||||
</li>
|
||||
<li><span class="parameter">filename</span>
|
||||
string: Full path to file
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
<h3>See also:</h3>
|
||||
<ul>
|
||||
<li><a href="../modules/echofile.html#f">echofile.f</a></li>
|
||||
<li><a href="../modules/echofile.html#cechoFile">echofile.cechoFile</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "hechoFile"></a>
|
||||
<strong>hechoFile(window, filename)</strong>
|
||||
<a style="float:right;" href="../source/echofile.lua.html#200">line 200</a>
|
||||
</dt>
|
||||
<dd>
|
||||
reads the contents of a file and then hechos it
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">window</span>
|
||||
string: Optional window to hecho to
|
||||
</li>
|
||||
<li><span class="parameter">filename</span>
|
||||
string: Full path to file
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
<h3>See also:</h3>
|
||||
<ul>
|
||||
<li><a href="../modules/echofile.html#f">echofile.f</a></li>
|
||||
<li><a href="../modules/echofile.html#cechoFile">echofile.cechoFile</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "hechoFilef"></a>
|
||||
<strong>hechoFilef(window, filename)</strong>
|
||||
<a style="float:right;" href="../source/echofile.lua.html#210">line 210</a>
|
||||
</dt>
|
||||
<dd>
|
||||
reads the contents of a file, interpolates it as per echofile.f and then hechos it
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">window</span>
|
||||
string: Optional window to hecho to
|
||||
</li>
|
||||
<li><span class="parameter">filename</span>
|
||||
string: Full path to file
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
<h3>See also:</h3>
|
||||
<ul>
|
||||
<li><a href="../modules/echofile.html#f">echofile.f</a></li>
|
||||
<li><a href="../modules/echofile.html#cechoFile">echofile.cechoFile</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "echoFile"></a>
|
||||
<strong>echoFile(window, filename)</strong>
|
||||
<a style="float:right;" href="../source/echofile.lua.html#220">line 220</a>
|
||||
</dt>
|
||||
<dd>
|
||||
reads the contents of a file, interpolates it as per echofile.f and then echos it
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">window</span>
|
||||
string: Optional window to echo to
|
||||
</li>
|
||||
<li><span class="parameter">filename</span>
|
||||
string: Full path to file
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
<h3>See also:</h3>
|
||||
<ul>
|
||||
<li><a href="../modules/echofile.html#f">echofile.f</a></li>
|
||||
<li><a href="../modules/echofile.html#cechoFile">echofile.cechoFile</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "echoFilef"></a>
|
||||
<strong>echoFilef(window, filename)</strong>
|
||||
<a style="float:right;" href="../source/echofile.lua.html#230">line 230</a>
|
||||
</dt>
|
||||
<dd>
|
||||
reads the contents of a file, interpolates it as per echofile.f and then echos it
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">window</span>
|
||||
string: Optional window to echo to
|
||||
</li>
|
||||
<li><span class="parameter">filename</span>
|
||||
string: Full path to file
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
<h3>See also:</h3>
|
||||
<ul>
|
||||
<li><a href="../modules/echofile.html#f">echofile.f</a></li>
|
||||
<li><a href="../modules/echofile.html#cechoFile">echofile.cechoFile</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "patchGeyser"></a>
|
||||
<strong>patchGeyser()</strong>
|
||||
<a style="float:right;" href="../source/echofile.lua.html#239">line 239</a>
|
||||
</dt>
|
||||
<dd>
|
||||
Adds c/d/h/echoFile functions to Geyser miniconsole and userwindow objects
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Usage:</h3>
|
||||
<ul>
|
||||
<pre class="example"><span class="global">require</span>(<span class="string">"MDK.echofile"</span>).<span class="function-name">patchGeyser</span>()
|
||||
myMC = Geyser.MiniConsole:<span class="function-name">new</span>({name = <span class="string">"myMC"</span>})
|
||||
myMC:<span class="function-name">cechoFile</span>(<span class="function-name">f</span><span class="string">"{getMudletHomeDir()}/helpfile"</span>)</pre>
|
||||
</ul>
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "installGlobal"></a>
|
||||
<strong>installGlobal()</strong>
|
||||
<a style="float:right;" href="../source/echofile.lua.html#281">line 281</a>
|
||||
</dt>
|
||||
<dd>
|
||||
Installs c/d/h/echoFile and f to the global namespace, and adds functions to Geyser
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Usage:</h3>
|
||||
<ul>
|
||||
<pre class="example"><span class="global">require</span>(<span class="string">"MDK.echofile"</span>).<span class="function-name">installGlobal</span>()
|
||||
<span class="function-name">f</span><span class="string">"{1+2}"</span> <span class="comment">-- returns "2"
|
||||
</span><span class="function-name">dechoFile</span>(<span class="function-name">f</span><span class="string">"{getMudletHomeDir()}/fileWithDechoLines.txt"</span>)
|
||||
<span class="comment">-- reads contents of fileWithDechoLines.txt from profile directory
|
||||
</span><span class="comment">-- and dechos them to the main console</span></pre>
|
||||
</ul>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
|
||||
</div> <!-- id="content" -->
|
||||
</div> <!-- id="main" -->
|
||||
<div id="about">
|
||||
<i>generated by <a href="http://github.com/lunarmodules/LDoc">LDoc 1.5.0</a></i>
|
||||
<i style="float:right;">Last updated 2023-05-29 18:41:27 </i>
|
||||
</div> <!-- id="about" -->
|
||||
</div> <!-- id="container" -->
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,260 +0,0 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
||||
<head>
|
||||
<title>Reference</title>
|
||||
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div id="container">
|
||||
|
||||
<div id="product">
|
||||
<div id="product_logo"></div>
|
||||
<div id="product_name"><big><b></b></big></div>
|
||||
<div id="product_description"></div>
|
||||
</div> <!-- id="product" -->
|
||||
|
||||
|
||||
<div id="main">
|
||||
|
||||
|
||||
<!-- Menu -->
|
||||
|
||||
<div id="navigation">
|
||||
<br/>
|
||||
<h1>MDK</h1>
|
||||
|
||||
|
||||
<ul>
|
||||
<li><a href="../index.html">Index</a></li>
|
||||
</ul>
|
||||
|
||||
<h2>Contents</h2>
|
||||
<ul>
|
||||
<li><a href="#Functions">Functions</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h2>Modules</h2>
|
||||
<ul class="nowrap">
|
||||
<li><a href="../modules/demontools.html">demontools</a></li>
|
||||
<li><a href="../modules/echofile.html">echofile</a></li>
|
||||
<li><strong>figlet</strong></li>
|
||||
<li><a href="../modules/ftext.html">ftext</a></li>
|
||||
<li><a href="../modules/GradientMaker.html">GradientMaker</a></li>
|
||||
</ul>
|
||||
<h2>Classes</h2>
|
||||
<ul class="nowrap">
|
||||
<li><a href="../classes/aliasmgr.html">aliasmgr</a></li>
|
||||
<li><a href="../classes/Chyron.html">Chyron</a></li>
|
||||
<li><a href="../classes/EMCO.html">EMCO</a></li>
|
||||
<li><a href="../classes/LoggingConsole.html">LoggingConsole</a></li>
|
||||
<li><a href="../classes/Loginator.html">Loginator</a></li>
|
||||
<li><a href="../classes/MasterMindSolver.html">MasterMindSolver</a></li>
|
||||
<li><a href="../classes/revisionator.html">revisionator</a></li>
|
||||
<li><a href="../classes/SortBox.html">SortBox</a></li>
|
||||
<li><a href="../classes/spinbox.html">spinbox</a></li>
|
||||
<li><a href="../classes/SUG.html">SUG</a></li>
|
||||
<li><a href="../classes/TextGauge.html">TextGauge</a></li>
|
||||
<li><a href="../classes/TimerGauge.html">TimerGauge</a></li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
|
||||
<h1>Module <code>figlet</code></h1>
|
||||
<p>Figlet
|
||||
A module to read figlet fonts and produce figlet ascii art from text</p>
|
||||
<p></p>
|
||||
<h3>Info:</h3>
|
||||
<ul>
|
||||
<li><strong>Copyright</strong>: 2010,2011 Nick Gammon,2022 Damian Monogue</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h2><a href="#Functions">Functions</a></h2>
|
||||
<table class="function_list">
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#Figlet.readfont">Figlet.readfont(filename)</a></td>
|
||||
<td class="summary">Reads a figlet font file (.flf) into memory and readies it for use by the next figlet
|
||||
These files are cached in memory so that future calls to load a font just read from there.</td>
|
||||