Files
wschod/game/res/scripts/ui/debug_window.scm
T
2025-07-20 18:47:42 +02:00

24 lines
813 B
Scheme

;; The function is evaulated and returns a pointer, the game eats it
;; and adds it to the UI root. Boom.
(widget-new
'window
#:style style-window
#:text "Debug window"
#:w 350
#:layout-padding 8
#:vertical #f
#:horizontal #t
;; The rest is children.
(widget-new
'flowbox
#:style style-container
#:layout-padding 8
#:layout-spacing 8
#:horizontal #t
(widget-checkbox "Flight" "flight_enabled" #:layout-weight 0.5 #:h 20)
(widget-checkbox "Wireframe" "wireframe_enabled" #:layout-weight 0.5 #:h 20)
(widget-new 'label #:style style-default #:layout-weight 1 #:h 20
#:on-tick (lambda (w e) (widget-set-text! w (number->string (random 10000)))))
(widget-spinner #:layout-weight 1 #:h 20)
(widget-new 'entry #:style style-default #:layout-weight 1 #:h 20 #:text "Enter text...")))