Skip to content

Commit 8a73df3

Browse files
author
Marek Kulik
committed
Add Chat namespace for enums in Settings
1 parent 9717815 commit 8a73df3

File tree

6 files changed

+147
-116
lines changed

6 files changed

+147
-116
lines changed

Client/core/CChat.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -767,19 +767,19 @@ void CChat::SetChatFont ( eChatFont Font )
767767
float fReqestedDxFontScale = std::max( m_vecScale.fX, m_vecScale.fY );
768768
switch ( Font )
769769
{
770-
case ChatFonts::CHAT_FONT_DEFAULT:
770+
case Chat::Font::DEFAULT:
771771
pFont = g_pCore->GetGUI ()->GetDefaultFont ();
772772
pDXFont = g_pCore->GetGraphics ()->GetFont ( FONT_DEFAULT, &fUsingDxFontScale, fReqestedDxFontScale, "chat" );
773773
break;
774-
case ChatFonts::CHAT_FONT_CLEAR:
774+
case Chat::Font::CLEAR:
775775
pFont = g_pCore->GetGUI ()->GetClearFont ();
776776
pDXFont = g_pCore->GetGraphics ()->GetFont ( FONT_CLEAR, &fUsingDxFontScale, fReqestedDxFontScale, "chat" );
777777
break;
778-
case ChatFonts::CHAT_FONT_BOLD:
778+
case Chat::Font::BOLD:
779779
pFont = g_pCore->GetGUI ()->GetBoldFont ();
780780
pDXFont = g_pCore->GetGraphics ()->GetFont ( FONT_DEFAULT_BOLD, &fUsingDxFontScale, fReqestedDxFontScale, "chat" );
781781
break;
782-
case ChatFonts::CHAT_FONT_ARIAL:
782+
case Chat::Font::ARIAL:
783783
pDXFont = g_pCore->GetGraphics ()->GetFont ( FONT_ARIAL, &fUsingDxFontScale, fReqestedDxFontScale, "chat" );
784784
break;
785785
}

Client/core/CChat.h

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@
1010
*
1111
*****************************************************************************/
1212

13-
#ifndef __CCHAT_H
14-
#define __CCHAT_H
13+
#pragma once
1514

1615
#include "CGUI.h"
1716
#include <core/CCoreInterface.h>
@@ -300,5 +299,3 @@ class CChat
300299

301300
bool m_bNickCompletion;
302301
};
303-
304-
#endif

Client/core/CSettings.cpp

Lines changed: 72 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -930,10 +930,10 @@ void CSettings::CreateGUI ( void )
930930
pColorTabPanel->SetPosition ( CVector2D ( 10.0f, 150.0f ) );
931931
pColorTabPanel->SetSize ( CVector2D ( fColorTabPanelWidth, 150.0f ) );
932932

933-
CreateChatColorTab ( ChatColorTypes::CHAT_COLOR_BG, strChatBG, pColorTabPanel );
934-
CreateChatColorTab ( ChatColorTypes::CHAT_COLOR_TEXT, strChatText, pColorTabPanel );
935-
CreateChatColorTab ( ChatColorTypes::CHAT_COLOR_INPUT_BG, strInputBG, pColorTabPanel );
936-
CreateChatColorTab ( ChatColorTypes::CHAT_COLOR_INPUT_TEXT, strInputText, pColorTabPanel );
933+
CreateChatColorTab ( Chat::ColorType::BG, strChatBG, pColorTabPanel );
934+
CreateChatColorTab ( Chat::ColorType::TEXT, strChatText, pColorTabPanel );
935+
CreateChatColorTab ( Chat::ColorType::INPUT_BG, strInputBG, pColorTabPanel );
936+
CreateChatColorTab ( Chat::ColorType::INPUT_TEXT, strInputText, pColorTabPanel );
937937

938938
// Cache position and size from color tab panel (for positioning and height)
939939
pColorTabPanel->GetPosition ( vecTemp );
@@ -957,22 +957,22 @@ void CSettings::CreateGUI ( void )
957957
float fFontNamesMarginY = 22.0f;
958958
float fLineHeight = 20.0f;
959959

960-
m_pRadioChatFont [ ChatFonts::CHAT_FONT_DEFAULT ] = reinterpret_cast < CGUIRadioButton* > ( pManager->CreateRadioButton ( m_pPaneChatFont, "Tahoma" ) );
961-
m_pRadioChatFont [ ChatFonts::CHAT_FONT_DEFAULT ]->SetSelected ( true );
962-
m_pRadioChatFont [ ChatFonts::CHAT_FONT_DEFAULT ]->SetPosition ( CVector2D ( 0.0f, fFontNamesMarginY ) );
963-
m_pRadioChatFont [ ChatFonts::CHAT_FONT_DEFAULT ]->SetSize ( CVector2D ( 100.0f, 15.0f ) );
960+
m_pRadioChatFont [ Chat::Font::DEFAULT ] = reinterpret_cast < CGUIRadioButton* > ( pManager->CreateRadioButton ( m_pPaneChatFont, "Tahoma" ) );
961+
m_pRadioChatFont [ Chat::Font::DEFAULT ]->SetSelected ( true );
962+
m_pRadioChatFont [ Chat::Font::DEFAULT ]->SetPosition ( CVector2D ( 0.0f, fFontNamesMarginY ) );
963+
m_pRadioChatFont [ Chat::Font::DEFAULT ]->SetSize ( CVector2D ( 100.0f, 15.0f ) );
964964

965-
m_pRadioChatFont [ ChatFonts::CHAT_FONT_CLEAR ] = reinterpret_cast < CGUIRadioButton* > ( pManager->CreateRadioButton ( m_pPaneChatFont, "Verdana" ) );
966-
m_pRadioChatFont [ ChatFonts::CHAT_FONT_CLEAR ]->SetPosition ( CVector2D ( 0.0f, fLineHeight * 1 + fFontNamesMarginY ) );
967-
m_pRadioChatFont [ ChatFonts::CHAT_FONT_CLEAR ]->SetSize ( CVector2D ( 100.0f, 15.0f ) );
965+
m_pRadioChatFont [ Chat::Font::CLEAR ] = reinterpret_cast < CGUIRadioButton* > ( pManager->CreateRadioButton ( m_pPaneChatFont, "Verdana" ) );
966+
m_pRadioChatFont [ Chat::Font::CLEAR ]->SetPosition ( CVector2D ( 0.0f, fLineHeight * 1 + fFontNamesMarginY ) );
967+
m_pRadioChatFont [ Chat::Font::CLEAR ]->SetSize ( CVector2D ( 100.0f, 15.0f ) );
968968

969-
m_pRadioChatFont [ ChatFonts::CHAT_FONT_BOLD ] = reinterpret_cast < CGUIRadioButton* > ( pManager->CreateRadioButton ( m_pPaneChatFont, "Tahoma Bold" ) );
970-
m_pRadioChatFont [ ChatFonts::CHAT_FONT_BOLD ]->SetPosition ( CVector2D ( 0.0f, fLineHeight * 2 + fFontNamesMarginY ) );
971-
m_pRadioChatFont [ ChatFonts::CHAT_FONT_BOLD ]->SetSize ( CVector2D ( 100.0f, 15.0f ) );
969+
m_pRadioChatFont [ Chat::Font::BOLD ] = reinterpret_cast < CGUIRadioButton* > ( pManager->CreateRadioButton ( m_pPaneChatFont, "Tahoma Bold" ) );
970+
m_pRadioChatFont [ Chat::Font::BOLD ]->SetPosition ( CVector2D ( 0.0f, fLineHeight * 2 + fFontNamesMarginY ) );
971+
m_pRadioChatFont [ Chat::Font::BOLD ]->SetSize ( CVector2D ( 100.0f, 15.0f ) );
972972

973-
m_pRadioChatFont [ ChatFonts::CHAT_FONT_ARIAL ] = reinterpret_cast < CGUIRadioButton* > ( pManager->CreateRadioButton ( m_pPaneChatFont, "Arial" ) );
974-
m_pRadioChatFont [ ChatFonts::CHAT_FONT_ARIAL ]->SetPosition ( CVector2D ( 0.0f, fLineHeight * 3 + fFontNamesMarginY ) );
975-
m_pRadioChatFont [ ChatFonts::CHAT_FONT_ARIAL ]->SetSize ( CVector2D ( 100.0f, 15.0f ) );
973+
m_pRadioChatFont [ Chat::Font::ARIAL ] = reinterpret_cast < CGUIRadioButton* > ( pManager->CreateRadioButton ( m_pPaneChatFont, "Arial" ) );
974+
m_pRadioChatFont [ Chat::Font::ARIAL ]->SetPosition ( CVector2D ( 0.0f, fLineHeight * 3 + fFontNamesMarginY ) );
975+
m_pRadioChatFont [ Chat::Font::ARIAL ]->SetSize ( CVector2D ( 100.0f, 15.0f ) );
976976

977977
// Misc. Options
978978
{
@@ -2879,15 +2879,15 @@ void CSettings::LoadData ( void )
28792879
else if ( iVar == 1 ) m_pUpdateAutoInstallCombo->SetText ( "Default" );
28802880

28812881
// Chat
2882-
LoadChatColorFromCVar ( ChatColorTypes::CHAT_COLOR_BG, "chat_color" );
2883-
LoadChatColorFromCVar ( ChatColorTypes::CHAT_COLOR_TEXT, "chat_text_color" );
2884-
LoadChatColorFromCVar ( ChatColorTypes::CHAT_COLOR_INPUT_BG, "chat_input_color" );
2885-
LoadChatColorFromCVar ( ChatColorTypes::CHAT_COLOR_INPUT_TEXT, "chat_input_text_color" );
2882+
LoadChatColorFromCVar ( Chat::ColorType::BG, "chat_color" );
2883+
LoadChatColorFromCVar ( Chat::ColorType::TEXT, "chat_text_color" );
2884+
LoadChatColorFromCVar ( Chat::ColorType::INPUT_BG, "chat_input_color" );
2885+
LoadChatColorFromCVar ( Chat::ColorType::INPUT_TEXT, "chat_input_text_color" );
28862886

28872887
unsigned int uiFont;
28882888
CVARS_GET ( "chat_font", uiFont );
2889-
if ( uiFont >= ChatFonts::CHAT_FONT_MAX )
2890-
uiFont = ChatFonts::CHAT_FONT_DEFAULT;
2889+
if ( uiFont >= Chat::Font::MAX )
2890+
uiFont = Chat::Font::DEFAULT;
28912891
m_pRadioChatFont [ uiFont ]->SetSelected ( true );
28922892

28932893
CVARS_GET ( "chat_lines", strVar ); m_pChatLines->SetText ( strVar.c_str () );
@@ -3204,11 +3204,11 @@ void CSettings::SaveData ( void )
32043204
}
32053205

32063206
// Chat
3207-
SaveChatColor ( ChatColorTypes::CHAT_COLOR_BG, "chat_color" );
3208-
SaveChatColor ( ChatColorTypes::CHAT_COLOR_TEXT, "chat_text_color" );
3209-
SaveChatColor ( ChatColorTypes::CHAT_COLOR_INPUT_BG, "chat_input_color" );
3210-
SaveChatColor ( ChatColorTypes::CHAT_COLOR_INPUT_TEXT, "chat_input_text_color" );
3211-
for ( int iFont = 0; iFont < ChatColorTypes::CHAT_COLOR_MAX; iFont ++ )
3207+
SaveChatColor ( Chat::ColorType::BG, "chat_color" );
3208+
SaveChatColor ( Chat::ColorType::TEXT, "chat_text_color" );
3209+
SaveChatColor ( Chat::ColorType::INPUT_BG, "chat_input_color" );
3210+
SaveChatColor ( Chat::ColorType::INPUT_TEXT, "chat_input_text_color" );
3211+
for ( int iFont = 0; iFont < Chat::ColorType::MAX; iFont ++ )
32123212
{
32133213
if ( m_pRadioChatFont [ iFont ]->GetSelected( ) )
32143214
{
@@ -3325,7 +3325,7 @@ void CSettings::AddKeyBindSection ( char* szSectionName )
33253325
m_pKeyBindSections.push_back ( new SKeyBindSection ( szSectionName ) );
33263326
}
33273327

3328-
void CSettings::CreateChatColorTab ( ChatColorType eType, const char* szName, CGUITabPanel* pParent )
3328+
void CSettings::CreateChatColorTab ( eChatColorType eType, const char* szName, CGUITabPanel* pParent )
33293329
{
33303330
CVector2D vecTemp;
33313331

@@ -3395,15 +3395,15 @@ void CSettings::CreateChatColorTab ( ChatColorType eType, const char* szName, CG
33953395
m_pChatAlpha [ eType ]->SetProperty ( "StepSize", "0.004" );
33963396
}
33973397

3398-
void CSettings::LoadChatColorFromCVar ( ChatColorType eType, const char* szCVar )
3398+
void CSettings::LoadChatColorFromCVar ( eChatColorType eType, const char* szCVar )
33993399
{
34003400
// Load the color according to the cvars and update the gui
34013401
CColor pColor;
34023402
CVARS_GET ( szCVar, pColor );
34033403
SetChatColorValues ( eType, pColor );
34043404
}
34053405

3406-
void CSettings::SaveChatColor ( ChatColorType eType, const char* szCVar )
3406+
void CSettings::SaveChatColor ( eChatColorType eType, const char* szCVar )
34073407
{
34083408
// Save the color to the cvar if it's different
34093409
CColor pColor, pOldColor;
@@ -3414,7 +3414,7 @@ void CSettings::SaveChatColor ( ChatColorType eType, const char* szCVar )
34143414
CVARS_SET ( szCVar, pColor );
34153415
}
34163416

3417-
CColor CSettings::GetChatColorValues ( ChatColorType eType )
3417+
CColor CSettings::GetChatColorValues ( eChatColorType eType )
34183418
{
34193419
// Retrieve the color according to the scrollbar values
34203420
CColor pColor;
@@ -3425,7 +3425,7 @@ CColor CSettings::GetChatColorValues ( ChatColorType eType )
34253425
return pColor;
34263426
}
34273427

3428-
void CSettings::SetChatColorValues ( ChatColorType eType, CColor pColor )
3428+
void CSettings::SetChatColorValues ( eChatColorType eType, CColor pColor )
34293429
{
34303430
// Set the scrollbar position based on the color
34313431
m_pChatRed [ eType ]->SetScrollPosition ( ( float ) pColor.R / 255.0f );
@@ -3477,7 +3477,7 @@ void CSettings::LoadSkins()
34773477
}
34783478
}
34793479

3480-
void CSettings::LoadChatColorFromString ( ChatColorType eType, const string& strColor )
3480+
void CSettings::LoadChatColorFromString ( eChatColorType eType, const string& strColor )
34813481
{
34823482
CColor pColor;
34833483
stringstream ss( strColor );
@@ -3535,27 +3535,27 @@ bool CSettings::OnChatLoadPresetClick( CGUIElement* pElement )
35353535
{
35363536
if ( strTag == "color_text" )
35373537
{
3538-
LoadChatColorFromString ( ChatColorTypes::CHAT_COLOR_TEXT, strValue );
3538+
LoadChatColorFromString ( Chat::ColorType::TEXT, strValue );
35393539
}
35403540
else if ( strTag == "color_background" )
35413541
{
3542-
LoadChatColorFromString ( ChatColorTypes::CHAT_COLOR_BG, strValue );
3542+
LoadChatColorFromString ( Chat::ColorType::BG, strValue );
35433543
}
35443544
else if ( strTag == "color_input_text" )
35453545
{
3546-
LoadChatColorFromString ( ChatColorTypes::CHAT_COLOR_INPUT_TEXT, strValue );
3546+
LoadChatColorFromString ( Chat::ColorType::INPUT_TEXT, strValue );
35473547
}
35483548
else if ( strTag == "color_input_background" )
35493549
{
3550-
LoadChatColorFromString ( ChatColorTypes::CHAT_COLOR_INPUT_BG, strValue );
3550+
LoadChatColorFromString ( Chat::ColorType::INPUT_BG, strValue );
35513551
}
35523552
else if ( strTag == "font" )
35533553
{
35543554
int iValue;
35553555
pSubNode->GetTagContent ( iValue );
35563556

3557-
if ( iValue < 0 || iValue >= ChatFonts::CHAT_FONT_MAX )
3558-
iValue = ChatFonts::CHAT_FONT_DEFAULT;
3557+
if ( iValue < 0 || iValue >= Chat::Font::MAX )
3558+
iValue = Chat::Font::DEFAULT;
35593559
m_pRadioChatFont [ iValue ]->SetSelected ( true );
35603560
}
35613561
else if ( strTag == "lines" )
@@ -3786,14 +3786,14 @@ bool CSettings::OnChatRedChanged ( CGUIElement* pElement)
37863786
CGUIScrollBar* pScrollBar = reinterpret_cast < CGUIScrollBar* > ( pElement );
37873787
int iValue = ( (float)pScrollBar->GetScrollPosition () * 255.0f );
37883788

3789-
if ( pScrollBar == m_pChatRed [ ChatColorTypes::CHAT_COLOR_BG ] )
3790-
m_pChatRedValue [ ChatColorTypes::CHAT_COLOR_BG ]->SetText ( SString("%i", iValue).c_str() );
3791-
else if ( pScrollBar == m_pChatRed [ ChatColorTypes::CHAT_COLOR_TEXT ] )
3792-
m_pChatRedValue [ ChatColorTypes::CHAT_COLOR_TEXT]->SetText ( SString("%i", iValue).c_str() );
3793-
else if ( pScrollBar == m_pChatRed [ ChatColorTypes::CHAT_COLOR_INPUT_BG ] )
3794-
m_pChatRedValue [ ChatColorTypes::CHAT_COLOR_INPUT_BG]->SetText ( SString("%i", iValue).c_str() );
3795-
else if ( pScrollBar == m_pChatRed [ ChatColorTypes::CHAT_COLOR_INPUT_TEXT ] )
3796-
m_pChatRedValue [ ChatColorTypes::CHAT_COLOR_INPUT_TEXT]->SetText ( SString("%i", iValue).c_str() );
3789+
if ( pScrollBar == m_pChatRed [ Chat::ColorType::BG ] )
3790+
m_pChatRedValue [ Chat::ColorType::BG ]->SetText ( SString("%i", iValue).c_str() );
3791+
else if ( pScrollBar == m_pChatRed [ Chat::ColorType::TEXT ] )
3792+
m_pChatRedValue [ Chat::ColorType::TEXT ]->SetText ( SString("%i", iValue).c_str() );
3793+
else if ( pScrollBar == m_pChatRed [ Chat::ColorType::INPUT_BG ] )
3794+
m_pChatRedValue [ Chat::ColorType::INPUT_BG ]->SetText ( SString("%i", iValue).c_str() );
3795+
else if ( pScrollBar == m_pChatRed [ Chat::ColorType::INPUT_TEXT ] )
3796+
m_pChatRedValue [ Chat::ColorType::INPUT_TEXT ]->SetText ( SString("%i", iValue).c_str() );
37973797

37983798
return true;
37993799
}
@@ -3803,14 +3803,14 @@ bool CSettings::OnChatGreenChanged ( CGUIElement* pElement)
38033803
CGUIScrollBar* pScrollBar = reinterpret_cast < CGUIScrollBar* > ( pElement );
38043804
int iValue = ( (float)pScrollBar->GetScrollPosition () * 255.0f );
38053805

3806-
if ( pScrollBar == m_pChatGreen [ ChatColorTypes::CHAT_COLOR_BG ] )
3807-
m_pChatGreenValue [ ChatColorTypes::CHAT_COLOR_BG ]->SetText ( SString("%i", iValue).c_str() );
3808-
else if ( pScrollBar == m_pChatGreen [ ChatColorTypes::CHAT_COLOR_TEXT ] )
3809-
m_pChatGreenValue [ ChatColorTypes::CHAT_COLOR_TEXT]->SetText ( SString("%i", iValue).c_str() );
3810-
else if ( pScrollBar == m_pChatGreen [ ChatColorTypes::CHAT_COLOR_INPUT_BG ] )
3811-
m_pChatGreenValue [ ChatColorTypes::CHAT_COLOR_INPUT_BG]->SetText ( SString("%i", iValue).c_str() );
3812-
else if ( pScrollBar == m_pChatGreen [ ChatColorTypes::CHAT_COLOR_INPUT_TEXT ] )
3813-
m_pChatGreenValue [ ChatColorTypes::CHAT_COLOR_INPUT_TEXT]->SetText ( SString("%i", iValue).c_str() );
3806+
if ( pScrollBar == m_pChatGreen [ Chat::ColorType::BG ] )
3807+
m_pChatGreenValue [ Chat::ColorType::BG ]->SetText ( SString("%i", iValue).c_str() );
3808+
else if ( pScrollBar == m_pChatGreen [ Chat::ColorType::TEXT ] )
3809+
m_pChatGreenValue [ Chat::ColorType::TEXT]->SetText ( SString("%i", iValue).c_str() );
3810+
else if ( pScrollBar == m_pChatGreen [ Chat::ColorType::INPUT_BG ] )
3811+
m_pChatGreenValue [ Chat::ColorType::INPUT_BG]->SetText ( SString("%i", iValue).c_str() );
3812+
else if ( pScrollBar == m_pChatGreen [ Chat::ColorType::INPUT_TEXT ] )
3813+
m_pChatGreenValue [ Chat::ColorType::INPUT_TEXT]->SetText ( SString("%i", iValue).c_str() );
38143814

38153815
return true;
38163816
}
@@ -3820,14 +3820,14 @@ bool CSettings::OnChatBlueChanged ( CGUIElement* pElement)
38203820
CGUIScrollBar* pScrollBar = reinterpret_cast < CGUIScrollBar* > ( pElement );
38213821
int iValue = ( (float)pScrollBar->GetScrollPosition () * 255.0f );
38223822

3823-
if ( pScrollBar == m_pChatBlue [ ChatColorTypes::CHAT_COLOR_BG ] )
3824-
m_pChatBlueValue [ ChatColorTypes::CHAT_COLOR_BG ]->SetText ( SString("%i", iValue).c_str() );
3825-
else if ( pScrollBar == m_pChatBlue [ ChatColorTypes::CHAT_COLOR_TEXT ] )
3826-
m_pChatBlueValue [ ChatColorTypes::CHAT_COLOR_TEXT]->SetText ( SString("%i", iValue).c_str() );
3827-
else if ( pScrollBar == m_pChatBlue [ ChatColorTypes::CHAT_COLOR_INPUT_BG ] )
3828-
m_pChatBlueValue [ ChatColorTypes::CHAT_COLOR_INPUT_BG]->SetText ( SString("%i", iValue).c_str() );
3829-
else if ( pScrollBar == m_pChatBlue [ ChatColorTypes::CHAT_COLOR_INPUT_TEXT ] )
3830-
m_pChatBlueValue [ ChatColorTypes::CHAT_COLOR_INPUT_TEXT]->SetText ( SString("%i", iValue).c_str() );
3823+
if ( pScrollBar == m_pChatBlue [ Chat::ColorType::BG ] )
3824+
m_pChatBlueValue [ Chat::ColorType::BG ]->SetText ( SString("%i", iValue).c_str() );
3825+
else if ( pScrollBar == m_pChatBlue [ Chat::ColorType::TEXT ] )
3826+
m_pChatBlueValue [ Chat::ColorType::TEXT]->SetText ( SString("%i", iValue).c_str() );
3827+
else if ( pScrollBar == m_pChatBlue [ Chat::ColorType::INPUT_BG ] )
3828+
m_pChatBlueValue [ Chat::ColorType::INPUT_BG]->SetText ( SString("%i", iValue).c_str() );
3829+
else if ( pScrollBar == m_pChatBlue [ Chat::ColorType::INPUT_TEXT ] )
3830+
m_pChatBlueValue [ Chat::ColorType::INPUT_TEXT]->SetText ( SString("%i", iValue).c_str() );
38313831

38323832
return true;
38333833
}
@@ -3837,14 +3837,14 @@ bool CSettings::OnChatAlphaChanged ( CGUIElement* pElement)
38373837
CGUIScrollBar* pScrollBar = reinterpret_cast < CGUIScrollBar* > ( pElement );
38383838
int iValue = ( (float)pScrollBar->GetScrollPosition () * 255.0f );
38393839

3840-
if ( pScrollBar == m_pChatAlpha [ ChatColorTypes::CHAT_COLOR_BG ] )
3841-
m_pChatAlphaValue [ ChatColorTypes::CHAT_COLOR_BG ]->SetText ( SString("%i", iValue).c_str() );
3842-
else if ( pScrollBar == m_pChatAlpha [ ChatColorTypes::CHAT_COLOR_TEXT ] )
3843-
m_pChatAlphaValue [ ChatColorTypes::CHAT_COLOR_TEXT]->SetText ( SString("%i", iValue).c_str() );
3844-
else if ( pScrollBar == m_pChatAlpha [ ChatColorTypes::CHAT_COLOR_INPUT_BG ] )
3845-
m_pChatAlphaValue [ ChatColorTypes::CHAT_COLOR_INPUT_BG]->SetText ( SString("%i", iValue).c_str() );
3846-
else if ( pScrollBar == m_pChatAlpha [ ChatColorTypes::CHAT_COLOR_INPUT_TEXT ] )
3847-
m_pChatAlphaValue [ ChatColorTypes::CHAT_COLOR_INPUT_TEXT]->SetText ( SString("%i", iValue).c_str() );
3840+
if ( pScrollBar == m_pChatAlpha [ Chat::ColorType::BG ] )
3841+
m_pChatAlphaValue [ Chat::ColorType::BG ]->SetText ( SString("%i", iValue).c_str() );
3842+
else if ( pScrollBar == m_pChatAlpha [ Chat::ColorType::TEXT ] )
3843+
m_pChatAlphaValue [ Chat::ColorType::TEXT]->SetText ( SString("%i", iValue).c_str() );
3844+
else if ( pScrollBar == m_pChatAlpha [ Chat::ColorType::INPUT_BG ] )
3845+
m_pChatAlphaValue [ Chat::ColorType::INPUT_BG]->SetText ( SString("%i", iValue).c_str() );
3846+
else if ( pScrollBar == m_pChatAlpha [ Chat::ColorType::INPUT_TEXT ] )
3847+
m_pChatAlphaValue [ Chat::ColorType::INPUT_TEXT]->SetText ( SString("%i", iValue).c_str() );
38483848

38493849
return true;
38503850
}

0 commit comments

Comments
 (0)