mirror of
https://github.com/A2osX/A2osX.git
synced 2024-11-22 16:31:07 +00:00
112 lines
1.7 KiB
Plaintext
112 lines
1.7 KiB
Plaintext
NEW
|
||
AUTO 3,1
|
||
*--------------------------------------
|
||
* NewBut(HWND, bFlags, wW, pICON, pTEXT, bKEYMOD, bKEY, wID, wX, wY)
|
||
*--------------------------------------
|
||
BUT.New lda #S.OBJ.T.BUT
|
||
jsr OBJ.New
|
||
bcs .9
|
||
|
||
* >STYA ZPObjPtr
|
||
|
||
ldy #S.OBJ.Y1
|
||
jsr OBJ.PullWordAtY
|
||
|
||
ldy #S.OBJ.X1
|
||
jsr OBJ.PullWordAtY
|
||
|
||
ldy #S.BUT.KEYMOD
|
||
jsr OBJ.PullWordAtY
|
||
|
||
ldy #S.BUT.pTEXT
|
||
jsr OBJ.PullWordAtY
|
||
|
||
ldy #S.BUT.pICON
|
||
jsr OBJ.PullWordAtY
|
||
|
||
ldy #S.OBJ.W
|
||
jsr OBJ.PullWordAtY
|
||
|
||
ldy #S.OBJ.F
|
||
jsr OBJ.PullByteAtY
|
||
|
||
jsr OBJ.PullHWND
|
||
|
||
ldy #S.OBJ.W
|
||
jsr OBJ.GetPropAtY
|
||
bcc .5 W in !NULL, static size
|
||
|
||
stz DX
|
||
stz DX+1
|
||
|
||
ldy #S.BUT.pICON
|
||
jsr OBJ.GetPropAtY
|
||
bcs .1 no icon
|
||
|
||
lda #16 IconW
|
||
sta DX
|
||
|
||
.1 ldy #S.BUT.pTEXT
|
||
jsr OBJ.GetPropAtY
|
||
bcs .3 no text
|
||
|
||
ldx hSYSFON
|
||
jsr FON.GetTextSize
|
||
|
||
ldy #S.OBJ.F
|
||
lda (ZPObjPtr),y
|
||
and #S.BUT.F.NOSPACE
|
||
bne .2
|
||
|
||
lda DX
|
||
beq .2
|
||
|
||
clc
|
||
adc PREFS.XSeparator
|
||
sta DX
|
||
|
||
.2 clc
|
||
lda CB.CACHE+S.CB.SrcW
|
||
adc DX
|
||
sta DX
|
||
|
||
lda CB.CACHE+S.CB.SrcW+1
|
||
adc DX+1
|
||
sta DX+1
|
||
|
||
.3 lda #PREFS.XSeparator
|
||
asl
|
||
* clc
|
||
adc DX
|
||
ldy #S.OBJ.W
|
||
sta (ZPObjPtr),y
|
||
lda #0
|
||
adc DX+1
|
||
iny
|
||
sta (ZPObjPtr),y
|
||
|
||
.5
|
||
|
||
|
||
|
||
.8 clc
|
||
rts
|
||
|
||
.9 >POP 14
|
||
rts
|
||
*--------------------------------------
|
||
BUT.Enter
|
||
*--------------------------------------
|
||
BUT.Draw
|
||
|
||
*--------------------------------------
|
||
BUT.Close
|
||
|
||
clc
|
||
rts
|
||
*--------------------------------------
|
||
MAN
|
||
SAVE usr/src/lib/libgui.s.but
|
||
LOAD usr/src/lib/libgui.s
|
||
ASM
|