A game no longer writes a host:
- The runtime reads Input itself: focus and keyboard navigation (Tab, arrows, Enter/Space,
autofocus), the pointer (hover, :active, click on release, drag), and scroll boxes with the
wheel, a draggable scrollbar, clipping and scroll-into-view.
- HTML's controls are built in (button, checkbox, radio, range, select, text, key capture), made
of plain parts a stylesheet styles, each reporting with on-change and event.value.
- ludic.ui/render3d.ludic draws with render3d's overlay: textures, named atlases (icon:NAME),
nine-slice border-image, rounded rects and rings, clipping, and a scale.
- Hooks for the program's language, sounds and clock (ui_translator, ui_sounds, ui_clock).
- ui_dev: hot reload, errors on screen, LUDIC_UI_DUMP.
- CSS:
- colours as #rgb / #rrggbbaa / rgb() / rgba() / names;
- border-radius and outline (following the radius), box-shadow, background-image and a tinted
border-image;
- group opacity, @keyframes / animation, transition;
- :focus, :focus-visible and :focus-within.
- HTML mixed content, and boolean attributes.
- render3d gains tex_width / tex_height, and the XML reader keeps text runs in order.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
12 lines
797 B
XML
12 lines
797 B
XML
<div class="page">
|
|
<button id="go" on-click="go()">Go</button>
|
|
<input type="checkbox" label="Music" checked="{music}" on-change="set music = event.value"/>
|
|
<input type="range" label="Volume" min="{0}" max="{10}" value="{volume}" on-change="set volume = event.value"/>
|
|
<select label="Quality" value="{quality}" on-change="set quality = event.value">
|
|
<option>Low</option><option>Medium</option><option>High</option>
|
|
</select>
|
|
<input type="text" label="Name" value="{name}" maxlength="{8}" on-change="set name = event.value"/>
|
|
<input type="key" label="Jump" value="{jump}" on-change="set jump = event.value"/>
|
|
<div class="list"><p>1</p><p>2</p><p>3</p><p>4</p><p>5</p><p>6</p><p>7</p><p>8</p></div>
|
|
<p class="state">{pressed} {music} {volume} {quality} {name} {jump}</p>
|
|
</div>
|