wip shits

This commit is contained in:
Paul Liverman III 2016-08-02 16:30:59 -07:00
parent e9a53622af
commit 028bc423a0
9 changed files with 151 additions and 40 deletions

View File

@ -1,5 +1,6 @@
file = {
"init.moon",
"main.moon",
"util.moon",
}

View File

@ -32,6 +32,7 @@
<h2>Modules</h2>
<ul class="$(kind=='Topics' and '' or 'nowrap'">
<li><a href="modules/pop.html">pop</a></li>
<li><a href="modules/main.html">main</a></li>
<li><a href="modules/util.html">util</a></li>
</ul>
@ -48,6 +49,10 @@
<td class="name" nowrap><a href="modules/pop.html">pop</a></td>
<td class="summary">The Pop.Box GUI itself.</td>
</tr>
<tr>
<td class="name" nowrap><a href="modules/main.html">main</a></td>
<td class="summary">A demo program for Pop.Box.</td>
</tr>
<tr>
<td class="name" nowrap><a href="modules/util.html">util</a></td>
<td class="summary">Utility functions, intended for internal use only.</td>
@ -58,7 +63,7 @@
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.3</a></i>
<i style="float:right;">Last updated 2016-08-02 16:09:51 </i>
<i style="float:right;">Last updated 2016-08-02 16:30:36 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>

106
docs/modules/main.html Normal file
View File

@ -0,0 +1,106 @@
<!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>
</ul>
<h2>Modules</h2>
<ul class="$(kind=='Topics' and '' or 'nowrap'">
<li><a href="../modules/pop.html">pop</a></li>
<li><strong>main</strong></li>
<li><a href="../modules/util.html">util</a></li>
</ul>
</div>
<div id="content">
<h1>Module <code>main</code></h1>
<p>A demo program for Pop.Box.</p>
<p>
</p>
<h3>Info:</h3>
<ul>
<li><strong>Copyright</strong>: Paul Liverman III (2016)</li>
<li><strong>License</strong>: The MIT License (MIT)</li>
</ul>
<h2><a href="#Functions">Functions</a></h2>
<table class="function_list">
<tr>
<td class="name" nowrap><a href="#pop">pop ()</a></td>
<td class="summary">
</td>
</tr>
</table>
<br/>
<br/>
<h2 class="section-header "><a name="Functions"></a>Functions</h2>
<dl class="function">
<dt>
<a name = "pop"></a>
<strong>pop ()</strong>
</dt>
<dd>
</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>
<i style="float:right;">Last updated 2016-08-02 16:30:36 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
</html>

View File

@ -41,6 +41,7 @@
<h2>Modules</h2>
<ul class="$(kind=='Topics' and '' or 'nowrap'">
<li><strong>pop</strong></li>
<li><a href="../modules/main.html">main</a></li>
<li><a href="../modules/util.html">util</a></li>
</ul>
@ -56,7 +57,7 @@
<h3>Info:</h3>
<ul>
<li><strong>Copyright</strong>: Paul Liverman III (2015-2016)</li>
<li><strong>Release</strong>: v0.0.0</li>
<li><strong>Release</strong>: 0.0.0</li>
<li><strong>License</strong>: The MIT License (MIT)</li>
</ul>
@ -128,20 +129,16 @@
<h2><a href="#Issues">Issues</a></h2>
<table class="function_list">
<tr>
<td class="name" nowrap><a href="#pop-todo1">pop-todo1</a></td>
<td class="summary">Find out what happens if someone requires the <code>init.lua</code> / <code>init.moon</code> file instead of the directory, add an error message for this.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#load-todo2">load-todo2</a></td>
<td class="name" nowrap><a href="#load-todo1">load-todo1</a></td>
<td class="summary">Determine if extensions should have a reference saved (and the possibility of a load function?)
require into pop.extensions by filename</td>
</tr>
<tr>
<td class="name" nowrap><a href="#mousemoved-todo3">mousemoved-todo3</a></td>
<td class="name" nowrap><a href="#mousemoved-todo2">mousemoved-todo2</a></td>
<td class="summary">Implement a way for an element to attach itself to <code>love.mousemoved()</code> events?</td>
</tr>
<tr>
<td class="name" nowrap><a href="#mousereleased-todo4">mousereleased-todo4</a></td>
<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!
@ -536,22 +533,8 @@ table.insert element.parent, element.parent\removeChild(element),</td>
<dl class="function">
<dt>
<a name = "pop-todo1"></a>
<strong>pop-todo1</strong>
</dt>
<dd>
Find out what happens if someone requires the <code>init.lua</code> / <code>init.moon</code> file instead of the directory, add an error message for this.
</dd>
<dt>
<a name = "load-todo2"></a>
<strong>load-todo2</strong>
<a name = "load-todo1"></a>
<strong>load-todo1</strong>
</dt>
<dd>
Determine if extensions should have a reference saved (and the possibility of a load function?)
@ -565,8 +548,8 @@ table.insert element.parent, element.parent\removeChild(element),</td>
</dd>
<dt>
<a name = "mousemoved-todo3"></a>
<strong>mousemoved-todo3</strong>
<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?
@ -579,8 +562,8 @@ table.insert element.parent, element.parent\removeChild(element),</td>
</dd>
<dt>
<a name = "mousereleased-todo4"></a>
<strong>mousereleased-todo4</strong>
<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).
@ -604,7 +587,7 @@ table.insert element.parent, element.parent\removeChild(element),
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.3</a></i>
<i style="float:right;">Last updated 2016-08-02 16:09:51 </i>
<i style="float:right;">Last updated 2016-08-02 16:30:36 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>

View File

@ -39,6 +39,7 @@
<h2>Modules</h2>
<ul class="$(kind=='Topics' and '' or 'nowrap'">
<li><a href="../modules/pop.html">pop</a></li>
<li><a href="../modules/main.html">main</a></li>
<li><strong>util</strong></li>
</ul>
@ -112,7 +113,7 @@
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.3</a></i>
<i style="float:right;">Last updated 2016-08-02 16:09:51 </i>
<i style="float:right;">Last updated 2016-08-02 16:30:36 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>

View File

@ -1,5 +1,5 @@
local pop = {
_VERSION = 'Pop.Box v0.0.0',
_VERSION = '0.0.0',
_DESCRIPTION = 'GUI library for LOVE, designed for ease of use',
_URL = 'http://github.com/Guard13007/Pop.Box',
_LICENSE = 'The MIT License (MIT)',
@ -8,6 +8,10 @@ local pop = {
if not (love.getVersion) then
error("Pop.Box only supports LOVE versions >= 0.9.1")
end
if (...):sub(-4) == "init" then
error("Pop.Box must be required by its containing folder")
end
local path = ...
local filesystem, graphics
do
local _obj_0 = love
@ -16,8 +20,7 @@ end
local insert
insert = table.insert
local inheritsFromElement
inheritsFromElement = require(tostring(...) .. "/util").inheritsFromElement
local path = ...
inheritsFromElement = require(tostring(path) .. "/util").inheritsFromElement
pop.elements = { }
pop.skins = { }
pop.screen = false

View File

@ -2,10 +2,10 @@
--- @module pop
--- @copyright Paul Liverman III (2015-2016)
--- @license The MIT License (MIT)
--- @release v0.0.0
--- @release 0.0.0
pop = {
_VERSION: 'Pop.Box v0.0.0'
_VERSION: '0.0.0'
_DESCRIPTION: 'GUI library for LOVE, designed for ease of use'
_URL: 'http://github.com/Guard13007/Pop.Box'
_LICENSE: 'The MIT License (MIT)'
@ -15,13 +15,14 @@ pop = {
unless love.getVersion
error "Pop.Box only supports LOVE versions >= 0.9.1"
--- @todo Find out what happens if someone requires the `init.lua` / `init.moon` file instead of the directory, add an error message for this.
if (...)\sub(-4) == "init"
error "Pop.Box must be required by its containing folder"
path = ...
import filesystem, graphics from love
import insert from table
import inheritsFromElement from require "#{...}/util"
path = ...
import inheritsFromElement from require "#{path}/util"
--- @table pop
--- @field elements All GUI classes are stored here.

2
main.lua Normal file
View File

@ -0,0 +1,2 @@
local pop = require("init")
return print(pop, pop.elements)

9
main.moon Normal file
View File

@ -0,0 +1,9 @@
--- A demo program for Pop.Box.
--- @copyright Paul Liverman III (2016)
--- @license The MIT License (MIT)
--- @todo write this!
pop = require "init"
print(pop, pop.elements)