|
|
|
|
@@ -323,39 +323,63 @@ button:clone(<span class="string">'CustomButton'</span>)
|
|
|
|
|
<tbody>
|
|
|
|
|
<tr>
|
|
|
|
|
<td class="name"><a href="#button">button</a></td>
|
|
|
|
|
<td class="summary">The basic button element</td>
|
|
|
|
|
<td class="summary">Clickable elements that fire on_gui_click when clicked.</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td class="name"><a href="#checkbox">checkbox</a></td>
|
|
|
|
|
<td class="summary">The basic checkbox element</td>
|
|
|
|
|
<td class="summary">Clickable elements with a cross in the middle that can be turned off or on.</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td class="name"><a href="#dropdown">dropdown</a></td>
|
|
|
|
|
<td class="summary">The basic dropdown element</td>
|
|
|
|
|
<td class="summary">A drop down list of other elements.</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td class="name"><a href="#elem_button">elem_button</a></td>
|
|
|
|
|
<td class="summary">The basic dropdown element</td>
|
|
|
|
|
<td class="summary">A button that lets the player pick one of an: item, entity, tile, or signal similar to the filter-select window.</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td class="name"><a href="#empty">empty</a></td>
|
|
|
|
|
<td class="summary">A empty widget that just exists.</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td class="name"><a href="#flow">flow</a></td>
|
|
|
|
|
<td class="summary">Invisible containers that lay out children either horizontally or vertically.</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td class="name"><a href="#frame">frame</a></td>
|
|
|
|
|
<td class="summary">The basic frame element</td>
|
|
|
|
|
<td class="summary">Grey semi-transparent boxes that contain other elements.</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td class="name"><a href="#frame">frame</a></td>
|
|
|
|
|
<td class="summary">A piece of text.</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td class="name"><a href="#line">line</a></td>
|
|
|
|
|
<td class="summary">A vertical or horizontal line.</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td class="name"><a href="#progress_bar">progress_bar</a></td>
|
|
|
|
|
<td class="summary">The basic checkbox element</td>
|
|
|
|
|
<td class="summary">Indicate progress by displaying a partially filled bar.</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td class="name"><a href="#scroll">scroll</a></td>
|
|
|
|
|
<td class="summary">Similar to a flow but includes the ability to show and use scroll bars.</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td class="name"><a href="#slider">slider</a></td>
|
|
|
|
|
<td class="summary">The basic slider element</td>
|
|
|
|
|
<td class="summary">A number picker.</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td class="name"><a href="#table">table</a></td>
|
|
|
|
|
<td class="summary">An invisible container that lays out children in a specific number of columns.</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td class="name"><a href="#text_box">text_box</a></td>
|
|
|
|
|
<td class="summary">The text box element</td>
|
|
|
|
|
<td class="summary">A multi-line text box that supports selection and copy-paste.</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td class="name"><a href="#text_field">text_field</a></td>
|
|
|
|
|
<td class="summary">The text field element</td>
|
|
|
|
|
<td class="summary">Boxes of text the user can type in.</td>
|
|
|
|
|
</tr>
|
|
|
|
|
</tbody>
|
|
|
|
|
</table>
|
|
|
|
|
@@ -636,7 +660,7 @@ button:clone(<span class="string">'CustomButton'</span>)
|
|
|
|
|
<dd>
|
|
|
|
|
<div class="section-item-body">
|
|
|
|
|
|
|
|
|
|
<p class="section-item-summary">The basic button element</p>
|
|
|
|
|
<p class="section-item-summary">Clickable elements that fire on_gui_click when clicked.</p>
|
|
|
|
|
<p class="section-item-description"></p>
|
|
|
|
|
|
|
|
|
|
<!-- parameters start -->
|
|
|
|
|
@@ -780,7 +804,7 @@ Gui.clone_concept(<span class="string">'button'</span>,<span class="string">'spr
|
|
|
|
|
<dd>
|
|
|
|
|
<div class="section-item-body">
|
|
|
|
|
|
|
|
|
|
<p class="section-item-summary">The basic checkbox element</p>
|
|
|
|
|
<p class="section-item-summary">Clickable elements with a cross in the middle that can be turned off or on.</p>
|
|
|
|
|
<p class="section-item-description"></p>
|
|
|
|
|
|
|
|
|
|
<!-- parameters start -->
|
|
|
|
|
@@ -902,7 +926,7 @@ Gui.clone_concept(<span class="string">'checkbox'</span>,<span class="string">'b
|
|
|
|
|
<dd>
|
|
|
|
|
<div class="section-item-body">
|
|
|
|
|
|
|
|
|
|
<p class="section-item-summary">The basic dropdown element</p>
|
|
|
|
|
<p class="section-item-summary">A drop down list of other elements.</p>
|
|
|
|
|
<p class="section-item-description"></p>
|
|
|
|
|
|
|
|
|
|
<!-- parameters start -->
|
|
|
|
|
@@ -1038,7 +1062,7 @@ Gui.clone_concept(<span class="string">'dropdown'</span>,<span class="string">'d
|
|
|
|
|
<dd>
|
|
|
|
|
<div class="section-item-body">
|
|
|
|
|
|
|
|
|
|
<p class="section-item-summary">The basic dropdown element</p>
|
|
|
|
|
<p class="section-item-summary">A button that lets the player pick one of an: item, entity, tile, or signal similar to the filter-select window.</p>
|
|
|
|
|
<p class="section-item-description"></p>
|
|
|
|
|
|
|
|
|
|
<!-- parameters start -->
|
|
|
|
|
@@ -1115,6 +1139,121 @@ Gui.clone_concept(<span class="string">'elem_button'</span>,<span class="string"
|
|
|
|
|
<span class="keyword">end</span>)</code></pre>
|
|
|
|
|
<!-- usage end -->
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
<dt>
|
|
|
|
|
<div class="divider divider-custom"></div>
|
|
|
|
|
<div class="block section-item-header">
|
|
|
|
|
<a href="#empty" class="fragment-hashtag">#</a>
|
|
|
|
|
<span class="section-item-title" id="empty">empty</span>
|
|
|
|
|
</div>
|
|
|
|
|
</dt>
|
|
|
|
|
<dd>
|
|
|
|
|
<div class="section-item-body">
|
|
|
|
|
|
|
|
|
|
<p class="section-item-summary">A empty widget that just exists.</p>
|
|
|
|
|
<p class="section-item-description"> The root GUI element screen is an empty-widget.</p>
|
|
|
|
|
|
|
|
|
|
<!-- parameters start -->
|
|
|
|
|
<strong>Properties / Events:</strong>
|
|
|
|
|
|
|
|
|
|
<ul>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="section-subitem-li">
|
|
|
|
|
|
|
|
|
|
<strong><em>style</em></strong>
|
|
|
|
|
|
|
|
|
|
<strong> : </strong>
|
|
|
|
|
|
|
|
|
|
(<span class="types"><a class="type" href="http://lua-api.factorio.com/latest/Builtin-Types.html#string">string</a></span>)
|
|
|
|
|
|
|
|
|
|
the style that the element will have
|
|
|
|
|
|
|
|
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
<!-- parameters end -->
|
|
|
|
|
|
|
|
|
|
<!-- returns start -->
|
|
|
|
|
<!-- returns end -->
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- see also start -->
|
|
|
|
|
<!-- see also end -->
|
|
|
|
|
|
|
|
|
|
<!-- usage start -->
|
|
|
|
|
<strong>Usage:</strong>
|
|
|
|
|
<pre class="code" data-lang="Lua"><code><span class="comment">-- Making a draggable space styled widget
|
|
|
|
|
</span><span class="keyword">local</span> draggable_space =
|
|
|
|
|
Gui.clone_concept(<span class="string">'empty'</span>,<span class="string">'draggable_space'</span>)
|
|
|
|
|
:set_style(<span class="string">'draggable_space'</span>)</code></pre>
|
|
|
|
|
<!-- usage end -->
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
<dt>
|
|
|
|
|
<div class="divider divider-custom"></div>
|
|
|
|
|
<div class="block section-item-header">
|
|
|
|
|
<a href="#flow" class="fragment-hashtag">#</a>
|
|
|
|
|
<span class="section-item-title" id="flow">flow</span>
|
|
|
|
|
</div>
|
|
|
|
|
</dt>
|
|
|
|
|
<dd>
|
|
|
|
|
<div class="section-item-body">
|
|
|
|
|
|
|
|
|
|
<p class="section-item-summary">Invisible containers that lay out children either horizontally or vertically.</p>
|
|
|
|
|
<p class="section-item-description"> The root GUI elements (top, left and center; see LuaGui) are flows.</p>
|
|
|
|
|
|
|
|
|
|
<!-- parameters start -->
|
|
|
|
|
<strong>Properties / Events:</strong>
|
|
|
|
|
|
|
|
|
|
<ul>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="section-subitem-li">
|
|
|
|
|
|
|
|
|
|
<strong><em>direction</em></strong>
|
|
|
|
|
|
|
|
|
|
<strong> : </strong>
|
|
|
|
|
|
|
|
|
|
(<span class="types"><a class="type" href="http://lua-api.factorio.com/latest/Builtin-Types.html#string">string</a></span>)
|
|
|
|
|
|
|
|
|
|
the direction that children will be added
|
|
|
|
|
|
|
|
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
<!-- parameters end -->
|
|
|
|
|
|
|
|
|
|
<!-- returns start -->
|
|
|
|
|
<!-- returns end -->
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- see also start -->
|
|
|
|
|
<!-- see also end -->
|
|
|
|
|
|
|
|
|
|
<!-- usage start -->
|
|
|
|
|
<strong>Usage:</strong>
|
|
|
|
|
<pre class="code" data-lang="Lua"><code><span class="comment">-- Making a basic flow, contains a label with hello world
|
|
|
|
|
</span><span class="keyword">local</span> basic_flow =
|
|
|
|
|
Gui.clone_concept(<span class="string">'flow'</span>,<span class="string">'basic_flow'</span>)
|
|
|
|
|
:define_draw(<span class="keyword">function</span>(properties,parent,element)
|
|
|
|
|
element.add{
|
|
|
|
|
<span class="global">type</span> = <span class="string">'label'</span>,
|
|
|
|
|
caption = <span class="string">'Hello, World!'</span>
|
|
|
|
|
}
|
|
|
|
|
<span class="keyword">end</span>)</code></pre>
|
|
|
|
|
<!-- usage end -->
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
<dt>
|
|
|
|
|
<div class="divider divider-custom"></div>
|
|
|
|
|
@@ -1126,8 +1265,8 @@ Gui.clone_concept(<span class="string">'elem_button'</span>,<span class="string"
|
|
|
|
|
<dd>
|
|
|
|
|
<div class="section-item-body">
|
|
|
|
|
|
|
|
|
|
<p class="section-item-summary">The basic frame element</p>
|
|
|
|
|
<p class="section-item-description"></p>
|
|
|
|
|
<p class="section-item-summary">Grey semi-transparent boxes that contain other elements.</p>
|
|
|
|
|
<p class="section-item-description"> They have a caption, and, just like flows, they lay out children either horizontally or vertically.</p>
|
|
|
|
|
|
|
|
|
|
<!-- parameters start -->
|
|
|
|
|
<strong>Properties / Events:</strong>
|
|
|
|
|
@@ -1182,7 +1321,7 @@ Gui.clone_concept(<span class="string">'elem_button'</span>,<span class="string"
|
|
|
|
|
<strong>Usage:</strong>
|
|
|
|
|
<pre class="code" data-lang="Lua"><code><span class="comment">-- Making a basic frame, contains a label with hello world
|
|
|
|
|
</span><span class="keyword">local</span> basic_frame =
|
|
|
|
|
Gui.clone_concept(<span class="string">'dropdown'</span>,<span class="string">'basic_frame'</span>)
|
|
|
|
|
Gui.clone_concept(<span class="string">'frame'</span>,<span class="string">'basic_frame'</span>)
|
|
|
|
|
:set_title(<span class="string">'Basic Frame'</span>)
|
|
|
|
|
:define_draw(<span class="keyword">function</span>(properties,parent,element)
|
|
|
|
|
element.add{
|
|
|
|
|
@@ -1192,6 +1331,131 @@ Gui.clone_concept(<span class="string">'dropdown'</span>,<span class="string">'b
|
|
|
|
|
<span class="keyword">end</span>)</code></pre>
|
|
|
|
|
<!-- usage end -->
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
<dt>
|
|
|
|
|
<div class="divider divider-custom"></div>
|
|
|
|
|
<div class="block section-item-header">
|
|
|
|
|
<a href="#frame" class="fragment-hashtag">#</a>
|
|
|
|
|
<span class="section-item-title" id="frame">frame</span>
|
|
|
|
|
</div>
|
|
|
|
|
</dt>
|
|
|
|
|
<dd>
|
|
|
|
|
<div class="section-item-body">
|
|
|
|
|
|
|
|
|
|
<p class="section-item-summary">A piece of text.</p>
|
|
|
|
|
<p class="section-item-description"></p>
|
|
|
|
|
|
|
|
|
|
<!-- parameters start -->
|
|
|
|
|
<strong>Properties / Events:</strong>
|
|
|
|
|
|
|
|
|
|
<ul>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="section-subitem-li">
|
|
|
|
|
|
|
|
|
|
<strong><em>caption</em></strong>
|
|
|
|
|
|
|
|
|
|
<strong> : </strong>
|
|
|
|
|
|
|
|
|
|
(<span class="types"><a class="type" href="http://lua-api.factorio.com/latest/Builtin-Types.html#string">string</a> or <a class="type" href="http://lua-api.factorio.com/latest/Concepts.html#LocalisedString">LocalisedString</a></span>)
|
|
|
|
|
|
|
|
|
|
the caption that will show in the label
|
|
|
|
|
|
|
|
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="section-subitem-li">
|
|
|
|
|
|
|
|
|
|
<strong><em>description</em></strong>
|
|
|
|
|
|
|
|
|
|
<strong> : </strong>
|
|
|
|
|
|
|
|
|
|
(<span class="types"><a class="type" href="http://lua-api.factorio.com/latest/Builtin-Types.html#string">string</a> or <a class="type" href="http://lua-api.factorio.com/latest/Concepts.html#LocalisedString">LocalisedString</a></span>)
|
|
|
|
|
|
|
|
|
|
the description that will show on the label
|
|
|
|
|
|
|
|
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
<!-- parameters end -->
|
|
|
|
|
|
|
|
|
|
<!-- returns start -->
|
|
|
|
|
<!-- returns end -->
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- see also start -->
|
|
|
|
|
<!-- see also end -->
|
|
|
|
|
|
|
|
|
|
<!-- usage start -->
|
|
|
|
|
<strong>Usage:</strong>
|
|
|
|
|
<pre class="code" data-lang="Lua"><code><span class="comment">-- Making a basic label
|
|
|
|
|
</span><span class="keyword">local</span> basic_label =
|
|
|
|
|
Gui.clone_concept(<span class="string">'label'</span>,<span class="string">'basic_label'</span>)
|
|
|
|
|
:set_caption(<span class="string">'Hello, World!'</span>)</code></pre>
|
|
|
|
|
<!-- usage end -->
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
<dt>
|
|
|
|
|
<div class="divider divider-custom"></div>
|
|
|
|
|
<div class="block section-item-header">
|
|
|
|
|
<a href="#line" class="fragment-hashtag">#</a>
|
|
|
|
|
<span class="section-item-title" id="line">line</span>
|
|
|
|
|
</div>
|
|
|
|
|
</dt>
|
|
|
|
|
<dd>
|
|
|
|
|
<div class="section-item-body">
|
|
|
|
|
|
|
|
|
|
<p class="section-item-summary">A vertical or horizontal line.</p>
|
|
|
|
|
<p class="section-item-description"></p>
|
|
|
|
|
|
|
|
|
|
<!-- parameters start -->
|
|
|
|
|
<strong>Properties / Events:</strong>
|
|
|
|
|
|
|
|
|
|
<ul>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="section-subitem-li">
|
|
|
|
|
|
|
|
|
|
<strong><em>direction</em></strong>
|
|
|
|
|
|
|
|
|
|
<strong> : </strong>
|
|
|
|
|
|
|
|
|
|
(<span class="types"><a class="type" href="http://lua-api.factorio.com/latest/Builtin-Types.html#string">string</a></span>)
|
|
|
|
|
|
|
|
|
|
the direction that children will be added
|
|
|
|
|
|
|
|
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
<!-- parameters end -->
|
|
|
|
|
|
|
|
|
|
<!-- returns start -->
|
|
|
|
|
<!-- returns end -->
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- see also start -->
|
|
|
|
|
<!-- see also end -->
|
|
|
|
|
|
|
|
|
|
<!-- usage start -->
|
|
|
|
|
<strong>Usage:</strong>
|
|
|
|
|
<pre class="code" data-lang="Lua"><code><span class="comment">-- Making a basic frame, contains a label with hello world
|
|
|
|
|
</span><span class="keyword">local</span> basic_line =
|
|
|
|
|
Gui.clone_concept(<span class="string">'line'</span>,<span class="string">'basic_line'</span>)</code></pre>
|
|
|
|
|
<!-- usage end -->
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
<dt>
|
|
|
|
|
<div class="divider divider-custom"></div>
|
|
|
|
|
@@ -1203,7 +1467,7 @@ Gui.clone_concept(<span class="string">'dropdown'</span>,<span class="string">'b
|
|
|
|
|
<dd>
|
|
|
|
|
<div class="section-item-body">
|
|
|
|
|
|
|
|
|
|
<p class="section-item-summary">The basic checkbox element</p>
|
|
|
|
|
<p class="section-item-summary">Indicate progress by displaying a partially filled bar.</p>
|
|
|
|
|
<p class="section-item-description"></p>
|
|
|
|
|
|
|
|
|
|
<!-- parameters start -->
|
|
|
|
|
@@ -1319,6 +1583,85 @@ Gui.clone_concept(<span class="string">'progress_bar'</span>,<span class="string
|
|
|
|
|
<span class="keyword">end</span>)</code></pre>
|
|
|
|
|
<!-- usage end -->
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
<dt>
|
|
|
|
|
<div class="divider divider-custom"></div>
|
|
|
|
|
<div class="block section-item-header">
|
|
|
|
|
<a href="#scroll" class="fragment-hashtag">#</a>
|
|
|
|
|
<span class="section-item-title" id="scroll">scroll</span>
|
|
|
|
|
</div>
|
|
|
|
|
</dt>
|
|
|
|
|
<dd>
|
|
|
|
|
<div class="section-item-body">
|
|
|
|
|
|
|
|
|
|
<p class="section-item-summary">Similar to a flow but includes the ability to show and use scroll bars.</p>
|
|
|
|
|
<p class="section-item-description"></p>
|
|
|
|
|
|
|
|
|
|
<!-- parameters start -->
|
|
|
|
|
<strong>Properties / Events:</strong>
|
|
|
|
|
|
|
|
|
|
<ul>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="section-subitem-li">
|
|
|
|
|
|
|
|
|
|
<strong><em>horizontal_scroll</em></strong>
|
|
|
|
|
|
|
|
|
|
<strong> : </strong>
|
|
|
|
|
|
|
|
|
|
(<span class="types"><a class="type" href="http://lua-api.factorio.com/latest/Builtin-Types.html#string">string</a></span>)
|
|
|
|
|
|
|
|
|
|
the horizontal scroll policy for this scroll pane
|
|
|
|
|
|
|
|
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="section-subitem-li">
|
|
|
|
|
|
|
|
|
|
<strong><em>vertical_scroll</em></strong>
|
|
|
|
|
|
|
|
|
|
<strong> : </strong>
|
|
|
|
|
|
|
|
|
|
(<span class="types"><a class="type" href="http://lua-api.factorio.com/latest/Builtin-Types.html#string">string</a></span>)
|
|
|
|
|
|
|
|
|
|
the vertical scroll policy for this scroll pane
|
|
|
|
|
|
|
|
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
<!-- parameters end -->
|
|
|
|
|
|
|
|
|
|
<!-- returns start -->
|
|
|
|
|
<!-- returns end -->
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- see also start -->
|
|
|
|
|
<!-- see also end -->
|
|
|
|
|
|
|
|
|
|
<!-- usage start -->
|
|
|
|
|
<strong>Usage:</strong>
|
|
|
|
|
<pre class="code" data-lang="Lua"><code><span class="comment">-- Making a basic flow, contains a label with hello world
|
|
|
|
|
</span><span class="keyword">local</span> basic_scroll =
|
|
|
|
|
Gui.clone_concept(<span class="string">'scroll'</span>,<span class="string">'basic_scroll'</span>)
|
|
|
|
|
:define_draw(<span class="keyword">function</span>(properties,parent,element)
|
|
|
|
|
element.style.hieght = <span class="number">50</span>
|
|
|
|
|
<span class="keyword">for</span> i = <span class="number">1</span>,<span class="number">10</span> <span class="keyword">do</span>
|
|
|
|
|
element.add{
|
|
|
|
|
<span class="global">type</span> = <span class="string">'label'</span>,
|
|
|
|
|
caption = i
|
|
|
|
|
}
|
|
|
|
|
<span class="keyword">end</span>
|
|
|
|
|
<span class="keyword">end</span>)</code></pre>
|
|
|
|
|
<!-- usage end -->
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
<dt>
|
|
|
|
|
<div class="divider divider-custom"></div>
|
|
|
|
|
@@ -1330,7 +1673,7 @@ Gui.clone_concept(<span class="string">'progress_bar'</span>,<span class="string
|
|
|
|
|
<dd>
|
|
|
|
|
<div class="section-item-body">
|
|
|
|
|
|
|
|
|
|
<p class="section-item-summary">The basic slider element</p>
|
|
|
|
|
<p class="section-item-summary">A number picker.</p>
|
|
|
|
|
<p class="section-item-description"></p>
|
|
|
|
|
|
|
|
|
|
<!-- parameters start -->
|
|
|
|
|
@@ -1449,6 +1792,133 @@ Gui.clone_concept(<span class="string">'slider'</span>,<span class="string">'dis
|
|
|
|
|
<span class="keyword">end</span>)</code></pre>
|
|
|
|
|
<!-- usage end -->
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
<dt>
|
|
|
|
|
<div class="divider divider-custom"></div>
|
|
|
|
|
<div class="block section-item-header">
|
|
|
|
|
<a href="#table" class="fragment-hashtag">#</a>
|
|
|
|
|
<span class="section-item-title" id="table">table</span>
|
|
|
|
|
</div>
|
|
|
|
|
</dt>
|
|
|
|
|
<dd>
|
|
|
|
|
<div class="section-item-body">
|
|
|
|
|
|
|
|
|
|
<p class="section-item-summary">An invisible container that lays out children in a specific number of columns.</p>
|
|
|
|
|
<p class="section-item-description"> Column width is given by the largest element contained in that row.</p>
|
|
|
|
|
|
|
|
|
|
<!-- parameters start -->
|
|
|
|
|
<strong>Properties / Events:</strong>
|
|
|
|
|
|
|
|
|
|
<ul>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="section-subitem-li">
|
|
|
|
|
|
|
|
|
|
<strong><em>column_count</em></strong>
|
|
|
|
|
|
|
|
|
|
<strong> : </strong>
|
|
|
|
|
|
|
|
|
|
(<span class="types"><a class="type" href="https://www.lua.org/pil/2.3.html">number</a> or <a class="type" href="https://www.lua.org/pil/2.6.html">function</a></span>)
|
|
|
|
|
|
|
|
|
|
the column count of the table or a function that returns the count being given then parent element
|
|
|
|
|
|
|
|
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="section-subitem-li">
|
|
|
|
|
|
|
|
|
|
<strong><em>vertical_lines</em></strong>
|
|
|
|
|
|
|
|
|
|
<strong> : </strong>
|
|
|
|
|
|
|
|
|
|
(<span class="types"><a class="type" href="http://lua-api.factorio.com/latest/Builtin-Types.html#boolean">boolean</a></span>)
|
|
|
|
|
|
|
|
|
|
when true vertical lines will be drawn on the table
|
|
|
|
|
|
|
|
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="section-subitem-li">
|
|
|
|
|
|
|
|
|
|
<strong><em>horizontal_lines</em></strong>
|
|
|
|
|
|
|
|
|
|
<strong> : </strong>
|
|
|
|
|
|
|
|
|
|
(<span class="types"><a class="type" href="http://lua-api.factorio.com/latest/Builtin-Types.html#boolean">boolean</a></span>)
|
|
|
|
|
|
|
|
|
|
when true horizontal lines will be drawn on the table
|
|
|
|
|
|
|
|
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="section-subitem-li">
|
|
|
|
|
|
|
|
|
|
<strong><em>header_lines</em></strong>
|
|
|
|
|
|
|
|
|
|
<strong> : </strong>
|
|
|
|
|
|
|
|
|
|
(<span class="types"><a class="type" href="http://lua-api.factorio.com/latest/Builtin-Types.html#boolean">boolean</a></span>)
|
|
|
|
|
|
|
|
|
|
when true horizontal lines will be drawn under the first row
|
|
|
|
|
|
|
|
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="section-subitem-li">
|
|
|
|
|
|
|
|
|
|
<strong><em>vertical_centering</em></strong>
|
|
|
|
|
|
|
|
|
|
<strong> : </strong>
|
|
|
|
|
|
|
|
|
|
(<span class="types"><a class="type" href="http://lua-api.factorio.com/latest/Builtin-Types.html#boolean">boolean</a></span>)
|
|
|
|
|
|
|
|
|
|
when true element will be vertically centered with in the table
|
|
|
|
|
|
|
|
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
<!-- parameters end -->
|
|
|
|
|
|
|
|
|
|
<!-- returns start -->
|
|
|
|
|
<!-- returns end -->
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- see also start -->
|
|
|
|
|
<!-- see also end -->
|
|
|
|
|
|
|
|
|
|
<!-- usage start -->
|
|
|
|
|
<strong>Usage:</strong>
|
|
|
|
|
<pre class="code" data-lang="Lua"><code><span class="comment">-- Making a basic table, contains 25 labels
|
|
|
|
|
</span><span class="keyword">local</span> basic_table =
|
|
|
|
|
Gui.clone_concept(<span class="string">'table'</span>,<span class="string">'basic_table'</span>)
|
|
|
|
|
:set_column_count(<span class="number">5</span>)
|
|
|
|
|
:define_draw(<span class="keyword">function</span>(properties,parent,element)
|
|
|
|
|
<span class="keyword">for</span> i = <span class="number">1</span>,<span class="number">25</span> <span class="keyword">do</span>
|
|
|
|
|
element.add{
|
|
|
|
|
<span class="global">type</span> = <span class="string">'lable'</span>,
|
|
|
|
|
caption = i
|
|
|
|
|
}
|
|
|
|
|
<span class="keyword">end</span>
|
|
|
|
|
<span class="keyword">end</span>)</code></pre>
|
|
|
|
|
<!-- usage end -->
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
<dt>
|
|
|
|
|
<div class="divider divider-custom"></div>
|
|
|
|
|
@@ -1460,7 +1930,7 @@ Gui.clone_concept(<span class="string">'slider'</span>,<span class="string">'dis
|
|
|
|
|
<dd>
|
|
|
|
|
<div class="section-item-body">
|
|
|
|
|
|
|
|
|
|
<p class="section-item-summary">The text box element</p>
|
|
|
|
|
<p class="section-item-summary">A multi-line text box that supports selection and copy-paste.</p>
|
|
|
|
|
<p class="section-item-description"></p>
|
|
|
|
|
|
|
|
|
|
<!-- parameters start -->
|
|
|
|
|
@@ -1618,7 +2088,7 @@ Gui.clone_concept(<span class="string">'text_box'</span>,<span class="string">'e
|
|
|
|
|
<dd>
|
|
|
|
|
<div class="section-item-body">
|
|
|
|
|
|
|
|
|
|
<p class="section-item-summary">The text field element</p>
|
|
|
|
|
<p class="section-item-summary">Boxes of text the user can type in.</p>
|
|
|
|
|
<p class="section-item-description"></p>
|
|
|
|
|
|
|
|
|
|
<!-- parameters start -->
|
|
|
|
|
@@ -5040,7 +5510,7 @@ Gui.get_concept(<span class="string">'CustomButton'</span>)
|
|
|
|
|
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="content-footer column col-9 col-sm-12">
|
|
|
|
|
<i>Last updated 2019-09-06 21:12:05 UTC</i>
|
|
|
|
|
<i>Last updated 2019-09-17 21:04:13 UTC</i>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|