feat(ui): popovers, tooltips, progress; the render3d backend installs itself; duplicate names caught first
- `popover`: a top layer that keeps the pointer and the keyboard, closed by a press outside or Esc. - `title` tooltips after half a second's rest, styled by .ui-tooltip. - `<progress>` and `<meter>`. - Atlases take rows and number cells, and importing ludic.ui/render3d.ludic is enough to draw with render3d. - The compiler reports two declarations of one name before it type-checks, so a package global clashing with a program's reads as that, not as 29 type errors. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
1dad96102a
commit
0a7525b125
24 changed files with 243 additions and 21 deletions
|
|
@ -29,20 +29,20 @@ function fr_clip_pop() -> void {
|
|||
function fr_children(n: UiNode) -> void {
|
||||
var positioned = 0
|
||||
for i in 0 .. len(n.children) {
|
||||
if n.children[i].pos == 0 { fr_draw(n.children[i]) } else { positioned += 1 }
|
||||
if n.children[i].popover { push(pop_list, n.children[i]) } else if n.children[i].pos == 0 { fr_draw(n.children[i]) } else { positioned += 1 }
|
||||
}
|
||||
if positioned == 0 { return }
|
||||
var lo = 1000000
|
||||
var hi = -1000000
|
||||
for i in 0 .. len(n.children) {
|
||||
if n.children[i].pos != 0 {
|
||||
if n.children[i].pos != 0 and not n.children[i].popover {
|
||||
lo = Math.min(lo, n.children[i].z)
|
||||
hi = Math.max(hi, n.children[i].z)
|
||||
}
|
||||
}
|
||||
for z in lo .. hi + 1 {
|
||||
for i in 0 .. len(n.children) {
|
||||
if n.children[i].pos != 0 and n.children[i].z == z { fr_draw(n.children[i]) }
|
||||
if n.children[i].pos != 0 and not n.children[i].popover and n.children[i].z == z { fr_draw(n.children[i]) }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue