Skip to content

Commit 6e1a92b

Browse files
committed
deploy: 2afb0bc
0 parents  commit 6e1a92b

23 files changed

Lines changed: 5801 additions & 0 deletions

.nojekyll

Whitespace-only changes.

classes/Block.html

Lines changed: 1554 additions & 0 deletions
Large diffs are not rendered by default.

classes/Image.html

Lines changed: 196 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,196 @@
1+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
2+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3+
<html>
4+
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
5+
<head>
6+
<title>likeliHUD</title>
7+
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
8+
</head>
9+
<body>
10+
11+
<div id="container">
12+
13+
<div id="product">
14+
<div id="product_logo"></div>
15+
<div id="product_name"><big><b></b></big></div>
16+
<div id="product_description"></div>
17+
</div> <!-- id="product" -->
18+
19+
20+
<div id="main">
21+
22+
23+
<!-- Menu -->
24+
25+
<div id="navigation">
26+
<br/>
27+
<h1>likeliHUD</h1>
28+
29+
30+
<ul>
31+
<li><a href="../index.html">Index</a></li>
32+
</ul>
33+
34+
<h2>Contents</h2>
35+
<ul>
36+
<li><a href="#Class_Image">Class Image </a></li>
37+
</ul>
38+
39+
40+
<h2>Classes</h2>
41+
<ul class="nowrap">
42+
<li><a href="../classes/Block.html">Block</a></li>
43+
<li><a href="../classes/Layout.html">Layout</a></li>
44+
<li><a href="../classes/Rectangle.html">Rectangle</a></li>
45+
<li><strong>Image</strong></li>
46+
<li><a href="../classes/Stack.html">Stack</a></li>
47+
<li><a href="../classes/Label.html">Label</a></li>
48+
<li><a href="../classes/ImageButton.html">ImageButton</a></li>
49+
<li><a href="../classes/TextField.html">TextField</a></li>
50+
</ul>
51+
<h2>Modules</h2>
52+
<ul class="nowrap">
53+
<li><a href="../modules/Utils.html">Utils</a></li>
54+
</ul>
55+
<h2>Topics</h2>
56+
<ul class="">
57+
<li><a href="../topics/README.md.html">README</a></li>
58+
</ul>
59+
<h2>Examples</h2>
60+
<ul class="nowrap">
61+
<li><a href="../examples/buttons.lua.html">buttons.lua</a></li>
62+
<li><a href="../examples/events.lua.html">events.lua</a></li>
63+
<li><a href="../examples/fill.lua.html">fill.lua</a></li>
64+
<li><a href="../examples/focus.lua.html">focus.lua</a></li>
65+
<li><a href="../examples/inside.lua.html">inside.lua</a></li>
66+
<li><a href="../examples/layout.lua.html">layout.lua</a></li>
67+
<li><a href="../examples/o.lua.html">o.lua</a></li>
68+
<li><a href="../examples/simple.lua.html">simple.lua</a></li>
69+
<li><a href="../examples/squares.lua.html">squares.lua</a></li>
70+
<li><a href="../examples/start.lua.html">start.lua</a></li>
71+
</ul>
72+
73+
</div>
74+
75+
<div id="content">
76+
77+
<h1>Class <code>Image</code></h1>
78+
<p>Used to place an image.</p>
79+
<p>
80+
81+
</p>
82+
83+
84+
<h2><a href="#Class_Image">Class Image </a></h2>
85+
<table class="function_list">
86+
<tr>
87+
<td class="name" nowrap><a href="#image:new">image:new ()</a></td>
88+
<td class="summary">Constructor.</td>
89+
</tr>
90+
</table>
91+
92+
<br/>
93+
<br/>
94+
95+
96+
<h2 class="section-header has-description"><a name="Class_Image"></a>Class Image </h2>
97+
98+
<div class="section-description">
99+
Represents an image.
100+
</div>
101+
<dl class="function">
102+
<dt>
103+
<a name = "image:new"></a>
104+
<strong>image:new ()</strong>
105+
</dt>
106+
<dd>
107+
108+
<p>Constructor. </p>
109+
110+
<ul>
111+
<li><code>path</code> : a string.
112+
Path to the image (<code>filename</code> in <a href="https://www.love2d.org/wiki/love.graphics.newImage">love2d</a>).</li>
113+
<li><code>quad</code> : a table. It contains information about quads in the image. It has two fields:
114+
<ul>
115+
<li><code>layout</code> : a table of the form <code>{ rows = n, columns = m }</code>, where <code>n</code> and <code>m</code> are positive
116+
integers.</li>
117+
<li><code>current</code> : a positive integer. The current quad index. The quad index goes from left to
118+
right, top to bottom.</li>
119+
</ul></li>
120+
</ul>
121+
122+
<p> Default <code>quad</code> is</p>
123+
124+
<pre><code>self.quad = {
125+
layout = {
126+
rows = 1,
127+
columns = 1,
128+
},
129+
current = 1,
130+
}
131+
</code></pre>
132+
<p> i.e. if not specified it is assumed there is only one quad in the image - the image itself.
133+
<em>NOTE:</em> the quads must</p>
134+
135+
<ul>
136+
<li>be of the same size.</li>
137+
<li>not have spacing in between.</li>
138+
<li>be placed in a grid <code>quad.layout.rows</code> by <code>quad.layout.columns</code> inside the image.</li>
139+
</ul>
140+
141+
<p> Provided you have an image at <code>path/to/my/awesome/image.png</code> that looks like this:</p>
142+
143+
<pre><code>┌────────┬────────┐
144+
│ ▚▞ │ ▞▚ │
145+
│ │ │
146+
│ │ │
147+
├────────┼────────┤
148+
│ ▞ │ ▞ │
149+
│ ▚ │ ▞ │
150+
│ │ │
151+
└────────┴────────┘
152+
</code></pre>
153+
<p> the code</p>
154+
155+
<pre><code>local image = ui.Image {
156+
path = 'path/to/my/awesome/image.png',
157+
quad = {
158+
layout = {
159+
rows = 2,
160+
columns = 2,
161+
},
162+
current = 3,
163+
}
164+
}
165+
166+
image:place(0, 0, 100, 100)
167+
image:draw()
168+
</code></pre>
169+
<p> will draw:</p>
170+
<pre><code>┌────────┐
171+
│ ▞ │
172+
│ ▚ │
173+
│ │
174+
└────────┘
175+
</code></pre>
176+
177+
178+
179+
180+
181+
182+
183+
184+
</dd>
185+
</dl>
186+
187+
188+
</div> <!-- id="content" -->
189+
</div> <!-- id="main" -->
190+
<div id="about">
191+
<i>generated by <a href="http://github.com/lunarmodules/LDoc">LDoc 1.5.0</a></i>
192+
<i style="float:right;">Last updated 2026-06-08 14:52:17 </i>
193+
</div> <!-- id="about" -->
194+
</div> <!-- id="container" -->
195+
</body>
196+
</html>

classes/ImageButton.html

Lines changed: 168 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,168 @@
1+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
2+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3+
<html>
4+
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
5+
<head>
6+
<title>likeliHUD</title>
7+
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
8+
</head>
9+
<body>
10+
11+
<div id="container">
12+
13+
<div id="product">
14+
<div id="product_logo"></div>
15+
<div id="product_name"><big><b></b></big></div>
16+
<div id="product_description"></div>
17+
</div> <!-- id="product" -->
18+
19+
20+
<div id="main">
21+
22+
23+
<!-- Menu -->
24+
25+
<div id="navigation">
26+
<br/>
27+
<h1>likeliHUD</h1>
28+
29+
30+
<ul>
31+
<li><a href="../index.html">Index</a></li>
32+
</ul>
33+
34+
<h2>Contents</h2>
35+
<ul>
36+
<li><a href="#Class_ImageButton">Class ImageButton </a></li>
37+
</ul>
38+
39+
40+
<h2>Classes</h2>
41+
<ul class="nowrap">
42+
<li><a href="../classes/Block.html">Block</a></li>
43+
<li><a href="../classes/Layout.html">Layout</a></li>
44+
<li><a href="../classes/Rectangle.html">Rectangle</a></li>
45+
<li><a href="../classes/Image.html">Image</a></li>
46+
<li><a href="../classes/Stack.html">Stack</a></li>
47+
<li><a href="../classes/Label.html">Label</a></li>
48+
<li><strong>ImageButton</strong></li>
49+
<li><a href="../classes/TextField.html">TextField</a></li>
50+
</ul>
51+
<h2>Modules</h2>
52+
<ul class="nowrap">
53+
<li><a href="../modules/Utils.html">Utils</a></li>
54+
</ul>
55+
<h2>Topics</h2>
56+
<ul class="">
57+
<li><a href="../topics/README.md.html">README</a></li>
58+
</ul>
59+
<h2>Examples</h2>
60+
<ul class="nowrap">
61+
<li><a href="../examples/buttons.lua.html">buttons.lua</a></li>
62+
<li><a href="../examples/events.lua.html">events.lua</a></li>
63+
<li><a href="../examples/fill.lua.html">fill.lua</a></li>
64+
<li><a href="../examples/focus.lua.html">focus.lua</a></li>
65+
<li><a href="../examples/inside.lua.html">inside.lua</a></li>
66+
<li><a href="../examples/layout.lua.html">layout.lua</a></li>
67+
<li><a href="../examples/o.lua.html">o.lua</a></li>
68+
<li><a href="../examples/simple.lua.html">simple.lua</a></li>
69+
<li><a href="../examples/squares.lua.html">squares.lua</a></li>
70+
<li><a href="../examples/start.lua.html">start.lua</a></li>
71+
</ul>
72+
73+
</div>
74+
75+
<div id="content">
76+
77+
<h1>Class <code>ImageButton</code></h1>
78+
<p>An image button.</p>
79+
<p> Internally it is an <a href="../classes/Image.html#">Image</a> with a predefined <code>mouse</code> field.</p>
80+
81+
82+
<h2><a href="#Class_ImageButton">Class ImageButton </a></h2>
83+
<table class="function_list">
84+
<tr>
85+
<td class="name" nowrap><a href="#imagebutton:new">imagebutton:new ()</a></td>
86+
<td class="summary">Constructor.</td>
87+
</tr>
88+
</table>
89+
90+
<br/>
91+
<br/>
92+
93+
94+
<h2 class="section-header has-description"><a name="Class_ImageButton"></a>Class ImageButton </h2>
95+
96+
<div class="section-description">
97+
Represents an image button.
98+
</div>
99+
<dl class="function">
100+
<dt>
101+
<a name = "imagebutton:new"></a>
102+
<strong>imagebutton:new ()</strong>
103+
</dt>
104+
<dd>
105+
Constructor. </p>
106+
107+
<p> It is <a href="../classes/Image.html#">Image</a> under the hood so it has same fields as described in
108+
<a href="../classes/Image.html#image:new">Image:new</a>.</p>
109+
110+
<ul>
111+
<li><p><code>quad</code> : ⚠️ The number of quads <em>must</em> be equal to 3.
112+
These quads are supposed to display different states of the button: the
113+
current quad is set according to the state of the button as follows
114+
(see also the <code>mouse</code> property in <a href="../classes/Block.html#block:new">Block:new</a>): </p>
115+
116+
<pre><code> | onExit | onEnter | onPress | onClick |
117+
|--------|---------|---------|---------|
118+
quad.current | 1 | 2 | 3 | 2 |
119+
</code></pre></li>
120+
<li><p><code>onClick</code> : a function. Called whenever the button is clicked. The button object itself
121+
is passed to that function on call.</p></li>
122+
<li><p><code>mouse</code> : ⚠️ Don't override this property. If you want a button with
123+
a custom mouse
124+
better to create it from scratch as a user-defined block.</p></li>
125+
</ul>
126+
127+
<p> <em>NOTE</em> : this is not a text button - use the <code>inside</code> (see <a href="../classes/Block.html#block:new">Block:new</a>)
128+
property to place a <a href="../classes/Label.html#">Label</a> inside a button.
129+
130+
131+
132+
133+
134+
135+
<h3>Usage:</h3>
136+
<ul>
137+
<pre class="example"><span class="keyword">local</span> UI = ui.<span class="function-name">ImageButton</span> {
138+
path = <span class="string">'/path/to/button.png'</span>,
139+
140+
quad = {
141+
layout = {
142+
rows = <span class="number">3</span>,
143+
columns = <span class="number">1</span>,
144+
},
145+
},
146+
147+
<span class="comment">-- Make the button display text
148+
</span> inside = {
149+
ui.<span class="function-name">Label</span> {
150+
text = <span class="string">'Ok'</span>
151+
}
152+
}
153+
}</pre>
154+
</ul>
155+
156+
</dd>
157+
</dl>
158+
159+
160+
</div> <!-- id="content" -->
161+
</div> <!-- id="main" -->
162+
<div id="about">
163+
<i>generated by <a href="http://github.com/lunarmodules/LDoc">LDoc 1.5.0</a></i>
164+
<i style="float:right;">Last updated 2026-06-08 14:52:17 </i>
165+
</div> <!-- id="about" -->
166+
</div> <!-- id="container" -->
167+
</body>
168+
</html>

0 commit comments

Comments
 (0)