A2osX/LIB/LIBTUI.S.CONT.txt

122 lines
1.9 KiB
Plaintext
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

NEW
AUTO 3,1
.LIST OFF
*--------------------------------------
* CONT.New hCTX,F 2
*--------------------------------------
CONT.New jsr OBJ.Create A = Class
bcs .9
>PULLA
ldy #S.OBJ.F
sta (ZPObjPtr),y
>PULLA
ldy #S.OBJ.hParent
sta (ZPObjPtr),y
>SYSCALL2 GetMemPtr
>STYA ZPPtr2
ldy #S.CTX.W
lda (ZPPtr2),y
ldy #S.OBJ.W
sta (ZPObjPtr),y
ldy #S.CTX.H
lda (ZPPtr2),y
ldy #S.OBJ.H
sta (ZPObjPtr),y
jmp OBJ.SetX2Y2
.9 >POP 2
rts
*--------------------------------------
CONT.Destroy clc
rts
*--------------------------------------
CONT.Run lda (pStack) Event
cmp #C.TAB
bne .9
ldy #1
lda (pStack),y hObj
jsr OBJ.FindActive
bcs .9
>PUSHA hActive
phy index
ldy #2
lda (pStack),y hObj
>SYSCALL2 GetMemPtr
>STYA ZPPtr1
.10 ply
.1 iny
cpy #S.OBJ
bne .2
ldy #S.OBJ.Childs
.2 lda (ZPPtr1),y
beq .1
cmp (pStack) same as hActive ?
beq .8
phy
>SYSCALL2 GetMemPtr
>STYA ZPPtr2
ldy #S.OBJ.S
lda (ZPPtr2),y
and #S.OBJ.S.bDisabled
bne .10
ply
lda (ZPPtr1),y
pha
.3 lda (pStack)
jsr OBJ.Deactivate
inc pStack discard old hActive
pla
>PUSHA new hActive
jsr OBJ.Activate2
.8 inc pStack discard hActive
clc
rts
.9 lda #0
sec
rts
*--------------------------------------
CONT.Draw ldy #S.OBJ.InnerW
lda (ZPObjPtr),y
tax
lda #C.SPACE
.1 jsr LB.COut
dex
bne .1
*--------------------------------------
CONT.Activate
*--------------------------------------
CONT.Deactivate
clc
rts
*--------------------------------------
MAN
SAVE usr/src/lib/libtui.s.cont
LOAD usr/src/lib/libtui.s
ASM