ludic.ui: nothing a frame on the pack screen - a key's down/up carry one kept null, scroll asks filtered in place, a shadow's colour joined through the memo, numbers to 65536 made once each
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
8dfcccad41
commit
0f534731a6
5 changed files with 24 additions and 14 deletions
|
|
@ -36,14 +36,19 @@ function mm_join(ui_st: mut UiState, a: string, sep: string, b: string) -> strin
|
|||
m.slots[at] = len(m.keys)
|
||||
return k
|
||||
}
|
||||
# a small whole number's text, made once (a key's index, a loop's count)
|
||||
# a whole number's text, made once (a key's index, a count, money): 0..1023 at the start, the rest up
|
||||
# to MM_INT_MOST the first time each is shown; only past that is one made per call
|
||||
const MM_INT_MOST: int = 65536
|
||||
function mm_int(ui_st: mut UiState, i: int) -> string {
|
||||
if i < 0 or i >= 1024 { return string(i) }
|
||||
if i < 0 or i >= MM_INT_MOST { return string(i) }
|
||||
if ui_st.mm_ints == null {
|
||||
ui_st.mm_ints = new []string
|
||||
for k in 0 .. 1024 { push(ui_st.mm_ints, string(k)) }
|
||||
}
|
||||
return ui_st.mm_ints[i]
|
||||
let l = ui_st.mm_ints
|
||||
while len(l) <= i { push(l, "") }
|
||||
if i >= 1024 and len(l[i]) == 0 { l[i] = string(i) }
|
||||
return l[i]
|
||||
}
|
||||
# a small whole number as a Value, made once and shared: read it, never change it (a loop's index)
|
||||
function mm_ival(ui_st: mut UiState, i: int) -> Val {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue