Commit 583685c0 authored by Robert Sprowson's avatar Robert Sprowson Committed by ROOL
Browse files

[378] Extra switches to set button true colours

WimpVisualFlags gains -ButtonColour -ButtonWellColour -ButtonHighlightColour to allow a theme designer to set the button/well/pressed colours for R1-R7 slabbing to some other colour, and -ButtonBorderFaceColour -ButtonBorderOppColour -ButtonBorderShallowColour for the outlines.
The given colours are only used when there is no 'C' validation.
parent 30c0dbf5
No preview for this file type
No preview for this file type
...@@ -775,6 +775,12 @@ truemenuborderoppcolour # 4 ; colours to use for menu borders ...@@ -775,6 +775,12 @@ truemenuborderoppcolour # 4 ; colours to use for menu borders
truewindowborderfacecolour # 4 truewindowborderfacecolour # 4
truewindowborderoppcolour # 4 ; colours to use for window borders truewindowborderoppcolour # 4 ; colours to use for window borders
truewindowoutlinecolour # 4 ; colour to use for window outline truewindowoutlinecolour # 4 ; colour to use for window outline
truebuttonborderfacecolour # 4 ; global theme selection to override truefacecolour
truebuttonbordershallowcolour # 4 ; global theme selection to override trueoppcolour for R3/R4 icons
truebuttonborderoppcolour # 4 ; global theme selection to override trueoppcolour
truebuttonwellcolour # 4 ; global theme selection to override truewellcolour
truebuttonbgcolour # 4 ; global theme selection to override truebgcolour
truebuttonbgcolour2 # 4 ; global theme selection to override truebgcolour2
] ]
[ TrueIcon1 [ TrueIcon1
truefgcolour # 4 ; for 24-bit colour icons truefgcolour # 4 ; for 24-bit colour icons
...@@ -1893,7 +1899,7 @@ sc_orange * &E ...@@ -1893,7 +1899,7 @@ sc_orange * &E
sc_lightblue * &F sc_lightblue * &F
rgb_white * &FFFFFF00 rgb_white * &FFFFFF00
rgb_verylightgrey * &DDDDDD00 ; Unused rgb_verylightgrey * &DDDDDD00
rgb_lightgrey * &BBBBBB00 rgb_lightgrey * &BBBBBB00
rgb_midlightgrey * &99999900 rgb_midlightgrey * &99999900
rgb_middarkgrey * &77777700 rgb_middarkgrey * &77777700
...@@ -1904,7 +1910,7 @@ rgb_darkblue * &99440000 ; Unused ...@@ -1904,7 +1910,7 @@ rgb_darkblue * &99440000 ; Unused
rgb_yellow * &00EEEE00 ; Unused rgb_yellow * &00EEEE00 ; Unused
rgb_lightgreen * &00CC0000 ; Unused rgb_lightgreen * &00CC0000 ; Unused
rgb_red * &0000DD00 ; Unused rgb_red * &0000DD00 ; Unused
rgb_cream * &BBEEEE00 ; Unused rgb_cream * &BBEEEE00
rgb_darkgreen * &00885500 ; Unused rgb_darkgreen * &00885500 ; Unused
rgb_orange * &00BBFF00 ; Unused rgb_orange * &00BBFF00 ; Unused
rgb_lightblue * &FFBB0000 ; Unused rgb_lightblue * &FFBB0000 ; Unused
...@@ -2343,6 +2349,18 @@ WimpVisualFlags_Help DCB "*WimpVisualFlags changes some aspects of the visual a ...@@ -2343,6 +2349,18 @@ WimpVisualFlags_Help DCB "*WimpVisualFlags changes some aspects of the visual a
DCB " Set the colour of the top left portion of the menu border.",cr DCB " Set the colour of the top left portion of the menu border.",cr
DCB "-MenuBorderOppColour <&RRGGBB>",cr DCB "-MenuBorderOppColour <&RRGGBB>",cr
DCB " Set the colour of the bottom right portion of the menu border.",cr DCB " Set the colour of the bottom right portion of the menu border.",cr
DCB "-ButtonBorderFaceColour <&RRGGBB>",cr
DCB " Set the colour of the top left portion of button icons.",cr
DCB "-ButtonBorderShallowColour <&RRGGBB>",cr
DCB " Set the colour of ridge and channel icon shadows.",cr
DCB "-ButtonBorderOppColour <&RRGGBB>",cr
DCB " Set the colour of the bottom right portion of button icons.",cr
DCB "-ButtonColour <&RRGGBB>",cr
DCB " Set the colour of the top of button icons.",cr
DCB "-ButtonWellColour <&RRGGBB>",cr
DCB " Set the colour of the well around default action buttons.",cr
DCB "-ButtonHighlightColour <&RRGGBB>",cr
DCB " Set the colour of action buttons when selected.",cr
DCB "-WindowOutlineColour <&RRGGBB>",cr DCB "-WindowOutlineColour <&RRGGBB>",cr
DCB " Set the colour of the window outline.",cr DCB " Set the colour of the window outline.",cr
WimpVisualFlags_Syntax DCB "Syntax: *WimpVisualFlags <options>",0 WimpVisualFlags_Syntax DCB "Syntax: *WimpVisualFlags <options>",0
...@@ -3775,12 +3793,21 @@ gotwork ...@@ -3775,12 +3793,21 @@ gotwork
LDR R0,=rgb_white LDR R0,=rgb_white
STR R0,truemenuborderfacecolour STR R0,truemenuborderfacecolour
STR R0,truewindowborderfacecolour STR R0,truewindowborderfacecolour
STR R0,truebuttonborderfacecolour
LDR R0,=rgb_midlightgrey LDR R0,=rgb_midlightgrey
STR r0,truemenuborderoppcolour STR r0,truemenuborderoppcolour
STR r0,truebuttonbgcolour2
LDR R0,=rgb_middarkgrey LDR R0,=rgb_middarkgrey
STR r0,truewindowborderoppcolour STR r0,truewindowborderoppcolour
STR r0,truebuttonborderoppcolour
LDR R0,=rgb_black LDR R0,=rgb_black
STR r0,truewindowoutlinecolour STR r0,truewindowoutlinecolour
LDR R0,=rgb_cream
STR r0,truebuttonwellcolour
LDR R0,=rgb_verylightgrey
STR r0,truebuttonbgcolour
LDR R0,=rgb_lightgrey
STR r0,truebuttonbordershallowcolour
[ true [ true
MOV R0,#arrowIconWidth_No3D MOV R0,#arrowIconWidth_No3D
| |
...@@ -7623,6 +7650,8 @@ WimpKillSprite_Code ...@@ -7623,6 +7650,8 @@ WimpKillSprite_Code
DCB "NoIconBoxesInTransWindows=NIBITW/S,Fully3DIconBar=F3DIB/S,All=A/S," DCB "NoIconBoxesInTransWindows=NIBITW/S,Fully3DIconBar=F3DIB/S,All=A/S,"
DCB "WindowBorderFaceColour=WBFC/E,WindowBorderOppColour=WBOC/E," DCB "WindowBorderFaceColour=WBFC/E,WindowBorderOppColour=WBOC/E,"
DCB "MenuBorderFaceColour=MBFC/E,MenuBorderOppColour=MBOC/E," DCB "MenuBorderFaceColour=MBFC/E,MenuBorderOppColour=MBOC/E,"
DCB "ButtonBorderFaceColour=BBFC/E,ButtonBorderShallowColour=BBSC/E,ButtonBorderOppColour=BBOC/E,"
DCB "ButtonColour=BC/E,ButtonWellColour=BWC/E,ButtonHighlightColour=BHC/E,"
DCB "NoFontBlending=NFB/S,FontBlending=FB/S," DCB "NoFontBlending=NFB/S,FontBlending=FB/S,"
DCB "WindowOutlineColour=WOC/E,WindowOutlineOver=WOO/S",0 DCB "WindowOutlineColour=WOC/E,WindowOutlineOver=WOO/S",0
ALIGN ALIGN
...@@ -7669,14 +7698,14 @@ WimpVisualFlags_Code ...@@ -7669,14 +7698,14 @@ WimpVisualFlags_Code
LDR r1,[sp,#20] LDR r1,[sp,#20]
TEQ r1,#0 TEQ r1,#0
ORRNE r2,r2,#ThreeDFlags_Fully3DIconBar ORRNE r2,r2,#ThreeDFlags_Fully3DIconBar
; LDR r1,[sp,#44] ; LDR r1,[sp,#68]
; TEQ r1,#0 ; TEQ r1,#0
; ORRNE r2,r2,#ThreeDFlags_NoFontBlending ; bit is already set! ; ORRNE r2,r2,#ThreeDFlags_NoFontBlending ; bit is already set!
LDR r1,[sp,#48] LDR r1,[sp,#72]
TEQ r1,#0 TEQ r1,#0
BICNE r2,r2,#ThreeDFlags_NoFontBlending BICNE r2,r2,#ThreeDFlags_NoFontBlending
LDR r1,[sp,#56] LDR r1,[sp,#80]
TEQ r1,#0 TEQ r1,#0
ORRNE r2,r2,#ThreeDFlags_WindowOutlineOver ORRNE r2,r2,#ThreeDFlags_WindowOutlineOver
...@@ -7700,7 +7729,37 @@ WimpVisualFlags_Code ...@@ -7700,7 +7729,37 @@ WimpVisualFlags_Code
LDRNE r0,=rgb_midlightgrey LDRNE r0,=rgb_midlightgrey
STR r0,truemenuborderoppcolour STR r0,truemenuborderoppcolour
LDR r1,[sp,#52] ; window outline colour LDR r1,[sp,#44] ; button border face colour
BL %FT02
LDRNE r0,=rgb_white
STR r0,truebuttonborderfacecolour
LDR r1,[sp,#48] ; button border shallow colour
BL %FT02
LDRNE r0,=rgb_lightgrey
STR r0,truebuttonbordershallowcolour
LDR r1,[sp,#52] ; button border opposite colour
BL %FT02
LDRNE r0,=rgb_middarkgrey
STR r0,truebuttonborderoppcolour
LDR r1,[sp,#56] ; button colour
BL %FT02
LDRNE r0,=rgb_verylightgrey
STR r0,truebuttonbgcolour
LDR r1,[sp,#60] ; button well colour
BL %FT02
LDRNE r0,=rgb_cream
STR r0,truebuttonwellcolour
LDR r1,[sp,#64] ; button highlight colour
BL %FT02
LDRNE r0,=rgb_midlightgrey
STR r0,truebuttonbgcolour2
LDR r1,[sp,#76] ; window outline colour
BL %FT02 BL %FT02
LDRNE r0,=rgb_black LDRNE r0,=rgb_black
STR r0,truewindowoutlinecolour STR r0,truewindowoutlinecolour
......
...@@ -1049,6 +1049,7 @@ mungetruecolours ROUT ...@@ -1049,6 +1049,7 @@ mungetruecolours ROUT
LDRNEB R0, fontforeground LDRNEB R0, fontforeground
MOVEQ R0, R1, LSR #ib_fcol MOVEQ R0, R1, LSR #ib_fcol
AND R0, R0, #&F AND R0, R0, #&F
MOV R2, R0
LDR R0, [R14, R0, LSL #2] ; look up palette entry LDR R0, [R14, R0, LSL #2] ; look up palette entry
STR R0, truefgcolour STR R0, truefgcolour
01 01
...@@ -1059,28 +1060,61 @@ mungetruecolours ROUT ...@@ -1059,28 +1060,61 @@ mungetruecolours ROUT
LDRNEB R0, fontbackground LDRNEB R0, fontbackground
MOVEQ R0, R1, LSR #ib_bcol MOVEQ R0, R1, LSR #ib_bcol
AND R0, R0, #&F AND R0, R0, #&F
[ ThreeDPatch
TST R1, #if_border
LDRNE R3, border_type
TEQNE R3, #border_normal
LDREQ R0, [R14, R0, LSL #2] ; look up palette entry
BEQ %FT05 ; there is a border, and it's not R0 validation
TEQ R0, #sc_verylightgrey
TEQEQ R2, #sc_black
LDREQ R0, truebuttonbgcolour ; theme it since it was the default fg/bg colours
LDRNE R0, [R14, R0, LSL #2] ; look up palette entry
05
|
LDR R0, [R14, R0, LSL #2] ; look up palette entry LDR R0, [R14, R0, LSL #2] ; look up palette entry
]
STR R0, truebgcolour STR R0, truebgcolour
01 01
LDR R0, truebgcolour2 LDR R0, truebgcolour2
CMP R0, #-1 CMP R0, #-1
[ ThreeDPatch
BNE %FT05
LDR R0, border_highlight
AND R0, R0, #&F
TEQ R0, #sc_midlightgrey
TEQEQ R2, #sc_black
LDREQ R0, truebuttonbgcolour2 ; theme it since it was the default fg/bg2 colours
LDRNE R0, [R14, R0, LSL #2] ; look up palette entry
STR R0, truebgcolour2
05
|
LDREQ R0, border_highlight LDREQ R0, border_highlight
ANDEQ R0, R0, #&F ANDEQ R0, R0, #&F
LDREQ R0, [R14, R0, LSL #2] ; look up palette entry LDREQ R0, [R14, R0, LSL #2] ; look up palette entry
STREQ R0, truebgcolour2 STREQ R0, truebgcolour2
]
LDR R0, truewellcolour LDR R0, truewellcolour
CMP R0, #-1 CMP R0, #-1
BNE %FT01 BNE %FT01
LDR R0, border_type LDR R0, border_type
TEQ R0, #border_defaultaction TEQ R0, #border_defaultaction
[ ThreeDPatch
LDREQ R0, truebuttonwellcolour ; default = Wimp cream (default action)
LDRNE R0, truebuttonbgcolour ; default = Wimp grey 1 (editable)
|
LDREQ R0, [R14, #sc_cream :SHL: 2] ; default = Wimp cream (default action) LDREQ R0, [R14, #sc_cream :SHL: 2] ; default = Wimp cream (default action)
LDRNE R0, [R14, #sc_verylightgrey :SHL: 2] ; default = Wimp grey 1 (editable) LDRNE R0, [R14, #sc_verylightgrey :SHL: 2] ; default = Wimp grey 1 (editable)
]
STR R0, truewellcolour STR R0, truewellcolour
01 01
LDR R0, truefacecolour LDR R0, truefacecolour
CMP R0, #-1 CMP R0, #-1
[ ThreeDPatch
LDREQ R0, truebuttonborderfacecolour ; default = Wimp white
|
LDREQ R0, [R14, #sc_white :SHL: 2] ; default = Wimp white LDREQ R0, [R14, #sc_white :SHL: 2] ; default = Wimp white
]
STREQ R0, truefacecolour STREQ R0, truefacecolour
LDR R0, trueoppcolour LDR R0, trueoppcolour
...@@ -1089,8 +1123,13 @@ mungetruecolours ROUT ...@@ -1089,8 +1123,13 @@ mungetruecolours ROUT
LDR R0, border_type LDR R0, border_type
TEQ R0, #border_ridge TEQ R0, #border_ridge
TEQNE R0, #border_channel TEQNE R0, #border_channel
[ ThreeDPatch
LDREQ R0, truebuttonbordershallowcolour ; default = Wimp grey 2 (shallow)
LDRNE R0, truebuttonborderoppcolour ; default = Wimp grey 4 (normal)
|
LDREQ R0, [R14, #sc_lightgrey :SHL: 2] ; default = Wimp grey 2 (shallow) LDREQ R0, [R14, #sc_lightgrey :SHL: 2] ; default = Wimp grey 2 (shallow)
LDRNE R0, [R14, #sc_middarkgrey :SHL: 2] ; default = Wimp grey 4 (normal) LDRNE R0, [R14, #sc_middarkgrey :SHL: 2] ; default = Wimp grey 4 (normal)
]
STR R0, trueoppcolour STR R0, trueoppcolour
01 01
TST R1, #is_inverted TST R1, #is_inverted
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment