LIBGUI:more bugfix

This commit is contained in:
burniouf 2022-10-27 17:14:06 +02:00
parent f737bd21fb
commit b757926227
10 changed files with 101 additions and 70 deletions

Binary file not shown.

Binary file not shown.

View File

@ -43,6 +43,7 @@ BM.ID.LEFT .EQ 10
BM.ID.RIGHT .EQ 12
BM.ID.UP .EQ 14
BM.ID.DOWN .EQ 16
BM.ID.INFO .EQ 18
*--------------------------------------
BUT.ID.OK .EQ 1
BUT.ID.CANCEL .EQ 2

View File

@ -177,6 +177,42 @@ BM.Down.AND .DA #%1111111
.DA #%1110111
.DA #%1111111
*--------------------------------------
BM.Info .DA #S.BM.F.BBP4
.DA #4 RowBytes
.DA 28 W
.DA 14 H
.DA BM.INFO.AND-BM.INFO
.HS FFFFFFF0
.HS FFFFFFF0
.HS FFFFFFF0
.HS FFFFFFF0
.HS FFFFFFF0
.HS FFFFFFF0
.HS FFFFFFF0
.HS FFFFFFF0
.HS FFFFFFF0
.HS FFFFFFF0
.HS FFFFFFF0
.HS FFFFFFF0
.HS FFFFFFF0
.HS FFFFFFF0
BM.Info.AND .HS FFFFFFFF
.HS FFFFFFFF
.HS FFFFFFFF
.HS FFFFFFFF
.HS FFFFFFFF
.HS FFFFFFFF
.HS FFFFFFFF
.HS FFFFFFFF
.HS FFFFFFFF
.HS FFFFFFFF
.HS FFFFFFFF
.HS FFFFFFFF
.HS FFFFFFFF
.HS FFFFFFFF
*--------------------------------------
MAN
SAVE usr/src/lib/libgui.g.bm
LOAD usr/src/lib/libgui.s

View File

@ -30,6 +30,16 @@ CB.GetWndYCacheX
sta CB.Cache+1,x
rts
*--------------------------------------
CB.BorderLineH lda #S.CB.CMD.HLINE
sta CB.Cache+S.CB.CMD
lda #S.CB.OP.SET
sta CB.Cache+S.CB.OP
lda #S.CB.M.MONO
sta CB.Cache+S.CB.M
lda PREFS.BorderColor
sta CB.Cache+S.CB.COLOR
rts
*--------------------------------------
CB.FillRectMonoA
sta CB.Cache+S.CB.COLOR

View File

@ -176,21 +176,24 @@ MBAR.Enter ldy #S.WND.pMBAR
>LDYA ZPPtr1
>STYA ZPPtr2 save MBITEM to activate
.2 jsr MBAR.NextMBItem
bra .1
*--------------------------------------
.3 lda ZPPtr2
ora ZPPtr2+1
bne MBAR.Set
.8 clc
.9 rts
*--------------------------------------
* ZPMENUPtr = MBAR
* ZPPtr2 = Item to activate
*--------------------------------------
MBAR.Reset stz ZPPtr2
stz ZPPtr2+1
*--------------------------------------
.3 lda ZPPtr2
ora ZPPtr2+1
beq .8 no change....
jsr MENU.DestroyAll
MBAR.Set jsr MENU.DestroyAll
ldy #S.OBJ.X1
ldx #S.CB.X1
@ -203,13 +206,13 @@ MBAR.Enter ldy #S.WND.pMBAR
.4 lda (ZPPtr1)
beq .7
jsr MBAR.SetX2
jsr MBAR.SetX2 set X2 = X1 + W
ldy #S.MBITEM.S
lda (ZPPtr1),y
bmi .5
ldx ZPPtr1
cpx ZPPtr2
bne .6
@ -217,25 +220,34 @@ MBAR.Enter ldy #S.WND.pMBAR
ldx ZPPtr1+1
cpx ZPPtr2+1
bne .6
ldx CB.Cache+S.CB.X1
stx Counter
ldx CB.Cache+S.CB.X1+1
stx Counter+1
.5 eor #S.MBITEM.S.SELECTED
sta (ZPPtr1),y
>LDYA CB.Cache+S.CB.X1
>STYA DX
jsr MBAR.DrawMBItem
bcs .9
.6 jsr MBAR.NextMBItem
.6 jsr MBAR.NextMBItem set X1 = X2
bra .4
.7 >LDYA L.WND.Screen
jsr CB.FlushBufToYA
bcs .9
>LDYA CB.Cache+S.CB.Y2
>STYA DY
>LDYA Counter
>STYA DX
ldy #S.WND.MBarY2
lda (ZPWNDPtr),y
sta DY
iny
lda (ZPWNDPtr),y
sta DY+1
ldy #S.MBITEM.pMENU
lda (ZPPtr2),y
@ -243,18 +255,13 @@ MBAR.Enter ldy #S.WND.pMBAR
iny
lda (ZPPtr2),y
ply
>DEBUG
jsr MENU.New.I
bcs .99
jmp MENU.Draw
.99 rts
*--------------------------------------
MBAR.Leave
clc
rts
jsr MENU.New.I
bcs .9
jmp MENU.Draw
.9 rts
*--------------------------------------
* ZPWNDPtr = parent WND
*--------------------------------------
@ -264,13 +271,13 @@ MBAR.Draw >SYSCALL2 GetMemPtr
ldy #S.OBJ.X1
ldx #S.CB.X1
jsr CB.GetWndYCacheX
jsr MBAR.GetMBItems
.1 lda (ZPPtr1)
beq .8
jsr MBAR.SetX2
jsr MBAR.SetX2 set X2 = X1 + W
jsr MBAR.DrawMBItem
bcs .9
@ -288,10 +295,10 @@ MBAR.Draw >SYSCALL2 GetMemPtr
jsr CB.GetWndYCacheX
jsr MBAR.SetY1Y2
lda PREFS.MBarColor
jsr CB.FillRectMonoA
jmp CB.Cache2CBBuf
.9 rts
@ -299,10 +306,10 @@ MBAR.Draw >SYSCALL2 GetMemPtr
MBAR.DrawMBItem ldy #S.MBITEM.S
lda (ZPPtr1),y
asl
lda PREFS.MBarColor
bcc .1
eor #$ff
.1 jsr CB.FillRectMonoA
@ -316,12 +323,12 @@ MBAR.DrawMBItem ldy #S.MBITEM.S
adc CB.Cache+S.CB.X1
sta CB.Cache+S.CB.X1
bcc .10
inc CB.Cache+S.CB.X1+1
.10 inc CB.Cache+S.CB.Y1
bne .11
inc CB.Cache+S.CB.Y1+1
.11 ldy #S.MBITEM.S
@ -336,7 +343,7 @@ MBAR.DrawMBItem ldy #S.MBITEM.S
ply
ldx hSYSFON
jsr DRAW.YAText
jmp CB.Cache2CBBuf
*--------------------------------------
MBAR.GetMBItems lda ZPMENUPtr
@ -353,7 +360,7 @@ MBAR.NextMBItem lda CB.Cache+S.CB.X2
sta CB.Cache+S.CB.X1
lda CB.Cache+S.CB.X2+1
sta CB.Cache+S.CB.X1+1
lda #S.MBITEM
jmp SkipAPtr1
*--------------------------------------
@ -362,12 +369,12 @@ MBAR.SetX2 lda CB.Cache+S.CB.X1
ldy #S.MBITEM.W
adc (ZPPtr1),y
sta CB.Cache+S.CB.X2
lda CB.Cache+S.CB.X1+1
iny
adc (ZPPtr1),y
sta CB.Cache+S.CB.X2+1
rts
*--------------------------------------
MBAR.SetY1Y2 ldy #S.WND.MBarY1

View File

@ -584,15 +584,7 @@ MENU.DrawMItem jsr MENU.ResetX1Y1X2
cmp #S.MITEM.T.SEP
bne MENU.DrawMItem1
lda #S.CB.CMD.HLINE
sta CB.Cache+S.CB.CMD
lda #S.CB.OP.SET
sta CB.Cache+S.CB.OP
lda #S.CB.M.MONO
sta CB.Cache+S.CB.M
lda PREFS.BorderColor
sta CB.Cache+S.CB.COLOR
jsr CB.BorderLineH
jmp CB.Cache2CBBuf
*--------------------------------------

View File

@ -149,15 +149,7 @@ OBJ.GetInCache >STYA .1+1
OBJ.DrawBorders >STYA ZPObjPtr
stx IY
lda #S.CB.CMD.HLINE
jsr CB.InitCacheA
lda #S.CB.OP.SET
sta CB.Cache+S.CB.OP
lda #S.CB.M.MONO
sta CB.Cache+S.CB.M
lda PREFS.BorderColor
sta CB.Cache+S.CB.COLOR
jsr CB.BorderLineH
ldy #S.OBJ.X1

View File

@ -670,15 +670,7 @@ WND.DrawTitleBarText
jmp DRAW.YATextAtDXDY
*--------------------------------------
WND.DrawStatusBar
lda #S.CB.CMD.HLINE
jsr CB.InitCacheA
lda #S.CB.OP.SET
sta CB.Cache+S.CB.OP
lda #S.CB.M.MONO
sta CB.Cache+S.CB.M
lda PREFS.BorderColor
sta CB.Cache+S.CB.COLOR
jsr CB.BorderLineH
ldy #S.OBJ.X1
ldx #S.CB.X1

View File

@ -174,6 +174,7 @@ L.BM.Left .DA BM.Left
L.BM.Right .DA BM.Right
L.BM.Up .DA BM.Up
L.BM.Down .DA BM.Down
L.BM.Info .DA BM.Info
*--------------------------------------
L.PTR.SaveBuf .DA PTR.SaveBuf
L.Cursors .DA PTR.Arrow