2016-06-21 05:52:44 +00:00
|
|
|
<!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>Documentation</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>Pop.Box()</h1>
|
|
|
|
|
|
|
|
<ul>
|
|
|
|
<li><a href="../index.html">Index</a></li>
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
<h2>Contents</h2>
|
|
|
|
<ul>
|
|
|
|
<li><a href="#Functions">Functions</a></li>
|
|
|
|
<li><a href="#Tables">Tables</a></li>
|
2016-08-21 07:49:16 +00:00
|
|
|
<li><a href="#Issues">Issues</a></li>
|
2016-06-21 05:52:44 +00:00
|
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
|
|
<h2>Modules</h2>
|
|
|
|
<ul class="$(kind=='Topics' and '' or 'nowrap'">
|
|
|
|
<li><strong>pop</strong></li>
|
2016-08-21 07:49:16 +00:00
|
|
|
<li><a href="../modules/main.html">main</a></li>
|
2016-06-21 05:52:44 +00:00
|
|
|
<li><a href="../modules/util.html">util</a></li>
|
2016-08-21 07:49:16 +00:00
|
|
|
<li><a href="../modules/Element.html">Element</a></li>
|
|
|
|
</ul>
|
|
|
|
<h2>Classes</h2>
|
|
|
|
<ul class="$(kind=='Topics' and '' or 'nowrap'">
|
|
|
|
<li><a href="../classes/element.html">element</a></li>
|
2017-04-08 20:44:31 +00:00
|
|
|
<li><a href="../classes/window.html">window</a></li>
|
2016-06-21 05:52:44 +00:00
|
|
|
</ul>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div id="content">
|
|
|
|
|
|
|
|
<h1>Module <code>pop</code></h1>
|
|
|
|
<p>The Pop.Box GUI itself.</p>
|
|
|
|
<p>
|
|
|
|
|
|
|
|
</p>
|
|
|
|
<h3>Info:</h3>
|
|
|
|
<ul>
|
|
|
|
<li><strong>Copyright</strong>: Paul Liverman III (2015-2016)</li>
|
2016-08-02 23:30:59 +00:00
|
|
|
<li><strong>Release</strong>: 0.0.0</li>
|
2016-06-21 05:52:44 +00:00
|
|
|
<li><strong>License</strong>: The MIT License (MIT)</li>
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
|
|
<h2><a href="#Functions">Functions</a></h2>
|
|
|
|
<table class="function_list">
|
|
|
|
<tr>
|
2017-04-08 20:44:31 +00:00
|
|
|
<td class="name" nowrap><a href="#load">load (The)</a></td>
|
|
|
|
<td class="summary">Loads elements, skins, extensions from a specified path.</td>
|
2016-06-21 05:52:44 +00:00
|
|
|
</tr>
|
|
|
|
<tr>
|
2016-08-21 05:29:16 +00:00
|
|
|
<td class="name" nowrap><a href="#create">create (element, parent, ...)</a></td>
|
2016-06-21 05:52:44 +00:00
|
|
|
<td class="summary">Creates an element.</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td class="name" nowrap><a href="#update">update (dt, element)</a></td>
|
2016-06-21 07:58:22 +00:00
|
|
|
<td class="summary">Event handler for <code>love.update()</code>.</td>
|
2016-06-21 05:52:44 +00:00
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td class="name" nowrap><a href="#draw">draw (element)</a></td>
|
2016-06-21 07:58:22 +00:00
|
|
|
<td class="summary">Event handler for <code>love.draw()</code>.</td>
|
2016-06-21 05:52:44 +00:00
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td class="name" nowrap><a href="#mousemoved">mousemoved (x, y, dx, dy)</a></td>
|
2016-06-21 07:58:22 +00:00
|
|
|
<td class="summary">Event handler for <code>love.mousemoved()</code>.</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td class="name" nowrap><a href="#mousepressed">mousepressed (x, y, button, element)</a></td>
|
|
|
|
<td class="summary">Event handler for <code>love.mousepressed()</code>.</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td class="name" nowrap><a href="#mousereleased">mousereleased (x, y, button, element)</a></td>
|
|
|
|
<td class="summary">Event handler for <code>love.mousereleased()</code>.</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td class="name" nowrap><a href="#keypressed">keypressed (key)</a></td>
|
|
|
|
<td class="summary">Event handler for <code>love.keypressed()</code>.</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td class="name" nowrap><a href="#keyreleased">keyreleased (key)</a></td>
|
|
|
|
<td class="summary">Event handler for <code>love.keyreleased()</code>.</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td class="name" nowrap><a href="#textinput">textinput (text)</a></td>
|
|
|
|
<td class="summary">Event handler for <code>love.textinput()</code>.</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
2016-06-21 19:31:42 +00:00
|
|
|
<td class="name" nowrap><a href="#debugDraw">debugDraw (element)</a></td>
|
|
|
|
<td class="summary">Draws simple rectangle outlines to debug placement of elements.</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td class="name" nowrap><a href="#printElementTree">printElementTree (element)</a></td>
|
|
|
|
<td class="summary">Prints a basic structure of GUI elements with minimal info.</td>
|
|
|
|
</tr>
|
2016-06-21 05:52:44 +00:00
|
|
|
</table>
|
|
|
|
<h2><a href="#Tables">Tables</a></h2>
|
|
|
|
<table class="function_list">
|
|
|
|
<tr>
|
|
|
|
<td class="name" nowrap><a href="#pop">pop</a></td>
|
|
|
|
<td class="summary">
|
|
|
|
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</table>
|
2016-08-21 07:49:16 +00:00
|
|
|
<h2><a href="#Issues">Issues</a></h2>
|
|
|
|
<table class="function_list">
|
|
|
|
<tr>
|
|
|
|
<td class="name" nowrap><a href="#update-todo1">update-todo1</a></td>
|
|
|
|
<td class="summary">Define Elements and @ see that documentation from here. Generic documentation, not specifically element!
|
|
|
|
data.update boolean controls an element and its children being updated</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td class="name" nowrap><a href="#mousemoved-todo2">mousemoved-todo2</a></td>
|
2017-04-09 00:10:44 +00:00
|
|
|
<td class="summary">Implement a way for an element to attach itself to <code>love.mousemoved()</code> events?
|
|
|
|
checking element against pop.screen so that this only gets called once</td>
|
2016-08-21 07:49:16 +00:00
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td class="name" nowrap><a href="#mousereleased-todo3">mousereleased-todo3</a></td>
|
|
|
|
<td class="summary"> Figure out how to bring a focused element to the front of view (aka the first element in its parent's children).
|
|
|
|
(If I do it right here, the for loop above may break! I need to test/figure this out.)
|
|
|
|
NOTE this might cause an error in the above for loop!
|
|
|
|
basically, move focused element to front of its parent's child
|
|
|
|
element.parent\focusChild element
|
|
|
|
table.insert element.parent, element.parent\removeChild(element),</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
2016-10-31 06:40:40 +00:00
|
|
|
<td class="name" nowrap><a href="#textinput-todo4">textinput-todo4</a></td>
|
2017-04-08 20:44:31 +00:00
|
|
|
<td class="summary">document pop.import</td>
|
2016-10-31 06:40:40 +00:00
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td class="name" nowrap><a href="#textinput-todo4-todo5">textinput-todo4-todo5</a></td>
|
2017-04-08 20:44:31 +00:00
|
|
|
<td class="summary">document pop.export</td>
|
2016-10-31 06:40:40 +00:00
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td class="name" nowrap><a href="#printElementTree-todo6">printElementTree-todo6</a></td>
|
2017-04-11 03:32:31 +00:00
|
|
|
<td class="summary">Write debugInfo things for elements.</td>
|
2016-08-21 07:49:16 +00:00
|
|
|
</tr>
|
|
|
|
</table>
|
2016-06-21 05:52:44 +00:00
|
|
|
|
|
|
|
<br/>
|
|
|
|
<br/>
|
|
|
|
|
|
|
|
|
|
|
|
<h2 class="section-header "><a name="Functions"></a>Functions</h2>
|
|
|
|
|
|
|
|
<dl class="function">
|
|
|
|
<dt>
|
|
|
|
<a name = "load"></a>
|
2017-04-08 20:44:31 +00:00
|
|
|
<strong>load (The)</strong>
|
2016-06-21 05:52:44 +00:00
|
|
|
</dt>
|
|
|
|
<dd>
|
2017-04-08 20:44:31 +00:00
|
|
|
Loads elements, skins, extensions from a specified path. Initializes
|
|
|
|
<code>pop.screen</code> on first call.</p>
|
2016-08-21 05:29:16 +00:00
|
|
|
|
2017-04-08 20:44:31 +00:00
|
|
|
<p> Automatically called when you require Pop.Box for its internals. Subsequent
|
|
|
|
calls can be used to add more elements/skins/extensions.
|
2016-06-21 05:52:44 +00:00
|
|
|
|
|
|
|
|
2017-04-08 20:44:31 +00:00
|
|
|
<h3>Parameters:</h3>
|
|
|
|
<ul>
|
|
|
|
<li><span class="parameter">The</span>
|
|
|
|
<span class="types"><a class="type" href="http://www.lua.org/manual/5.1/manual.html#5.4">string[opt]</a></span>
|
|
|
|
path to load from. Within this path should be
|
|
|
|
elements, skins, and extensions directories, containing whatever items you
|
|
|
|
want to load.
|
|
|
|
</li>
|
|
|
|
</ul>
|
2016-06-21 05:52:44 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h3>See also:</h3>
|
|
|
|
<ul>
|
2017-04-08 20:44:31 +00:00
|
|
|
<a href="../modules/Element.html#">Element</a>
|
2016-06-21 05:52:44 +00:00
|
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
<dt>
|
|
|
|
<a name = "create"></a>
|
2016-08-21 05:29:16 +00:00
|
|
|
<strong>create (element, parent, ...)</strong>
|
2016-06-21 05:52:44 +00:00
|
|
|
</dt>
|
|
|
|
<dd>
|
|
|
|
Creates an element.
|
|
|
|
|
|
|
|
|
|
|
|
<h3>Parameters:</h3>
|
|
|
|
<ul>
|
|
|
|
<li><span class="parameter">element</span>
|
2016-08-21 07:49:16 +00:00
|
|
|
<span class="types"><a class="type" href="http://www.lua.org/manual/5.1/manual.html#5.4">string</a></span>
|
|
|
|
The element class to use.
|
2016-06-21 05:52:44 +00:00
|
|
|
</li>
|
|
|
|
<li><span class="parameter">parent</span>
|
2016-08-21 07:49:16 +00:00
|
|
|
<span class="types"><span class="type">Element</span>, <span class="type">false</span> or <span class="type">nil</span></span>
|
|
|
|
[opt] The parent element. If <code>false</code>, an
|
|
|
|
element is created with no parent. If <code>nil</code>, defaults to <code>pop.screen</code>.
|
2016-08-21 05:29:16 +00:00
|
|
|
</li>
|
|
|
|
<li><span class="parameter">...</span>
|
2016-08-21 07:49:16 +00:00
|
|
|
[opt] Any number of parameters can be passed to the constructor
|
|
|
|
for the element.</p>
|
2016-08-21 05:29:16 +00:00
|
|
|
|
2016-08-21 07:49:16 +00:00
|
|
|
<p> (<strong>Note</strong>: An element with no parent will not be handled by Pop.Box's event
|
|
|
|
handlers unless you handle it explicitly.)
|
2016-06-21 05:52:44 +00:00
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h3>See also:</h3>
|
|
|
|
<ul>
|
2016-08-21 07:49:16 +00:00
|
|
|
<li><a href="../modules/pop.html#">pop</a></li>
|
|
|
|
<li><a href="../modules/Element.html#">Element</a></li>
|
2016-06-21 05:52:44 +00:00
|
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
<dt>
|
|
|
|
<a name = "update"></a>
|
|
|
|
<strong>update (dt, element)</strong>
|
|
|
|
</dt>
|
|
|
|
<dd>
|
2016-06-21 07:58:22 +00:00
|
|
|
Event handler for <code>love.update()</code>.
|
2016-06-21 05:52:44 +00:00
|
|
|
|
|
|
|
|
|
|
|
<h3>Parameters:</h3>
|
|
|
|
<ul>
|
|
|
|
<li><span class="parameter">dt</span>
|
2016-08-21 07:49:16 +00:00
|
|
|
<span class="types"><span class="type">number</span></span>
|
|
|
|
The amount of time passed since the last call to update,
|
|
|
|
in seconds.
|
2016-06-21 05:52:44 +00:00
|
|
|
</li>
|
|
|
|
<li><span class="parameter">element</span>
|
2016-08-21 07:49:16 +00:00
|
|
|
<span class="types"><span class="type">Element</span></span>
|
|
|
|
[opt] The element to update (will update all its
|
|
|
|
children as well). Defaults to <code>pop.screen</code>.
|
2016-06-21 05:52:44 +00:00
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-08-21 07:49:16 +00:00
|
|
|
<h3>See also:</h3>
|
|
|
|
<ul>
|
|
|
|
<a href="../modules/Element.html#">Element</a>
|
|
|
|
</ul>
|
2016-06-21 05:52:44 +00:00
|
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
<dt>
|
|
|
|
<a name = "draw"></a>
|
|
|
|
<strong>draw (element)</strong>
|
|
|
|
</dt>
|
|
|
|
<dd>
|
2016-06-21 07:58:22 +00:00
|
|
|
Event handler for <code>love.draw()</code>.
|
2016-06-21 05:52:44 +00:00
|
|
|
|
|
|
|
|
|
|
|
<h3>Parameters:</h3>
|
|
|
|
<ul>
|
|
|
|
<li><span class="parameter">element</span>
|
2016-08-21 07:49:16 +00:00
|
|
|
<span class="types"><span class="type">Element</span></span>
|
|
|
|
[opt] The element to draw (will draw all its children
|
|
|
|
as well). Defaults to <code>pop.screen</code>.
|
2016-06-21 05:52:44 +00:00
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-08-21 07:49:16 +00:00
|
|
|
<h3>See also:</h3>
|
|
|
|
<ul>
|
|
|
|
<a href="../modules/Element.html#">Element</a>
|
|
|
|
</ul>
|
2016-06-21 05:52:44 +00:00
|
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
<dt>
|
|
|
|
<a name = "mousemoved"></a>
|
|
|
|
<strong>mousemoved (x, y, dx, dy)</strong>
|
|
|
|
</dt>
|
|
|
|
<dd>
|
2016-08-21 07:49:16 +00:00
|
|
|
Event handler for <code>love.mousemoved()</code>. (LÖVE >= 0.10.0)
|
2016-06-21 05:52:44 +00:00
|
|
|
|
|
|
|
|
|
|
|
<h3>Parameters:</h3>
|
|
|
|
<ul>
|
|
|
|
<li><span class="parameter">x</span>
|
2016-08-21 07:49:16 +00:00
|
|
|
<span class="types"><span class="type">integer</span></span>
|
2016-06-21 05:52:44 +00:00
|
|
|
The x coordinate of the mouse.
|
|
|
|
</li>
|
|
|
|
<li><span class="parameter">y</span>
|
2016-08-21 07:49:16 +00:00
|
|
|
<span class="types"><span class="type">integer</span></span>
|
2016-06-21 05:52:44 +00:00
|
|
|
The y coordinate of the mouse.
|
|
|
|
</li>
|
|
|
|
<li><span class="parameter">dx</span>
|
2016-08-21 07:49:16 +00:00
|
|
|
<span class="types"><span class="type">number</span></span>
|
2016-06-21 05:52:44 +00:00
|
|
|
The distance on the x axis the mouse was moved.
|
|
|
|
</li>
|
|
|
|
<li><span class="parameter">dy</span>
|
2016-08-21 07:49:16 +00:00
|
|
|
<span class="types"><span class="type">number</span></span>
|
2016-06-21 05:52:44 +00:00
|
|
|
The distance on the y axis the mouse was moved.
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
|
2016-06-21 07:58:22 +00:00
|
|
|
<h3>Returns:</h3>
|
|
|
|
<ol>
|
|
|
|
|
2016-08-21 07:49:16 +00:00
|
|
|
<span class="types"><span class="type">boolean</span></span>
|
|
|
|
Was the event handled?
|
2016-06-21 07:58:22 +00:00
|
|
|
</ol>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
<dt>
|
|
|
|
<a name = "mousepressed"></a>
|
|
|
|
<strong>mousepressed (x, y, button, element)</strong>
|
|
|
|
</dt>
|
|
|
|
<dd>
|
|
|
|
Event handler for <code>love.mousepressed()</code>.
|
|
|
|
|
|
|
|
|
|
|
|
<h3>Parameters:</h3>
|
|
|
|
<ul>
|
|
|
|
<li><span class="parameter">x</span>
|
2016-08-21 07:49:16 +00:00
|
|
|
<span class="types"><span class="type">integer</span></span>
|
2016-06-21 07:58:22 +00:00
|
|
|
The x coordinate of the mouse press.
|
|
|
|
</li>
|
|
|
|
<li><span class="parameter">y</span>
|
2016-08-21 07:49:16 +00:00
|
|
|
<span class="types"><span class="type">integer</span></span>
|
2016-06-21 07:58:22 +00:00
|
|
|
The y coordinate of the mouse press.
|
|
|
|
</li>
|
|
|
|
<li><span class="parameter">button</span>
|
2016-08-21 07:49:16 +00:00
|
|
|
<span class="types"><a class="type" href="http://www.lua.org/manual/5.1/manual.html#5.4">string</a> or <span class="type">integer</span></span>
|
|
|
|
The mouse button pressed. (Type varies by
|
|
|
|
LÖVE version.)
|
2016-06-21 07:58:22 +00:00
|
|
|
</li>
|
|
|
|
<li><span class="parameter">element</span>
|
2016-08-21 07:49:16 +00:00
|
|
|
<span class="types"><span class="type">Element</span></span>
|
|
|
|
[opt] The element to check for event handling (will
|
|
|
|
check its children as well). Defaults to <code>pop.screen</code>.
|
2016-06-21 07:58:22 +00:00
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
<h3>Returns:</h3>
|
|
|
|
<ol>
|
|
|
|
|
2016-08-21 07:49:16 +00:00
|
|
|
<span class="types"><span class="type">boolean</span></span>
|
|
|
|
Was the event handled?
|
2016-06-21 07:58:22 +00:00
|
|
|
</ol>
|
|
|
|
|
|
|
|
|
2016-08-21 07:49:16 +00:00
|
|
|
<h3>See also:</h3>
|
|
|
|
<ul>
|
|
|
|
<a href="../modules/Element.html#">Element</a>
|
|
|
|
</ul>
|
2016-06-21 07:58:22 +00:00
|
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
<dt>
|
|
|
|
<a name = "mousereleased"></a>
|
|
|
|
<strong>mousereleased (x, y, button, element)</strong>
|
|
|
|
</dt>
|
|
|
|
<dd>
|
|
|
|
Event handler for <code>love.mousereleased()</code>.
|
|
|
|
|
|
|
|
|
|
|
|
<h3>Parameters:</h3>
|
|
|
|
<ul>
|
|
|
|
<li><span class="parameter">x</span>
|
2016-08-21 07:49:16 +00:00
|
|
|
<span class="types"><span class="type">integer</span></span>
|
2016-06-21 07:58:22 +00:00
|
|
|
The x coordinate of the mouse release.
|
|
|
|
</li>
|
|
|
|
<li><span class="parameter">y</span>
|
2016-08-21 07:49:16 +00:00
|
|
|
<span class="types"><span class="type">integer</span></span>
|
2016-06-21 07:58:22 +00:00
|
|
|
The y coordinate of the mouse release.
|
|
|
|
</li>
|
|
|
|
<li><span class="parameter">button</span>
|
2016-08-21 07:49:16 +00:00
|
|
|
<span class="types"><a class="type" href="http://www.lua.org/manual/5.1/manual.html#5.4">string</a> or <span class="type">integer</span></span>
|
|
|
|
The mouse button released. (Type varies by
|
|
|
|
LÖVE version.)
|
2016-06-21 07:58:22 +00:00
|
|
|
</li>
|
|
|
|
<li><span class="parameter">element</span>
|
2016-08-21 07:49:16 +00:00
|
|
|
<span class="types"><span class="type">Element</span></span>
|
|
|
|
[opt] The element to check for event handling (will
|
|
|
|
check its children as well). Defaults to <code>pop.screen</code>.
|
2016-06-21 07:58:22 +00:00
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
<h3>Returns:</h3>
|
|
|
|
<ol>
|
|
|
|
<li>
|
2016-08-21 07:49:16 +00:00
|
|
|
<span class="types"><span class="type">boolean</span></span>
|
|
|
|
Was a click handled?</li>
|
2016-06-21 07:58:22 +00:00
|
|
|
<li>
|
2016-08-21 07:49:16 +00:00
|
|
|
<span class="types"><span class="type">boolean</span></span>
|
|
|
|
Was a mouse release handled?</li>
|
2016-06-21 07:58:22 +00:00
|
|
|
</ol>
|
|
|
|
|
|
|
|
|
2016-08-21 07:49:16 +00:00
|
|
|
<h3>See also:</h3>
|
|
|
|
<ul>
|
|
|
|
<a href="../modules/Element.html#">Element</a>
|
|
|
|
</ul>
|
2016-06-21 07:58:22 +00:00
|
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
<dt>
|
|
|
|
<a name = "keypressed"></a>
|
|
|
|
<strong>keypressed (key)</strong>
|
|
|
|
</dt>
|
|
|
|
<dd>
|
|
|
|
Event handler for <code>love.keypressed()</code>.
|
|
|
|
|
|
|
|
|
|
|
|
<h3>Parameters:</h3>
|
|
|
|
<ul>
|
|
|
|
<li><span class="parameter">key</span>
|
2016-08-21 07:49:16 +00:00
|
|
|
<span class="types"><a class="type" href="http://www.lua.org/manual/5.1/manual.html#5.4">string</a></span>
|
2016-06-21 07:58:22 +00:00
|
|
|
The key that was pressed.
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
<h3>Returns:</h3>
|
|
|
|
<ol>
|
|
|
|
|
2016-08-21 07:49:16 +00:00
|
|
|
<span class="types"><span class="type">boolean</span></span>
|
|
|
|
Was the event handled?
|
2016-06-21 07:58:22 +00:00
|
|
|
</ol>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
<dt>
|
|
|
|
<a name = "keyreleased"></a>
|
|
|
|
<strong>keyreleased (key)</strong>
|
|
|
|
</dt>
|
|
|
|
<dd>
|
|
|
|
Event handler for <code>love.keyreleased()</code>.
|
|
|
|
|
|
|
|
|
|
|
|
<h3>Parameters:</h3>
|
|
|
|
<ul>
|
|
|
|
<li><span class="parameter">key</span>
|
2016-08-21 07:49:16 +00:00
|
|
|
<span class="types"><a class="type" href="http://www.lua.org/manual/5.1/manual.html#5.4">string</a></span>
|
2016-06-21 07:58:22 +00:00
|
|
|
The key that was released.
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
<h3>Returns:</h3>
|
|
|
|
<ol>
|
|
|
|
|
2016-08-21 07:49:16 +00:00
|
|
|
<span class="types"><span class="type">boolean</span></span>
|
|
|
|
Was the event handled?
|
2016-06-21 07:58:22 +00:00
|
|
|
</ol>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
<dt>
|
|
|
|
<a name = "textinput"></a>
|
|
|
|
<strong>textinput (text)</strong>
|
|
|
|
</dt>
|
|
|
|
<dd>
|
|
|
|
Event handler for <code>love.textinput()</code>.
|
|
|
|
|
|
|
|
|
|
|
|
<h3>Parameters:</h3>
|
|
|
|
<ul>
|
|
|
|
<li><span class="parameter">text</span>
|
2016-08-21 07:49:16 +00:00
|
|
|
<span class="types"><a class="type" href="http://www.lua.org/manual/5.1/manual.html#5.4">string</a></span>
|
2016-06-21 07:58:22 +00:00
|
|
|
The text that was typed.
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
<h3>Returns:</h3>
|
|
|
|
<ol>
|
|
|
|
|
2016-08-21 07:49:16 +00:00
|
|
|
<span class="types"><span class="type">boolean</span></span>
|
|
|
|
Was the text input handled?
|
2016-06-21 07:58:22 +00:00
|
|
|
</ol>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-06-21 19:31:42 +00:00
|
|
|
</dd>
|
|
|
|
<dt>
|
|
|
|
<a name = "debugDraw"></a>
|
|
|
|
<strong>debugDraw (element)</strong>
|
|
|
|
</dt>
|
|
|
|
<dd>
|
|
|
|
Draws simple rectangle outlines to debug placement of elements.
|
|
|
|
|
|
|
|
|
|
|
|
<h3>Parameters:</h3>
|
|
|
|
<ul>
|
|
|
|
<li><span class="parameter">element</span>
|
2016-08-21 07:49:16 +00:00
|
|
|
<span class="types"><span class="type">Element</span></span>
|
|
|
|
[opt] The element to draw (will draw its children as
|
|
|
|
well). Defaults to <code>pop.screen</code>.
|
2016-06-21 19:31:42 +00:00
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-08-21 07:49:16 +00:00
|
|
|
<h3>See also:</h3>
|
|
|
|
<ul>
|
|
|
|
<a href="../modules/Element.html#">Element</a>
|
|
|
|
</ul>
|
2016-06-21 19:31:42 +00:00
|
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
<dt>
|
|
|
|
<a name = "printElementTree"></a>
|
|
|
|
<strong>printElementTree (element)</strong>
|
|
|
|
</dt>
|
|
|
|
<dd>
|
|
|
|
Prints a basic structure of GUI elements with minimal info.
|
|
|
|
|
|
|
|
|
|
|
|
<h3>Parameters:</h3>
|
|
|
|
<ul>
|
|
|
|
<li><span class="parameter">element</span>
|
2016-08-21 07:49:16 +00:00
|
|
|
<span class="types"><span class="type">Element</span></span>
|
|
|
|
[opt] The element to start at. Defaults to
|
|
|
|
<code>pop.screen</code>.
|
2016-06-21 19:31:42 +00:00
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-08-21 07:49:16 +00:00
|
|
|
<h3>See also:</h3>
|
|
|
|
<ul>
|
|
|
|
<a href="../modules/Element.html#">Element</a>
|
|
|
|
</ul>
|
2016-06-21 19:31:42 +00:00
|
|
|
|
|
|
|
|
2016-06-21 05:52:44 +00:00
|
|
|
</dd>
|
|
|
|
</dl>
|
|
|
|
<h2 class="section-header "><a name="Tables"></a>Tables</h2>
|
|
|
|
|
|
|
|
<dl class="function">
|
|
|
|
<dt>
|
|
|
|
<a name = "pop"></a>
|
|
|
|
<strong>pop</strong>
|
|
|
|
</dt>
|
|
|
|
<dd>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h3>Fields:</h3>
|
|
|
|
<ul>
|
2017-04-08 20:44:31 +00:00
|
|
|
<li><span class="parameter">For</span>
|
|
|
|
<span class="types"><span class="type">constants</span></span>
|
|
|
|
now, just stores values to be used with mouse clicks
|
|
|
|
for compatibility with differing LOVE versions.
|
|
|
|
</li>
|
2016-06-21 05:52:44 +00:00
|
|
|
<li><span class="parameter">elements</span>
|
2016-08-21 07:49:16 +00:00
|
|
|
<span class="types"><a class="type" href="http://www.lua.org/manual/5.1/manual.html#5.5">table</a></span>
|
2016-06-21 05:52:44 +00:00
|
|
|
All GUI classes are stored here.
|
|
|
|
</li>
|
|
|
|
<li><span class="parameter">skins</span>
|
2016-08-21 07:49:16 +00:00
|
|
|
<span class="types"><a class="type" href="http://www.lua.org/manual/5.1/manual.html#5.5">table</a></span>
|
2016-06-21 05:52:44 +00:00
|
|
|
All skins are stored here.
|
|
|
|
</li>
|
2016-08-21 05:29:16 +00:00
|
|
|
<li><span class="parameter">extensions</span>
|
2016-08-21 07:49:16 +00:00
|
|
|
<span class="types"><a class="type" href="http://www.lua.org/manual/5.1/manual.html#5.5">table</a></span>
|
2016-08-21 05:29:16 +00:00
|
|
|
All extensions are loaded here.
|
|
|
|
</li>
|
2016-06-21 05:52:44 +00:00
|
|
|
<li><span class="parameter">screen</span>
|
2016-08-21 07:49:16 +00:00
|
|
|
<span class="types"><span class="type">Element</span></span>
|
|
|
|
The top level GUI element. Represents the game
|
|
|
|
screen. Initialized in <code>pop.load()</code>
|
2016-06-21 05:52:44 +00:00
|
|
|
</li>
|
|
|
|
<li><span class="parameter">focused</span>
|
2016-08-21 07:49:16 +00:00
|
|
|
<span class="types"><span class="type">Element</span> or <span class="type">false</span></span>
|
|
|
|
The currently focused GUI element (or <code>false</code>
|
|
|
|
if none is focused).
|
2016-06-21 05:52:44 +00:00
|
|
|
</li>
|
2017-04-09 00:10:44 +00:00
|
|
|
<li><span class="parameter">hovered</span>
|
|
|
|
<span class="types"><span class="type">Element</span> or <span class="type">false</span></span>
|
|
|
|
The GUI element the mouse is hovering over
|
|
|
|
(or <code>false</code> if none is hovered over).
|
|
|
|
</li>
|
2016-06-21 05:52:44 +00:00
|
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h3>See also:</h3>
|
|
|
|
<ul>
|
2016-08-21 07:49:16 +00:00
|
|
|
<li><a href="../modules/pop.html#load">pop.load</a></li>
|
|
|
|
<li><a href="../modules/Element.html#">Element</a></li>
|
2016-06-21 05:52:44 +00:00
|
|
|
</ul>
|
|
|
|
|
|
|
|
|
2016-08-21 07:49:16 +00:00
|
|
|
</dd>
|
|
|
|
</dl>
|
|
|
|
<h2 class="section-header "><a name="Issues"></a>Issues</h2>
|
|
|
|
|
|
|
|
<dl class="function">
|
|
|
|
<dt>
|
|
|
|
<a name = "update-todo1"></a>
|
|
|
|
<strong>update-todo1</strong>
|
|
|
|
</dt>
|
|
|
|
<dd>
|
|
|
|
Define Elements and @ see that documentation from here. Generic documentation, not specifically element!
|
|
|
|
data.update boolean controls an element and its children being updated
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
<dt>
|
|
|
|
<a name = "mousemoved-todo2"></a>
|
|
|
|
<strong>mousemoved-todo2</strong>
|
|
|
|
</dt>
|
|
|
|
<dd>
|
|
|
|
Implement a way for an element to attach itself to <code>love.mousemoved()</code> events?
|
2017-04-09 00:10:44 +00:00
|
|
|
checking element against pop.screen so that this only gets called once
|
2016-08-21 07:49:16 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
<dt>
|
|
|
|
<a name = "mousereleased-todo3"></a>
|
|
|
|
<strong>mousereleased-todo3</strong>
|
|
|
|
</dt>
|
|
|
|
<dd>
|
|
|
|
Figure out how to bring a focused element to the front of view (aka the first element in its parent's children).
|
|
|
|
(If I do it right here, the for loop above may break! I need to test/figure this out.)
|
|
|
|
NOTE this might cause an error in the above for loop!
|
|
|
|
basically, move focused element to front of its parent's child
|
|
|
|
element.parent\focusChild element
|
|
|
|
table.insert element.parent, element.parent\removeChild(element),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
<dt>
|
2016-10-31 06:40:40 +00:00
|
|
|
<a name = "textinput-todo4"></a>
|
|
|
|
<strong>textinput-todo4</strong>
|
|
|
|
</dt>
|
|
|
|
<dd>
|
2017-04-08 20:44:31 +00:00
|
|
|
document pop.import
|
2016-10-31 06:40:40 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
<dt>
|
|
|
|
<a name = "textinput-todo4-todo5"></a>
|
|
|
|
<strong>textinput-todo4-todo5</strong>
|
|
|
|
</dt>
|
|
|
|
<dd>
|
2017-04-08 20:44:31 +00:00
|
|
|
document pop.export
|
2016-10-31 06:40:40 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
<dt>
|
|
|
|
<a name = "printElementTree-todo6"></a>
|
|
|
|
<strong>printElementTree-todo6</strong>
|
2016-08-21 07:49:16 +00:00
|
|
|
</dt>
|
|
|
|
<dd>
|
2017-04-11 03:32:31 +00:00
|
|
|
Write debugInfo things for elements.
|
2016-08-21 07:49:16 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-06-21 05:52:44 +00:00
|
|
|
</dd>
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
</div> <!-- id="content" -->
|
|
|
|
</div> <!-- id="main" -->
|
|
|
|
<div id="about">
|
|
|
|
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.3</a></i>
|
2017-04-11 17:42:31 +00:00
|
|
|
<i style="float:right;">Last updated 2017-04-11 10:42:17 </i>
|
2016-06-21 05:52:44 +00:00
|
|
|
</div> <!-- id="about" -->
|
|
|
|
</div> <!-- id="container" -->
|
|
|
|
</body>
|
|
|
|
</html>
|