From 5e35f5b30324ed0499305dea6fe8e2b61cb094f0 Mon Sep 17 00:00:00 2001 From: Devine Lu Linvega Date: Wed, 26 Apr 2023 12:10:37 -0700 Subject: [PATCH] (notepad) Added window collapse --- gui/notepad/notepad.tal | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/gui/notepad/notepad.tal b/gui/notepad/notepad.tal index 102d025..041b73d 100644 --- a/gui/notepad/notepad.tal +++ b/gui/notepad/notepad.tal @@ -45,6 +45,7 @@ BRK @on-mouse-head ( -> ) [ LIT2 00 -Mouse/state ] DEI NEQ #41 ADD ;mouse-icn update-cursor + .Mouse/state DEI #01 GTH ?&toggle-collapse trap-mouse @@ -61,10 +62,25 @@ BRK BRK +&toggle-collapse ( -> ) + + #00e0 .Screen/width DEO2 + + #00f8 #0011 + #0011 .Screen/height DEI2 EQU2 JMP SWP2 POP2 + .Screen/height DEO2 + draw-header + redraw + #00 .Mouse/state DEO + +BRK + @on-mouse-body ( -> ) [ LIT2 00 -Mouse/state ] DEI NEQ #41 ADD ;caret-icn update-cursor + trap-mouse + [ LIT &last $1 ] .Mouse/state DEI DUP2 #0001 NEQ2 ?&no-down get-position select-from @@ -281,6 +297,9 @@ JMP2r @draw-footer ( -- ) + .Screen/height DEI2 #0020 GTH2 ?&visible + JMP2r + &visible #26 .Screen/auto DEO #0000 .Screen/x DEO2 .Screen/height DEI2 #0020 SUB2 .Screen/y DEO2