kind of have a working scrollbar now
Iris Lightshard nilix@nilfm.cc
PGP Signature
-----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEkFh6dA+k/6CXFXU4O3+8IhROY5gFAmFjY0QACgkQO3+8IhRO Y5gfTw//ef0NjVcfLhutPTj3fS0O1OwYsZnyxm/98D0no+nT2jvLcU8a1GyPlpve zqKNKLkMof+mwNVqI6zPyOLLRHbVChZ9TY/GFrhVcNJjZIa2ddSzAy2UkfR8rmzO UK4dM77TzreWYfvXXLqyvrnbqJtoM4hPq2o7MeIVQD9KVOfqYSDB4H1zwPnD4ApL eda5mtPGPtruZRDEf8SanZ2zN9F2Uk3GOsc63QDY2IE8hf0IZkM99rFGvYsoFja5 /pRcZAtiDhjQib7l8b7oEC4xiv6UUdxDIQ1PVuCqNbKzc4tpH3MPIfBH1PIcJV2k T71eY6t98epOUHvXZTOK3j/0B/ebvXSxBa4LW1QpsPwDuyYQU5TK7hp6UctAvALY Z09S2E52DwUYZyXX303PzPZwA1Lna/GVgLgucIsk3WE+VM4WWyDhW6cagDbr0j3z fN0vAOazt/Q7C9ym3FPK58kzcL6h0iHzX7KNrMDU3vxqNZMJQPvRswOEZf4yCCIs w5cKfxoKUcMMAobw6fLGa4c2PvY+7zNHw+XUb/auKKADeNUF+NRbODY5MI7a/JL6 H9bELJLARNBBBJ9xwjYOCkyb3+WpkfW3ayDmnKd7F/SzIHgSuBdiQZBDsMGaNWHR 8gg0s6TrV0m3b0PFjnQuHyiScO2X7fZtr1EddE3wjRZuSSvic2I= =EuXd -----END PGP SIGNATURE-----
2 files changed,
38 insertions(+),
21 deletions(-)
M
uxn-client/n/carts
→
uxn-client/n/carts
@@ -26,7 +26,11 @@ even moar
need lotsof entries -to -test -thebiz -andthefunk +for +da +funky +biznizz +and bizniss +and buznets +and whimsy +and also combs
M
uxn-client/xrxs.tal
→
uxn-client/xrxs.tal
@@ -553,29 +553,41 @@
.Screen/width DEI2 #0048 SUB2 .Screen/x DEO2 #0028 .Screen/y DEO2 - ( how many cells to highlight - .ncarts LDZ .list-height LDZ #01 ADD LTH ,&set-max JCN - .ncarts LDZ .list-height LDZ SUB STH ,&start-loop JMP ) - &set-max + &trough-only + ;scrollbar-trough .Screen/addr DEO2 + .list-height LDZ #00 + &while-trough-only EQUk ,&end-trough-only JCN + #81 .Screen/sprite DEO + INC-Y + INC ,&while-trough-only JMP &end-trough-only POP2 + + .ncarts LDZ .list-height LDZ LTH ,&no-handle JCN + ,&start-loop JMP + + &no-handle + RTN &start-loop + #0028 .Screen/y DEO2 + ( store the number of carts per tile of the scroll bar ) + .ncarts LDZ .list-height LDZ SUB .list-height LDZ MOD INC + STH + .list-height LDZ #00 &while EQUk ,&end JCN - ( trough top - DUP .list-top GTH ,&handle - ;scrollbar-trough .Screen/addr DEO2 - ,&draw JMP + ( trough top ) + DUP INC .list-top LDZ GTH ,&handle JCN + INC + INC-Y + ,&while JMP &handle - DUP .list-top LDZ .list-height LDZ ADD #03 SFT GTH ,&trough-bottom JCN + DUP .list-top LDZ .list-height LDZ ADD STHrk SUB LTH #00 EQU ,&trough-bottom JCN ;scrollbar .Screen/addr DEO2 - ,&draw JMP ) - &trough-bottom - ;scrollbar-trough .Screen/addr DEO2 - &draw #81 .Screen/sprite DEO - INC-Y - INC ,&while JMP &end POP2 + &trough-bottom + INC-Y + INC ,&while JMP &end POP2 POPr RTN@@ -613,12 +625,14 @@
BRK @try-scroll-up-mouse ( -> ) + .ncarts LDZ .list-height LDZ LTH ,&no-scroll-up JCN .list-top LDZ #00 EQU ,&no-scroll-up JCN .list-top LDZ #01 SUB .list-top STZ &no-scroll-up RTN @try-scroll-down-mouse ( -> ) + .ncarts LDZ .list-height LDZ LTH ,&no-scroll-down JCN .list-top LDZ .list-height LDZ ADD .ncarts LDZ #01 ADD EQU ,&no-scroll-down JCN .list-top LDZ INC .list-top STZ &no-scroll-down@@ -676,7 +690,6 @@ @set-button-state-by-key ( -> )
.btn-state LDZ #ff EQU ,&from-null JCN .btn-state LDZ #00 EQU ,&from-no JCN - ( from yes ) .Controller/button DEI #80 NEQ ,&check-action JCN #00 .btn-state STZ@@ -714,7 +727,7 @@ #04 .state STZ
BRK &check-b-button - .Controller/button DEI #02 NEQ ,&no-action + .Controller/button DEI #02 NEQ ,&no-action JCN ;get-select-idx-by-mouse .Mouse/vector DEO2 ;get-select-idx-by-key .Controller/vector DEO2 #04 .state STZ