(notepad) Added window collapse

This commit is contained in:
Devine Lu Linvega 2023-04-26 12:10:37 -07:00
parent 02d7c99d3f
commit 5e35f5b303
1 changed files with 19 additions and 0 deletions

View File

@ -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