A2osX/LIB/LIBGUI.S.LABEL.txt
burniouf 9a7d20a7e1 ProDOS 203 / FX:TC mod for year 2022-2026
FORMAT: new switches & checks
SH:BREAK in FOR and WHILE
ASM / S-C MASM: new directives, CString support and .HX
LC / UC:bugfix
DHGR.DRV:bugfix
LIBGUI:wip
CC:wip
2022-12-07 08:02:29 +01:00

81 lines
1.3 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
*--------------------------------------
* NewLabel(HWND, pTEXT, wX, wY)
*--------------------------------------
LABEL.New >PULLW DY
>PULLW DX
>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