taro-ls: fix mouse rendering; taro-ctl: add some boilerplate

This commit is contained in:
Iris Lightshard 2023-03-16 00:13:05 -06:00
parent d7297b1bf8
commit 0f44a9fff7
Signed by: Iris Lightshard
GPG key ID: 3B7FBC22144E6398
2 changed files with 21 additions and 8 deletions

View file

@ -64,7 +64,11 @@ module Taro
end
def lifetime
return @lifetime
@lifetime
end
def msg
@msg
end
def write_msg(msgtype : UInt8, data : Slice)
@ -149,10 +153,21 @@ module Taro
@lsWin.write_msg(2_u8, list.to_slice)
end
def mblaze
@mblaze
end
def mainWindow
@lsWin
end
def readWins
@readWins
end
def composeWins
@composeWins
end
end
end
@ -163,5 +178,7 @@ loop do
select
when taro.mainWindow.lifetime.receive?
exit
when m = taro.mainWindow.msg.receive
# do something
end
end

View file

@ -98,7 +98,7 @@ JMP2r
JMP2r
@on_mouse ( -> )
#01 .wipe_fg STZ
get_select_idx_by_mouse
.resizing LDZ #00 EQU ,&resz_check JCN
@ -120,10 +120,6 @@ JMP2r
#01 .resizing STZ
.Mouse/x DEI2 .resizing/x STZ2
.Mouse/y DEI2 .resizing/y STZ2
BRK
#01 .wipe_fg STZ
&done
BRK
@ -154,7 +150,7 @@ BRK
,&chk_release JMP
&chk_release
#01 .list/update STZ
.Screen/height DEI2 TOP_SECTION BOTTOM_SECTION ADD2 SUB2 #03 SFT2 NIP .list/height STZ
.Mouse/state DEI