@@ -630,7 +630,7 @@ protected string GetSpriteName(Icon icon, bool selected)
630630 case Icon . BRAND_PROGEN2 : return "progen" ;
631631 case Icon . BRAND_RUNE : return "rune" ;
632632 default :
633- break ;
633+ return "" ;
634634#endif
635635 }
636636#if REDM
@@ -1032,7 +1032,14 @@ internal virtual void Draw(int indexOffset)
10321032 #endregion
10331033
10341034 #region Label
1035+ int font = 0 ;
1036+ float textSize = ( 14f * 27f ) / MenuController . ScreenHeight ;
10351037#if FIVEM
1038+ float textMinX = ( textXOffset / MenuController . ScreenWidth ) + ( 10f / MenuController . ScreenWidth ) ;
1039+ float textMaxX = ( Width - 10f ) / MenuController . ScreenWidth ;
1040+ //float textHeight = GetTextScaleHeight(textSize, font);
1041+ float textY = y - ( ( 30f / 2f ) / MenuController . ScreenHeight ) ;
1042+ int textColor = Selected ? ( Enabled ? 0 : 50 ) : ( Enabled ? 255 : 109 ) ;
10361043 if ( ! string . IsNullOrEmpty ( Label ) )
10371044 {
10381045 SetScriptGfxAlign ( 76 , 84 ) ;
@@ -1047,10 +1054,6 @@ internal virtual void Draw(int indexOffset)
10471054 {
10481055 SetTextColour ( textColor , textColor , textColor , 255 ) ;
10491056 }
1050- //if (Selected)
1051- //{
1052- // SetTextColour(0, 0, 0, 255);
1053- //}
10541057 if ( ParentMenu . LeftAligned )
10551058 {
10561059 SetTextWrap ( 0f , ( ( 490f - rightTextIconOffset ) / MenuController . ScreenWidth ) ) ;
@@ -1068,26 +1071,19 @@ internal virtual void Draw(int indexOffset)
10681071 #endregion
10691072
10701073 #region Text
1071- float textSize = ( 14f * 27f ) / MenuController . ScreenHeight ;
10721074
10731075#if FIVEM
1074- int font = 0 ;
10751076 SetScriptGfxAlign ( 76 , 84 ) ;
10761077 SetScriptGfxAlignParams ( 0f , 0f , 0f , 0f ) ;
10771078 SetTextFont ( font ) ;
10781079 SetTextScale ( textSize , textSize ) ;
10791080 SetTextJustification ( 1 ) ;
10801081 BeginTextCommandDisplayText ( "STRING" ) ;
10811082 AddTextComponentSubstringPlayerName ( Text ?? "N/A" ) ;
1082- int textColor = Selected ? ( Enabled ? 0 : 50 ) : ( Enabled ? 255 : 109 ) ;
10831083 if ( Selected || ! Enabled )
10841084 {
10851085 SetTextColour ( textColor , textColor , textColor , 255 ) ;
10861086 }
1087- float textMinX = ( textXOffset / MenuController . ScreenWidth ) + ( 10f / MenuController . ScreenWidth ) ;
1088- float textMaxX = ( Width - 10f ) / MenuController . ScreenWidth ;
1089- //float textHeight = GetTextScaleHeight(textSize, font);
1090- float textY = y - ( ( 30f / 2f ) / MenuController . ScreenHeight ) ;
10911087 if ( ParentMenu . LeftAligned )
10921088 {
10931089 SetTextWrap ( textMinX , textMaxX ) ;
0 commit comments