diff --git a/gui/notepad/notepad.tal b/gui/notepad/notepad.tal index 91a1227..1f31c44 100644 --- a/gui/notepad/notepad.tal +++ b/gui/notepad/notepad.tal @@ -38,11 +38,16 @@ BRK trap-mouse - .Mouse/state DEI ?&on-mouse-down - -BRK - -&on-mouse-down ( -> ) + [ LIT &last $1 ] + .Mouse/state DEI + DUP ,&last STR + EQU ?&unchanged + draw-header + ( release on close button ) + .Mouse/state DEI #00 NEQ ?&unchanged + .Mouse/x DEI2 #0008 SUB2 #000a GTH2 ?&unchanged + #010f DEO + &unchanged BRK @@ -153,7 +158,9 @@ JMP2r ;bar-icn/a .Screen/addr DEO2 #01 .Screen/sprite DEO ( close ) - ;close-icn/default .Screen/addr DEO2 + ;close-icn/default + #00 .Mouse/state DEI #00 NEQ .Mouse/x DEI2 #0008 SUB2 #000a LTH2 AND + #50 SFT2 ADD2 .Screen/addr DEO2 #01 .Screen/sprite DEOk DEO ( lead ) #e9 &l