A2osX/LIB/LIBGUI.S.MBOX.txt

105 lines
1.7 KiB
Plaintext
Raw Normal View History

2022-10-25 06:05:54 +00:00
NEW
AUTO 3,1
*--------------------------------------
2022-11-02 06:54:30 +00:00
* idButton MsgBox(pTITLE, pTEXT, pBM, idButtons)
* guiNewWnd(sFlags, iX1, iY1, iW, iH)
*--------------------------------------
MBOX.MsgBox >LDYAI 360
>STYA IE
>LDYAI 80
>STYA INE
lda WND.Desktop+S.OBJ.W
sec
sbc IE
sta DX
lda WND.Desktop+S.OBJ.W+1
sbc IE+1
lsr
sta DX+1
ror DX
lda WND.Desktop+S.OBJ.H
sec
sbc INE
sta DY
lda WND.Desktop+S.OBJ.H+1
sbc INE+1
lsr
sta DY+1
ror DY
>PUSHBI S.OBJ.F.BORDER+S.WND.F.MOVE+S.WND.F.CLOSE+S.WND.F.MODAL
>PUSHW DX
>PUSHW DY
>PUSHW IE
>PUSHW INE
jsr WND.New
bcs .9
pha
ldy #S.WND.BGCOLOR
lda #C.WHITE
sta (ZPObjPtr),y
ldy #6
lda (pStack),y
tax
dey
lda (pStack),y
ldy #S.WND.pTITLE
jsr OBJ.SetAXAtY
pla
jsr WND.Show
bcs .9
ldy #2 pBM
lda (pStack),y
tax
dey
lda (pStack),y
jsr MBOX.DrawBM
.9 >POP 7
rts
2022-10-25 06:05:54 +00:00
*--------------------------------------
2022-11-02 06:54:30 +00:00
MBOX.DrawBM cpx #0
bne .1
tax
>LDYA L.BMs,x
.1 >STYA ZPBMPtr
jsr CB.GetBuf
bcs .9
2022-10-25 06:05:54 +00:00
2022-11-02 06:54:30 +00:00
lda #28
sta CB.Cache+S.CB.X1
stz CB.Cache+S.CB.X1+1
sta CB.Cache+S.CB.Y1
stz CB.Cache+S.CB.Y1+1
jsr DRAW.BM
* >DEBUG
* >LDYA ZPWNDPtr
>LDYA L.WND.Desktop
jmp CB.FlushBufToYA
.9 rts
*--------------------------------------
2022-10-25 06:05:54 +00:00
*--------------------------------------
MAN
SAVE usr/src/lib/libgui.s.mbox
LOAD usr/src/lib/libgui.s
ASM