A2osX/LIB/LIBGUI.S.LABEL.txt
2023-07-10 06:57:04 +02:00

80 lines
1.3 KiB
Plaintext
Raw Permalink 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
*--------------------------------------
* NewLabel(HWND, pTEXT, wX, wY)
*--------------------------------------
LABEL.New jsr OBJ.PullDXDY
>PULLW ZPPtr1
jsr OBJ.PullHWND
LABEL.New.I lda #S.OBJ.T.LABEL
jsr OBJ.New
bcs .9
phx hOBJ
jsr OBJ.SetDXDYX1Y1
ldy #S.LABEL.pTEXT
lda ZPPtr1
sta (ZPObjPtr),y
pha
iny
lda ZPPtr1+1
sta (ZPObjPtr),y
ply
ldx hSYSFON
jsr FON.GetTextSize2
ldx #3
ldy #S.OBJ.W+3
.1 lda DX,x
sta (ZPObjPtr),y
dey
dex
bpl .1
>LDYA ZPObjPtr
jsr OBJ.SetX2Y2
jsr WND.AddChild.I
pla hOBJ
clc
.9 rts
*--------------------------------------
LABEL.Enter
LABEL.Leave clc
rts
*--------------------------------------
LABEL.fPaint jsr CB.GetBuf
bcs .9
lda #C.WHITE
jsr CB.FillRectMonoA
jsr CB.GetObjX1Y1X2Y2
jsr CB.Cache2CBBufG
jsr CB.FlushBuf
ldy #S.LABEL.pTEXT
jsr OBJ.GetPropAtY
ldx hSYSFON
jmp FON.DrawText2
.9 rts
*--------------------------------------
*--------------------------------------
MAN
SAVE usr/src/lib/libgui.s.label
LOAD usr/src/lib/libgui.s
ASM