Added hover state on page corner
This commit is contained in:
parent
e09204b7dc
commit
712adb45e7
|
@ -48,30 +48,29 @@
|
||||||
1f18 1818 1800 0000 0f19 1919 0f00 0000
|
1f18 1818 1800 0000 0f19 1919 0f00 0000
|
||||||
9999 9999 8f00 0000 8080 8080 8000 0000 ]
|
9999 9999 8f00 0000 8080 8080 8000 0000 ]
|
||||||
|
|
||||||
@page-icn [
|
@corner-icn [
|
||||||
00ff 4020 1008 0402 00ff 0000 0000 0000
|
|
||||||
00ff 0101 0101 0101 0100 0000 0000 0000
|
|
||||||
0080 4020 1008 0402 0101 0101 0101 0101
|
|
||||||
0000 0000 0000 0000 0100 0000 0000 0000
|
|
||||||
0181 4121 1109 0503 0000 ff00 ff00 ffff
|
|
||||||
0000 ff00 ff00 ffff 0100 ff00 ff00 ffff ]
|
|
||||||
&bottom [ ff00 ff00 ff00 ffff ]
|
|
||||||
|
|
||||||
@page-icn-next [
|
|
||||||
0000 00ff 4020 1008 0000 00ff 0000 0000
|
0000 00ff 4020 1008 0000 00ff 0000 0000
|
||||||
0000 00fc 0404 0404 0402 0100 0000 0000
|
0000 00fc 0404 0404 0402 0100 0000 0000
|
||||||
0000 0080 4020 1008 0404 0404 0404 0404
|
0000 0080 4020 1008 0404 0404 0404 0404
|
||||||
0000 0000 0000 0000 0402 0100 0000 0000
|
0000 0000 0000 0000 0402 0100 0000 0000
|
||||||
0404 0484 4424 140c 0000 ff00 ff00 ffff
|
0404 0484 4424 140c 0000 ff00 ff00 ffff
|
||||||
0000 ff00 ff00 ffff 0700 ff00 ff00 ffff ]
|
0000 ff00 ff00 ffff 0700 ff00 ff00 ffff ]
|
||||||
|
( b ) [
|
||||||
@page-icn-prev [
|
|
||||||
0000 0000 00ff 4020 0000 0000 00ff 0000
|
0000 0000 00ff 4020 0000 0000 00ff 0000
|
||||||
0000 0000 00f0 1010 1008 0402 0100 0000
|
0000 0000 00f0 1010 1008 0402 0100 0000
|
||||||
0000 0000 0080 4020 1010 1010 1010 1010
|
0000 0000 0080 4020 1010 1010 1010 1010
|
||||||
0000 0000 0000 0000 1008 0402 0100 0000
|
0000 0000 0000 0000 1008 0402 0100 0000
|
||||||
1010 1010 1090 5030 0000 ff00 ff00 ffff
|
1010 1010 1090 5030 0000 ff00 ff00 ffff
|
||||||
0000 ff00 ff00 ffff 1f00 ff00 ff00 ffff ]
|
0000 ff00 ff00 ffff 1f00 ff00 ff00 ffff ]
|
||||||
|
( c ) [
|
||||||
|
00ff 4020 1008 0402 00ff 0000 0000 0000
|
||||||
|
00ff 0101 0101 0101 0100 0000 0000 0000
|
||||||
|
0080 4020 1008 0402 0101 0101 0101 0101
|
||||||
|
0000 0000 0000 0000 0100 0000 0000 0000
|
||||||
|
0181 4121 1109 0503 0000 ff00 ff00 ffff
|
||||||
|
0000 ff00 ff00 ffff 0100 ff00 ff00 ffff ]
|
||||||
|
|
||||||
|
@bottom-icn [ ff00 ff00 ff00 ffff ]
|
||||||
|
|
||||||
@line-icn [ 00ff 0000 0000 0000 ]
|
@line-icn [ 00ff 0000 0000 0000 ]
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
|00 @System &vector $2 &pad $6 &r $2 &g $2 &b $2
|
|00 @System &vector $2 &pad $6 &r $2 &g $2 &b $2
|
||||||
|20 @Screen &vector $2 &width $2 &height $2 &auto $1 &pad $1 &x $2 &y $2 &addr $2 &pixel $1 &sprite $1
|
|20 @Screen &vector $2 &width $2 &height $2 &auto $1 &pad $1 &x $2 &y $2 &addr $2 &pixel $1 &sprite $1
|
||||||
|80 @Controller &vector $2 &button $1 &key $1
|
|80 @Controller &vector $2 &button $1 &key $1
|
||||||
|90 @Mouse &vector $2 &x $2 &y $2 &state $1 &chord $1
|
|90 @Mouse &vector $2 &x $1 &lx $1 &y $1 &ly $1 &state $1 &chord $1
|
||||||
|a0 @File &vector $2 &success $1 &success-lb $1 &stat $2 &delete $1 &append $1 &name $2 &length $2 &read $2 &write $2
|
|a0 @File &vector $2 &success $1 &success-lb $1 &stat $2 &delete $1 &append $1 &name $2 &length $2 &read $2 &write $2
|
||||||
|000
|
|000
|
||||||
|
|
||||||
|
@ -105,11 +105,12 @@
|
||||||
@on-mouse-foot ( -> )
|
@on-mouse-foot ( -> )
|
||||||
[ LIT2 00 -Mouse/state ] DEI NEQ #41 ADD ;mouse-icn <update-cursor>
|
[ LIT2 00 -Mouse/state ] DEI NEQ #41 ADD ;mouse-icn <update-cursor>
|
||||||
<trap-mouse>
|
<trap-mouse>
|
||||||
[ LIT2 00 -Mouse/state ] DEI NEQ .Mouse/x DEI2 #0018 LTH2 AND ?&on-mouse-down
|
( | continue )
|
||||||
|
[ LIT2 00 -Mouse/state ] DEI NEQ .Mouse/x DEI2 #0018 LTH2 AND ?&down
|
||||||
BRK
|
BRK
|
||||||
&on-mouse-down ( -> )
|
&down ( -> )
|
||||||
[ LIT2 00 -Mouse/state ] DEO
|
[ LIT2 00 -Mouse/state ] DEO
|
||||||
.Mouse/y DEI2 #00d6 SUB2 NIP [ LIT2 18 -Mouse/x ] DEI2 NIP SUB ADD #18 LTH ?&go-next
|
.Mouse/y DEI2 #00da SUB2 NIP [ LIT2 18 -Mouse/x ] DEI2 NIP SUB ADD #18 LTH ?&go-next
|
||||||
prev-page BRK &go-next next-page BRK
|
prev-page BRK &go-next next-page BRK
|
||||||
|
|
||||||
@on-frame ( -> )
|
@on-frame ( -> )
|
||||||
|
@ -281,6 +282,7 @@
|
||||||
@|core )
|
@|core )
|
||||||
|
|
||||||
@<trap-mouse> ( -- )
|
@<trap-mouse> ( -- )
|
||||||
|
#00 <update-corner>
|
||||||
.Mouse/y DEI2 DUP2 #0018 GTH2 ?{
|
.Mouse/y DEI2 DUP2 #0018 GTH2 ?{
|
||||||
POP2 ;on-mouse-head .Mouse/vector DEO2
|
POP2 ;on-mouse-head .Mouse/vector DEO2
|
||||||
JMP2r }
|
JMP2r }
|
||||||
|
@ -446,7 +448,7 @@
|
||||||
( | page end )
|
( | page end )
|
||||||
.Screen/y DEI2 #00c8 NEQ2 ?{
|
.Screen/y DEI2 #00c8 NEQ2 ?{
|
||||||
;etc-icn .Screen/addr DEO2
|
;etc-icn .Screen/addr DEO2
|
||||||
#01 .Screen/sprite DEO
|
[ LIT2 01 -Screen/sprite ] DEO
|
||||||
POP2 JMP2r }
|
POP2 JMP2r }
|
||||||
( | draw char )
|
( | draw char )
|
||||||
DUP2 #0001 SUB2 LDA2 char-addr .Screen/addr DEO2
|
DUP2 #0001 SUB2 LDA2 char-addr .Screen/addr DEO2
|
||||||
|
@ -461,20 +463,16 @@
|
||||||
[ LIT2 05 -Screen/sprite ] DEO
|
[ LIT2 05 -Screen/sprite ] DEO
|
||||||
.Screen/x DEI2k #0008 SUB2 ROT DEO2
|
.Screen/x DEI2k #0008 SUB2 ROT DEO2
|
||||||
&block walk-char POP INC2 LDAk ?&>w
|
&block walk-char POP INC2 LDAk ?&>w
|
||||||
&end POP2 JMP2r
|
POP2 JMP2r
|
||||||
|
|
||||||
@<draw-footer> ( -- )
|
@<draw-footer> ( -- )
|
||||||
[ LIT2 00 -collapsed ] LDZ EQU ?{ JMP2r }
|
[ LIT2 00 -collapsed ] LDZ EQU ?{ JMP2r }
|
||||||
[ LIT2 26 -Screen/auto ] DEO
|
#01 <update-corner>
|
||||||
#0000 .Screen/x DEO2
|
|
||||||
.Screen/height DEI2 #0020 SUB2 DUP2 .Screen/y DEO2
|
|
||||||
;page-icn .Screen/addr DEO2
|
|
||||||
[ LIT2 01 -Screen/sprite ] DEOk DEOk DEOk DEO
|
|
||||||
( | across )
|
( | across )
|
||||||
[ LIT2 01 -Screen/auto ] DEO
|
[ LIT2 01 -Screen/auto ] DEO
|
||||||
#0018 .Screen/x DEO2
|
#0018 .Screen/x DEO2
|
||||||
DUP2 #0018 ADD2 .Screen/y DEO2
|
.Screen/height DEI2 DUP2 #0008 SUB2 .Screen/y DEO2
|
||||||
;page-icn/bottom .Screen/addr DEO2
|
;bottom-icn .Screen/addr DEO2
|
||||||
#e7
|
#e7
|
||||||
&>l ( -- )
|
&>l ( -- )
|
||||||
[ LIT2 01 -Screen/sprite ] DEO
|
[ LIT2 01 -Screen/sprite ] DEO
|
||||||
|
@ -483,11 +481,30 @@
|
||||||
( | page number )
|
( | page number )
|
||||||
[ LIT2 15 -Screen/auto ] DEO
|
[ LIT2 15 -Screen/auto ] DEO
|
||||||
.Screen/width DEI2 #01 SFT2 #0003 SUB2 .Screen/x DEO2
|
.Screen/width DEI2 #01 SFT2 #0003 SUB2 .Screen/x DEO2
|
||||||
.Screen/y DEO2
|
#001e SUB2 .Screen/y DEO2
|
||||||
#0011 .page LDZ ADD #50 SFT2 ;font/glyphs ADD2 .Screen/addr DEO2
|
#0011 .page LDZ ADD #50 SFT2 ;font/glyphs ADD2 .Screen/addr DEO2
|
||||||
[ LIT2 01 -Screen/sprite ] DEO
|
[ LIT2 01 -Screen/sprite ] DEO
|
||||||
JMP2r
|
JMP2r
|
||||||
|
|
||||||
|
@<update-corner> ( force -- )
|
||||||
|
( get positions ) .Mouse/lx DEI .Mouse/ly DEI
|
||||||
|
( test x ) OVR #18 GTH ?&skip
|
||||||
|
( test y ) DUP #db LTH ?&skip
|
||||||
|
#da SUB #18 ROT SUB ADD #18 LTH INC SWP !<draw-corner>
|
||||||
|
&skip POP2 #00 SWP
|
||||||
|
( >> )
|
||||||
|
|
||||||
|
@<draw-corner> ( state force -- )
|
||||||
|
( force ) ?{
|
||||||
|
[ LIT &last ff ] NEQk ?{ POP2 JMP2r }
|
||||||
|
POP DUP ,&last STR }
|
||||||
|
[ LIT2 26 -Screen/auto ] DEO
|
||||||
|
#0000 .Screen/x DEO2
|
||||||
|
.Screen/height DEI2 #0020 SUB2 .Screen/y DEO2
|
||||||
|
#00 SWP #0060 MUL2 ;corner-icn ADD2 .Screen/addr DEO2
|
||||||
|
[ LIT2 01 -Screen/sprite ] DEOk DEOk DEOk DEO
|
||||||
|
JMP2r
|
||||||
|
|
||||||
@<draw-tab> ( -- )
|
@<draw-tab> ( -- )
|
||||||
.Screen/x DEI2k #0010 ADD2 #33 SFT2 ROT DEO2
|
.Screen/x DEI2k #0010 ADD2 #33 SFT2 ROT DEO2
|
||||||
JMP2r
|
JMP2r
|
||||||
|
|
Loading…
Reference in New Issue