From 78c787d9b2f4b68ca3591a45948160e78cbfab58 Mon Sep 17 00:00:00 2001 From: Devine Lu Linvega Date: Tue, 25 Apr 2023 21:32:24 -0700 Subject: [PATCH] (notepad) Added footer --- gui/notepad/notepad.tal | 50 +++++++++++++++++++++++++++++++++++++++-- 1 file changed, 48 insertions(+), 2 deletions(-) diff --git a/gui/notepad/notepad.tal b/gui/notepad/notepad.tal index 26226de..f5d05e1 100644 --- a/gui/notepad/notepad.tal +++ b/gui/notepad/notepad.tal @@ -13,12 +13,13 @@ #f00f .System/b DEO2 ( size ) #00e0 .Screen/width DEO2 - #00f4 .Screen/height DEO2 + #00f8 .Screen/height DEO2 ( unlock ) ;on-console .Console/vector DEO2 ;on-mouse .Mouse/vector DEO2 draw-header + draw-footer BRK @@ -28,17 +29,41 @@ BRK @on-mouse ( -> ) + [ LIT2 00 -Mouse/state ] DEI NEQ #41 ADD ;caret-icn update-cursor + + .Mouse/state DEI ?&on-mouse-down + BRK +&on-mouse-down ( -> ) + +BRK + +@update-cursor ( color addr* -- ) + + [ LIT2 15 -Screen/auto ] DEO + #40 draw-cursor + .Mouse/x DEI2 ,draw-cursor/x STR2 + .Mouse/y DEI2 ,draw-cursor/y STR2 + .Screen/addr DEO2 + +@draw-cursor ( color -- ) + + [ LIT2 &x $2 ] .Screen/x DEO2 + [ LIT2 &y $2 ] .Screen/y DEO2 + .Screen/sprite DEO + +JMP2r + ( @|drawing ) @draw-header ( -- ) + ( a ) #0000 DUP2 .Screen/x DEO2 .Screen/y DEO2 - ( a ) #15 .Screen/auto DEO ;bar-icn/a .Screen/addr DEO2 #01 .Screen/sprite DEO @@ -70,9 +95,30 @@ BRK JMP2r +@draw-footer ( -- ) + + #26 .Screen/auto DEO + #0000 .Screen/x DEO2 + .Screen/height DEI2 #0020 SUB2 .Screen/y DEO2 + ;page-icn .Screen/addr DEO2 + #01 .Screen/sprite DEOk DEOk DEOk DEO + ( across ) + #01 .Screen/auto DEO + #0018 .Screen/x DEO2 + .Screen/height DEI2 #0008 SUB2 .Screen/y DEO2 + ;page-icn/bottom .Screen/addr DEO2 + #e7 &l + #01 .Screen/sprite DEO + INC DUP ?&l + POP + +JMP2r + ( @|assets ) +@caret-icn [ + c628 1010 1010 1010 1010 1010 1010 28c6 ] @bar-icn &a [ 0000 007e 007e 007e 007e 007e 007e 0000 ]