A2osX/LIB/LIBGUI.S.MBOX.txt
2022-11-02 07:54:30 +01:00

105 lines
1.7 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
*--------------------------------------
* 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
*--------------------------------------
MBOX.DrawBM cpx #0
bne .1
tax
>LDYA L.BMs,x
.1 >STYA ZPBMPtr
jsr CB.GetBuf
bcs .9
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
*--------------------------------------
*--------------------------------------
MAN
SAVE usr/src/lib/libgui.s.mbox
LOAD usr/src/lib/libgui.s
ASM