@@ -208,8 +208,8 @@ public enum BadgeIcon
208208 public class UIMenuItem : PauseMenuItem
209209 {
210210 internal int _itemId = 0 ;
211- internal string _formatLeftLabel = "" ;
212- internal string _formatRightLabel = "" ;
211+ // internal string _formatLeftLabel = "";
212+ // internal string _formatRightLabel = "";
213213 internal bool _selected = false ;
214214 private string _label = "" ;
215215 private string _rightLabel = "" ;
@@ -222,6 +222,10 @@ public class UIMenuItem : PauseMenuItem
222222 internal ItemFont rightLabelFont = ScaleformFonts . CHALET_LONDON_NINETEENSIXTY ;
223223 internal KeyValuePair < string , string > customLeftBadge = new KeyValuePair < string , string > ( "" , "" ) ;
224224 internal KeyValuePair < string , string > customRightBadge = new KeyValuePair < string , string > ( "" , "" ) ;
225+ /// <summary>
226+ /// This will override all the text color formatting to a pure white color both when highlighted and not.
227+ /// </summary>
228+ public bool KeepTextColorWhite = false ;
225229
226230 /// <summary>
227231 /// The item color when not highlighted
@@ -359,24 +363,7 @@ public override bool Selected
359363 {
360364 _selected = value ;
361365 if ( value )
362- {
363- if ( Enabled )
364- {
365- _formatLeftLabel = _formatLeftLabel . Replace ( "~w~" , "~l~" ) . Replace ( "~s~" , "~l~" ) ;
366- if ( ! string . IsNullOrWhiteSpace ( _formatRightLabel ) )
367- _formatRightLabel = _formatRightLabel . Replace ( "~w~" , "~l~" ) . Replace ( "~s~" , "~l~" ) ;
368- }
369366 Highlighted ? . Invoke ( Parent , this ) ;
370- }
371- else
372- {
373- if ( Enabled )
374- {
375- _formatLeftLabel = _formatLeftLabel . Replace ( "~l~" , "~s~" ) ;
376- if ( ! string . IsNullOrWhiteSpace ( _formatRightLabel ) )
377- _formatRightLabel = _formatRightLabel . Replace ( "~l~" , "~s~" ) ;
378- }
379- }
380367 if ( Parent != null && Parent . Visible )
381368 Parent . SendItemToScaleform ( Parent . MenuItems . IndexOf ( this ) , true ) ;
382369 if ( ParentColumn != null && ParentColumn . visible )
@@ -422,17 +409,6 @@ public virtual bool Enabled
422409 set
423410 {
424411 _enabled = value ;
425- if ( ! value )
426- {
427- _formatLeftLabel = _formatLeftLabel . ReplaceRstarColorsWith ( "~c~" ) ;
428- if ( this is UIMenuItem )
429- _formatRightLabel = _formatRightLabel . ReplaceRstarColorsWith ( "~c~" ) ;
430- }
431- else
432- {
433- Label = _label ;
434- RightLabel = _rightLabel ;
435- }
436412 if ( Parent != null && Parent . Visible )
437413 Parent . SendItemToScaleform ( Parent . MenuItems . IndexOf ( this ) , true ) ;
438414 if ( ParentColumn != null && ParentColumn . visible )
@@ -450,14 +426,12 @@ internal virtual void ItemActivate(UIMenu sender)
450426 /// <summary>
451427 /// Returns this item's label.
452428 /// </summary>
453- public virtual string Label
429+ public new virtual string Label
454430 {
455431 get => _label ;
456432 set
457433 {
458434 _label = value ;
459- _formatLeftLabel = value . StartsWith ( "~" ) ? value : "~s~" + value ;
460- _formatLeftLabel = ! _enabled ? _formatLeftLabel . ReplaceRstarColorsWith ( "~c~" ) : _selected ? _formatLeftLabel . Replace ( "~w~" , "~l~" ) . Replace ( "~s~" , "~l~" ) : _formatLeftLabel . Replace ( "~l~" , "~s~" ) ;
461435 if ( Parent != null && Parent . Visible )
462436 Parent . SendItemToScaleform ( Parent . MenuItems . IndexOf ( this ) , true ) ;
463437 if ( ParentColumn != null && ParentColumn . visible )
@@ -543,8 +517,6 @@ public virtual string RightLabel
543517 private set
544518 {
545519 _rightLabel = value ;
546- _formatRightLabel = value . StartsWith ( "~" ) ? value : "~s~" + value ;
547- _formatRightLabel = ! _enabled ? _formatRightLabel . ReplaceRstarColorsWith ( "~c~" ) : _selected ? _formatRightLabel . Replace ( "~w~" , "~l~" ) . Replace ( "~s~" , "~l~" ) : _formatRightLabel . Replace ( "~l~" , "~s~" ) ;
548520 if ( Parent != null && Parent . Visible )
549521 Parent . SendItemToScaleform ( Parent . MenuItems . IndexOf ( this ) , true ) ;
550522 if ( ParentColumn != null && ParentColumn . visible )
0 commit comments