add init to cube3d

This commit is contained in:
asrael 2025-11-01 15:31:05 -05:00
parent 0ed7fc4496
commit cec9415d75
No known key found for this signature in database
GPG key ID: 2786557804DFAE24
4 changed files with 72 additions and 51 deletions

View file

@ -14,10 +14,7 @@
(let [(changed new-val) (pxl8.ui_checkbox "Orthographic" state.orthographic)]
(when changed (set new-state.orthographic new-val)))
(let [(changed new-val) (pxl8.ui_checkbox "Texture" state.use-texture)]
(when changed
(set new-state.use-texture new-val)
(when (and new-val state.init-texture)
(state.init-texture))))
(when changed (set new-state.use-texture new-val)))
(when state.use-texture
(pxl8.ui_indent 20)
(let [(changed new-val) (pxl8.ui_checkbox "Affine mapping" state.affine)]