commit 52abd5a

Devine Lu Linvega  ·  2025-01-24 16:32:05 +0000 UTC
parent 28d7bf0
(screen.tal) Added theme toggle button
1 files changed,  +12, -0
+12, -0
 1@@ -33,6 +33,7 @@
 2 	DUP #80 AND #00 EQU ?{
 3 		.position/x LDZ2 #0004 ADD2 .position/x STZ2 }
 4 	DUP #01 NEQ ?{ <toggle-size> }
 5+	DUP #02 NEQ ?{ <toggle-theme> }
 6 	POP <draw-portraits>
 7 	BRK
 8 
 9@@ -52,6 +53,17 @@
10 	#0180 .Screen/height DEO2
11 	<draw-guide> !<draw-portraits>
12 
13+@<toggle-theme> ( -- )
14+	#ff00 .System/r DEI2 EQU2 ?{
15+		#ff00 .System/r DEO2
16+		#0ff0 .System/g DEO2
17+		#00ff .System/b DEO2
18+		JMP2r }
19+	#00ff .System/r DEO2
20+	#0ff0 .System/g DEO2
21+	#ff00 .System/b DEO2
22+	JMP2r
23+
24 @<move> ( x* y* -- )
25 	( | clear )
26 	.position/x LDZ2 #0020 SUB2 .Screen/x DEO2