~rabbits/left

e4b3733a2bcdcb735c1d8c22932eb115f4ab2655 — Devine Lu Linvega 3 months ago a7be6ff
Skip ufx special characters for filepath and widget
1 files changed, 11 insertions(+), 10 deletions(-)

M src/main.tal
M src/main.tal => src/main.tal +11 -10
@@ 877,12 877,12 @@ JMP2r

@draw-uf2 ( text* font* color -- )

	STH
	,draw-ufx/color STR
	.textarea/font STZ2
	&while
		LDAk STHkr ,draw-ufx JSR
		LDAk ,draw-ufx/basic JSR
		INC2 LDAk ,&while JCN
	POP2 POPr
	POP2

JMP2r



@@ 890,6 890,9 @@ JMP2r

	,&color STR
	DUP #20 SUB #5e GTH ,draw-special JCN

&basic ( char -- )

	#00 SWP STH2
	.textarea/font LDZ2
	( width ) DUP2 STH2kr ADD2 LDA


@@ 968,18 971,16 @@ JMP2r

&draw-short ( addr* color -- )

	;draw-ufx/color STA
	[ LIT2 &x $2 ] .Screen/x DEO2
	#0004 .Screen/y DEO2
	;font-fixed .textarea/font STZ2
	STH SWP
	STHkr ,&draw-byte JSR
	STHr
	SWP ,&draw-byte JSR

&draw-byte ( byte color -- )
&draw-byte ( byte -- )

	STH
	DUP #04 SFT ,&parse JSR STHkr ;draw-ufx JSR2
	#0f AND ,&parse JSR STHr ;draw-ufx ( .. )
	DUP #04 SFT ,&parse JSR ;draw-ufx/basic JSR2
	#0f AND ,&parse JSR ;draw-ufx/basic ( .. )

JMP2
	&parse ( value -- char )