@@ -13,7 +13,7 @@ public class MainToolbar : FloatingToolWindow
1313 public override bool ShouldRestoreLastWindowPosition => true ;
1414 public override string WindowTitle { get ; set ; } = "TOOLBAR" ;
1515 public override Rect WindowRect { get ; set ; } = new Rect ( 30 , 290 , 170 , 600 ) ;
16- private Color activeBackground = new Color ( 0.8f , 0.7f , 0.9f , 0.7f ) ;
16+ public static Color ActiveToolBackgroundTint { get ; set ; } = new Color ( 0.8f , 0.7f , 0.9f , 0.7f ) ;
1717
1818 #region FloatingToolWindow derived classes
1919
@@ -67,18 +67,29 @@ public void RestoreVisibleWindows()
6767
6868 }
6969
70+ public static Texture2D TintableWhiteTexture { get ; set ; } =
71+ Utils . CreateSinglePixelTexture2D ( new Color ( 1f , 1f , 1f , 0.8f ) ) ;
72+
7073 public GUIStyle TintableBackgroundStyle { get ; set ; } = new GUIStyle ( UIController . DefaultSkin . FindStyle ( "PopupWindow.Row" ) )
7174 {
7275 padding = new RectOffset ( 0 , 0 , 0 , 0 ) ,
7376 margin = new RectOffset ( 0 , 0 , 0 , 0 ) ,
7477 border = new RectOffset ( 0 , 0 , 0 , 0 ) ,
7578 overflow = new RectOffset ( 0 , 0 , 0 , 0 ) ,
7679 normal = new GUIStyleState ( ) {
77- background = Utils . CreateSinglePixelTexture2D ( new Color ( 1f , 1f , 1f , 0.8f ) ) ,
80+ background = TintableWhiteTexture ,
7881 textColor = Color . white
7982 } ,
8083 hover = new GUIStyleState ( ) {
81- background = null ,
84+ background = TintableWhiteTexture ,
85+ textColor = Color . white
86+ } ,
87+ active = new GUIStyleState ( ) {
88+ background = TintableWhiteTexture ,
89+ textColor = Color . white
90+ } ,
91+ onNormal = new GUIStyleState ( ) {
92+ background = TintableWhiteTexture ,
8293 textColor = Color . white
8394 }
8495 } ;
@@ -88,11 +99,11 @@ public void RestoreVisibleWindows()
8899 margin = new RectOffset ( 0 , 0 , 0 , 0 ) ,
89100 } ;
90101
91- private Color bgTintColor = new Color32 ( 205 , 196 , 174 , 244 ) ;
102+ public static Color BackgroundTintColor { get ; set ; } = new Color32 ( 205 , 196 , 174 , 244 ) ;
92103
93104 public override void OnDrawUI ( )
94105 {
95- GUI . backgroundColor = bgTintColor ;
106+ GUI . backgroundColor = BackgroundTintColor ;
96107 GUILayout . BeginHorizontal ( TintableBackgroundStyle ) ;
97108
98109 GUI . backgroundColor = Color . black ;
@@ -121,7 +132,7 @@ private void OnDrawCheatingTools()
121132 GUILayout . Label ( "<color=#000000AA>C H E A T I N G</color> T O O L S" ,
122133 "PopupWindow.Sidebar.Heading" ) ;
123134
124- GUI . backgroundColor = activeBackground ;
135+ GUI . backgroundColor = ActiveToolBackgroundTint ;
125136 if ( GlobalSettings . MilitaryTool . Value )
126137 if ( DrawItem < MilitaryToolsWindow > ( MilitaryTool , "Military" ) )
127138 Open < MilitaryToolsWindow > ( window => MilitaryTool = window ) ;
@@ -153,7 +164,7 @@ private void OnDrawDeveloperTools()
153164 GUILayout . Label ( "<color=#000000AA>D E V E L O P E R</color> T O O L S" ,
154165 "PopupWindow.Sidebar.Heading" ) ;
155166
156- GUI . backgroundColor = activeBackground ;
167+ GUI . backgroundColor = ActiveToolBackgroundTint ;
157168 if ( GlobalSettings . AutoTurnTool . Value )
158169 if ( DrawItem < AutoTurnToolWindow > ( AutoTurnTool , "Auto Turn" ) )
159170 Open < AutoTurnToolWindow > ( window => AutoTurnTool = window ) ;
@@ -189,7 +200,7 @@ private void OnDrawProfilingTools()
189200 GUILayout . Label ( "<color=#000000AA>P R O F I L I N G</color> T O O L S" ,
190201 "PopupWindow.Sidebar.Heading" ) ;
191202
192- GUI . backgroundColor = activeBackground ;
203+ GUI . backgroundColor = ActiveToolBackgroundTint ;
193204 if ( GlobalSettings . FramerateTool . Value )
194205 if ( DrawItem < FramerateToolWindow > ( FramerateTool , "Framerate" ) )
195206 Open < FramerateToolWindow > ( window => FramerateTool = window ) ;
@@ -217,7 +228,7 @@ private void OnDrawExperimentalTools()
217228 {
218229 GUILayout . Label ( "E X P <color=#000000AA>E R I M E N T A L</color>" , "PopupWindow.Sidebar.Heading" ) ;
219230
220- GUI . backgroundColor = activeBackground ;
231+ GUI . backgroundColor = ActiveToolBackgroundTint ;
221232 if ( GlobalSettings . AITool . Value )
222233 if ( DrawItem < AIToolWindow > ( AITool , "AI Tools" ) )
223234 Open < AIToolWindow > ( window => AITool = window ) ;
0 commit comments