A2osX/LIB/LIBGUI.S.SYSBAR.txt
2020-10-15 08:16:45 +02:00

297 lines
4.9 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
*--------------------------------------
SYSBAR.Enter ldy #S.MOUSE.X1
lda (ZPPtr1),y
cmp WND.SysBar.A2osX.X2
iny
lda (ZPPtr1),y
sbc WND.SysBar.A2osX.X2+1
bcs .8
sec
ror WND.SYSBAR.bA2osX
jsr GetCBBuf
bcs .9
jsr SYSBAR.Show.A2osX
>LDYA L.WND.SysBar
jsr DrawCBPtrToYA1
>PUSHW WND.SysBar+S.OBJ.X1
>PUSHW WND.SysBar+S.OBJ.Y1
>PUSHW L.RECT.SysBut
>PUSHW L.MENU.Sys
jsr MENU.New
bcs .9
jsr MENU.Show
.8 clc
.9 rts
*--------------------------------------
SYSBAR.Leave bit WND.SYSBAR.bA2osX
bpl .8
stz WND.SYSBAR.bA2osX
jsr GetCBBuf
bcs .9
jsr SYSBAR.Show.A2osX
>LDYA L.WND.SysBar
jmp DrawCBPtrToYA1
.8 clc
.9 rts
*--------------------------------------
SYSBAR.Show jsr GetCBBuf
bcs .9
jsr SYSBAR.Show.A2osX
jsr SYSBAR.Show.W
>LDYA L.WND.SysBar
jmp DrawCBPtrToYA1
.9 rts
*--------------------------------------
SYSBAR.Show.A2osX
lda #S.CB.CMD.FILLRECT
jsr PutA2CBBuf
lda #S.CB.OP.SET
jsr PutA2CBBuf
lda #S.CB.M.MONO
jsr PutA2CBBuf
lda PREFS.SYSBARCOLOR
bit WND.SysBar.bA2osX
bpl .1
eor #$ff
.1 jsr PutA2CBBuf
lda #0 X1
jsr PutA2CBBuf
jsr PutA2CBBuf
lda WND.SysBar+S.OBJ.Y1
jsr PutA2CBBuf
lda WND.SysBar+S.OBJ.Y1+1
jsr PutA2CBBuf
lda WND.SysBar.A2osX.X2
jsr PutA2CBBuf
lda WND.SysBar.A2osX.X2+1
jsr PutA2CBBuf
lda WND.SysBar+S.OBJ.Y2
jsr PutA2CBBuf
lda WND.SysBar+S.OBJ.Y2+1
jsr PutA2CBBuf
lda WND.SysBar+S.OBJ.X1
clc
adc #4
sta DX
lda WND.SysBar+S.OBJ.X1+1
adc #0
sta DX+1
lda WND.SysBar+S.OBJ.Y1
clc
adc #1
sta DY
lda WND.SysBar+S.OBJ.Y1+1
adc #0
sta DY+1
>LDYA L.BM.Apple
jsr DRAW.YABMAtDXDY
lda WND.SysBar+S.OBJ.X1
clc
adc #21
sta DX
lda WND.SysBar+S.OBJ.X1+1
adc #0
sta DX+1
inc DY
bne .2
inc DY+1
.2 lda WND.SysBar.bA2osX
asl
>LDYA L.WND.SysBar.2osX
ldx hSYSFON
jsr DRAW.YATextAtDXDY
rts
*--------------------------------------
SYSBAR.Show.W lda #S.CB.CMD.FILLRECT
jsr PutA2CBBuf
lda #S.CB.OP.SET
jsr PutA2CBBuf
lda #S.CB.M.MONO
jsr PutA2CBBuf
lda PREFS.SYSBARCOLOR
jsr PutA2CBBuf
lda WND.SysBar.W.X1
jsr PutA2CBBuf
lda WND.SysBar.W.X1+1
jsr PutA2CBBuf
lda WND.SysBar+S.OBJ.Y1
jsr PutA2CBBuf
lda WND.SysBar+S.OBJ.Y1+1
jsr PutA2CBBuf
lda WND.SysBar.W.X2
jsr PutA2CBBuf
lda WND.SysBar.W.X2+1
jsr PutA2CBBuf
lda WND.SysBar+S.OBJ.Y2
jsr PutA2CBBuf
lda WND.SysBar+S.OBJ.Y2+1
jmp PutA2CBBuf
*--------------------------------------
DRAW.YABMAtDXDY >STYA ZPBMPtr Src BM
lda #S.CB.CMD.BITBLT
jsr PutA2CBBuf
lda #S.CB.OP.MASK+S.CB.OP.ORA+S.CB.OP.COLOR
jsr PutA2CBBuf
lda #S.CB.M.C16
jsr PutA2CBBuf
lda #0
jsr PutA2CBBuf
ldx #4
ldy #0
.1 lda DX,y S.CB.X1,S.CB.Y1
jsr PutA2CBBuf
iny
dex
bne .1
lda #0 S.CB.X2
jsr PutA2CBBuf
jsr PutA2CBBuf
jsr PutA2CBBuf S.CB.Y2
jsr PutA2CBBuf
jsr PutA2CBBuf S.CB.SrcX
jsr PutA2CBBuf
jsr PutA2CBBuf S.CB.SrcY
jsr PutA2CBBuf
ldx #4
ldy #S.BM.W
.2 lda (ZPBMPtr),y S.CB.SrcW,S.CB.SrcH
jsr PutA2CBBuf
iny
dex
bne .2
lda ZPBMPtr S.CB.SrcPtr
jsr PutA2CBBuf
lda ZPBMPtr+1
jsr PutA2CBBuf
lda #0 S.CB.DstPtr
jsr PutA2CBBuf
jsr PutA2CBBuf
rts
*--------------------------------------
DRAW.YATextAtDXDY
pha Src Text
phy
lda #S.CB.CMD.DRAWTEXT2
jsr PutA2CBBuf
lda #0
ror
eor #$80
ora #S.CB.OP.SET
* lda #S.CB.OP.XOR
jsr PutA2CBBuf
lda #S.CB.M.MONO
jsr PutA2CBBuf
txa
jsr PutA2CBBuf S.CB.hFont
ldy #0
ldx #4
.1 lda DX,y DX,DY -> S.CB.X1,S.CB.Y1
jsr PutA2CBBuf
iny
dex
bne .1
lda #0
jsr PutA2CBBuf S.CB.X2
jsr PutA2CBBuf
jsr PutA2CBBuf S.CB.Y2
jsr PutA2CBBuf
jsr PutA2CBBuf S.CB.SrcX
jsr PutA2CBBuf
jsr PutA2CBBuf S.CB.SrcY
jsr PutA2CBBuf
jsr PutA2CBBuf S.CB.SrcW
jsr PutA2CBBuf
jsr PutA2CBBuf S.CB.SrcH
jsr PutA2CBBuf
jsr PutA2CBBuf S.CB.SrcPtr
jsr PutA2CBBuf
jsr PutA2CBBuf S.CB.DstPtr
jsr PutA2CBBuf
pla
jsr PutA2CBBuf S.CB.TxtPtr
pla
jmp PutA2CBBuf
*--------------------------------------
MAN
SAVE usr/src/lib/libgui.s.sysbar
LOAD usr/src/lib/libgui.s
ASM