ludic.ui: splits, words, gradients and keys are made once per text (a bounded memo), sides without a list - benchmark 110 -> 63 KB a frame
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
978f128755
commit
1d40f6d95a
18 changed files with 172 additions and 41 deletions
|
|
@ -40,8 +40,8 @@ function el_calc_len(ui_st: mut UiState, s: string) -> float {
|
|||
return ui_st.ca_px
|
||||
}
|
||||
# flex: 1 | flex: 1 0 | flex: 2 1 auto | flex: none - the grow, then the shrink
|
||||
function el_flex_short(n: UiNode, s: string) -> void {
|
||||
let parts = el_words(s)
|
||||
function el_flex_short(ui_st: mut UiState, n: UiNode, s: string) -> void {
|
||||
let parts = mm_words(ui_st, s)
|
||||
if s == "none" {
|
||||
n.grow = 0.0
|
||||
nx(n).shrink = 0.0
|
||||
|
|
@ -72,7 +72,7 @@ function el_text_shadow(ui_st: mut UiState, n: UiNode, s: string) -> void {
|
|||
x.tsh_set = true
|
||||
x.tsh_c = -2
|
||||
if tpl_words(s) == "none" { return }
|
||||
let parts = el_words(s)
|
||||
let parts = mm_words(ui_st, s)
|
||||
var nums = 0
|
||||
var col = ""
|
||||
for i in 0 .. len(parts) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue