; draw the initial status line
ld a, [action_menu_cursor]
+ ld hl, action_menu_str_table
call select_menu_draw_status
ret
; hl: string ptr table
; a: selection
select_menu_draw_status:
+ push hl
+ push af
+ call ui_clear_status_line
+ pop af
+ pop hl
+
add a, a ; * 2 for table offset
ld d, 0
ld e, a
add hl, de ; hl = string ptr
+
+ ld a, [hl+]
+ ld d, a
+ ld a, [hl]
+ ; hl = the string
+ ld h, a
+ ld l, d
+
+ ld de, UI_STATUS_LINE
+ call puts
+ call ui_request_redraw
+
ret
; one tile after 'Z'
#define UI_WINDOW_BACKGROUND 0xF4
+ui_str_clear:
+.str " "
+.db 0
+
; inits UI
ui_init:
; fill shadow UI with default tile
call ui_request_redraw
ret
+
+ ; clears the UI status line
+ui_clear_status_line:
+ ld de, UI_STATUS_LINE
+ ld hl, ui_str_clear
+ jp puts
+