22 lines
No EOL
3.1 KiB
HTML
22 lines
No EOL
3.1 KiB
HTML
<!doctype html>
|
||
<html lang="en">
|
||
<head>
|
||
<meta charset="utf-8">
|
||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||
<title>Ui — Ludic</title>
|
||
<meta name="description" content="The retained-mode menu API over a ui block.">
|
||
<link rel="stylesheet" href="base.css">
|
||
<link rel="stylesheet" href="docs.css">
|
||
</head>
|
||
<body>
|
||
<header class="nav"><div class="wrap nav-in"><a class="brand" href="index.html"><span class="logo">L</span> Ludic</a><button class="nav-toggle" aria-label="Toggle menu" aria-expanded="false">☰</button><nav class="nav-links"><a href="index.html">Home</a><a href="api.html">API Reference</a><a class="nav-cta" href="https://git.workshopsoft.io/workshopsoft/ludic">Source ↗</a></nav></div></header>
|
||
<main class="wrap item">
|
||
<div class="crumbs"><a href="api.html">API Reference</a> <span>›</span> <span class="here">Ui</span></div>
|
||
<div class="item-head"><span class="kind-badge kind-namespace">namespace</span><h1 id="top">Ui</h1></div>
|
||
<p class="ns-blurb">The retained-mode menu API over a <code>ui</code> block. <a href="ui-build"><code>Ui.build</code></a> constructs every declared widget tree once (after fonts and skins are loaded); <a href="ui-open"><code>Ui.open</code></a> makes one menu active and <a href="ui-close"><code>Ui.close</code></a> deactivates it; the frame loop ticks navigation on its own, an activation fires the <code>UiClicked</code> event, and <a href="ui-clicked"><code>Ui.clicked</code></a> is the polled form; <a href="ui-set_text"><code>Ui.set_text</code></a> updates a label or button, and <a href="ui-render"><code>Ui.render</code></a> draws the active menu (call it from an <code>Overlay</code> handler so it paints over the world). Every <code>id: Name</code> in a <code>ui</code> block mints a <code>UI_Name</code> handle.</p>
|
||
<div class="ns-methods"><a class="ns-method" href="ui-build.html"><code class="nm-sig">Ui.build()</code><span class="nm-tip">Construct every declared ui block (loads skins, measures fonts).</span></a><a class="ns-method" href="ui-open.html"><code class="nm-sig">Ui.open(id: UI_Name)</code><span class="nm-tip">Make one menu active and focus its first button.</span></a><a class="ns-method" href="ui-close.html"><code class="nm-sig">Ui.close()</code><span class="nm-tip">Deactivate the menu: no menu is open.</span></a><a class="ns-method" href="ui-tick.html"><code class="nm-sig">Ui.tick(key: k)</code><span class="nm-tip">Advance navigation by one key (the frame loop does this for you).</span></a><a class="ns-method" href="ui-clicked.html"><code class="nm-sig">Ui.clicked(id: UI_Name) -> bool</code><span class="nm-tip">Was this control activated this frame? (polled form of UiClicked)</span></a><a class="ns-method" href="ui-set_text.html"><code class="nm-sig">Ui.set_text(id: UI_Name, text: s)</code><span class="nm-tip">Replace a label's or button's text.</span></a><a class="ns-method" href="ui-render.html"><code class="nm-sig">Ui.render()</code><span class="nm-tip">Draw the active menu.</span></a></div>
|
||
<a class="back" href="api.html">← All symbols</a>
|
||
</main>
|
||
<script src="ludic-highlight.js"></script>
|
||
<script>Ludic.installCards(); Ludic.flashTarget();</script>
|
||
</body></html> |