From aa9c39f5137dcf753934d8d46461ec47f2cbb0c5 Mon Sep 17 00:00:00 2001 From: Devine Lu Linvega Date: Sat, 10 Feb 2024 20:00:10 -0800 Subject: [PATCH] Added moues --- gui/shaviankb/assets.tal | 3 +++ gui/shaviankb/shaviankb.tal | 20 ++++++++++++++++++++ 2 files changed, 23 insertions(+) diff --git a/gui/shaviankb/assets.tal b/gui/shaviankb/assets.tal index 2ac439d..c8f7d06 100644 --- a/gui/shaviankb/assets.tal +++ b/gui/shaviankb/assets.tal @@ -36,6 +36,9 @@ ( > ) =keys/none =keys/none =keys/period ( > ) =keys/none =keys/none =keys/enter +@fill-icn [ ffff ffff ffff ffff ] +@pointer-icn [ 80c0 e0f0 f8e0 1000 ] + @button-icn &top [ 0000 1f3f 3f3f 3f3f 001f 3f7f 7f7f 7f7f diff --git a/gui/shaviankb/shaviankb.tal b/gui/shaviankb/shaviankb.tal index b929e61..bde78fb 100644 --- a/gui/shaviankb/shaviankb.tal +++ b/gui/shaviankb/shaviankb.tal @@ -3,6 +3,7 @@ |00 @System &vector $2 &expansion $2 &wst $1 &rst $1 &metadata $2 &r $2 &g $2 &b $2 &debug $1 &state $1 |10 @Console &vector $2 &read $1 &pad $4 &type $1 &write $1 &error $1 |20 @Screen &vector $2 &width $2 &height $2 &auto $1 &pad $1 &x $2 &y $2 &addr $2 &pixel $1 &sprite $1 +|90 @Mouse &vector $2 &x $2 &y $2 &state $1 &chord $1 &pad $4 &scrolly &scrolly-hb $1 &scrolly-lb $1 |0100 @@ -12,9 +13,14 @@ #de0f .System/b DEO2 #0120 .Screen/width DEO2 #00c0 .Screen/height DEO2 + ;on-mouse .Mouse/vector DEO2 ( #010e DEO ) BRK +@on-mouse ( -> ) + [ LIT2 00 -Mouse/state ] DEI NEQ #42 ADD ;pointer-icn + BRK + @ ( id* -- ) DUP2 #0009 DIV2 #0030 MUL2 .Screen/y DEO2 DUP #1e NEQ ?{ POP2 #0007 } @@ -73,6 +79,20 @@ .Screen/x DEO2 JMP2r +@ ( color addr* -- ) + [ LIT2 00 -Screen/auto ] DEO + ;fill-icn .Screen/addr DEO2 + #40 + .Mouse/x DEI2 ,/x STR2 + .Mouse/y DEI2 ,/y STR2 + .Screen/addr DEO2 + +@ ( color -- ) + [ LIT2 &x $2 ] .Screen/x DEO2 + [ LIT2 &y $2 ] .Screen/y DEO2 + .Screen/sprite DEO + JMP2r + ( @|stdlib )