Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CEGUI 'modern' interface #3975

Draft
wants to merge 20 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Client/core/CClientVariables.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,7 @@ void CClientVariables::LoadDefaults()
DEFAULT("discord_rpc_share_data", false); // Consistent Rich Presence data sharing
DEFAULT("discord_rpc_share_data_firsttime", false); // Display the user data sharing consent dialog box - for the first time
DEFAULT("browser_enable_gpu", true); // Enable GPU in CEF? (allows stuff like WebGL to function)
DEFAULT("cgui_modern_interface", true); // Enable modern CGUI interface (testing for upcoming main menu revamp)

if (!Exists("locale"))
{
Expand Down
2 changes: 2 additions & 0 deletions Client/core/CCore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1020,6 +1020,8 @@ void CCore::DeinitGUI()
void CCore::InitGUI(IDirect3DDevice9* pDevice)
{
m_pGUI = InitModule<CGUI>(m_GUIModule, "GUI", "InitGUIInterface", pDevice);
m_pGUI->SetXMLParser(m_pXML);
m_pGUI->SetGraphics(m_pGraphics);
}

void CCore::CreateGUI()
Expand Down
37 changes: 37 additions & 0 deletions Client/core/CGUI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ CLocalGUI::CLocalGUI()

m_LastSettingsRevision = -1;
m_LocaleChangeCounter = 0;
CVARS_GET("cgui_modern_interface", m_ModernSkinEnabled);
}

CLocalGUI::~CLocalGUI()
Expand Down Expand Up @@ -138,6 +139,12 @@ void CLocalGUI::CreateWindows(bool bGameIsAlreadyLoaded)
{
CGUI* pGUI = CCore::GetSingleton().GetGUI();

bool modern;
CVARS_GET("cgui_modern_interface", modern);

if (modern)
pGUI->SetModernSkinEnabled(true);

// Create chatbox
m_pChat = new CChat(pGUI, CVector2D(0.0125f, 0.015f));
m_pChat->SetVisible(false, true);
Expand Down Expand Up @@ -171,6 +178,9 @@ void CLocalGUI::CreateWindows(bool bGameIsAlreadyLoaded)
// Create our news headlines if we're already ingame
if (bGameIsAlreadyLoaded)
m_pMainMenu->GetNewsBrowser()->CreateHeadlines();

if (modern)
pGUI->SetModernSkinEnabled(false);
}

void CLocalGUI::CreateObjects(IUnknown* pDevice)
Expand Down Expand Up @@ -212,6 +222,8 @@ void CLocalGUI::DestroyObjects()

void CLocalGUI::DoPulse()
{
bool didSetSkin = false;

m_pVersionUpdater->DoPulse();

CClientVariables* cvars = CCore::GetSingleton().GetCVars();
Expand All @@ -228,7 +240,10 @@ void CLocalGUI::DoPulse()
if (currentSkinName != m_LastSkinName)
{
if (!CCore::GetSingleton().GetModManager()->IsLoaded())
{
SetSkin(currentSkinName);
didSetSkin = true;
}
else
{
CCore::GetSingleton().GetConsole()->Printf("Please disconnect before changing skin");
Expand Down Expand Up @@ -273,6 +288,28 @@ void CLocalGUI::DoPulse()
}
}
}

// Check for modern skin change
bool modern;
CVARS_GET("cgui_modern_interface", modern);

if (modern != m_ModernSkinEnabled)
{
if (!CCore::GetSingleton().GetModManager()->IsLoaded())
{
m_ModernSkinEnabled = modern;

if (!didSetSkin)
{
SetSkin(m_LastSkinName);
}
}
else
{
CCore::GetSingleton().GetConsole()->Printf("Please disconnect before setting modern interface");
cvars->Set("cgui_modern_interface", m_ModernSkinEnabled);
}
}
}
}

Expand Down
1 change: 1 addition & 0 deletions Client/core/CGUI.h
Original file line number Diff line number Diff line change
Expand Up @@ -118,4 +118,5 @@ class CLocalGUI : public CSingleton<CLocalGUI>
SString m_LastSkinName;
SString m_LastLocaleName;
uint m_LocaleChangeCounter;
bool m_ModernSkinEnabled;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
bool m_ModernSkinEnabled;
bool m_ModernSkinEnabled{};

};
34 changes: 32 additions & 2 deletions Client/core/CSettings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -947,7 +947,7 @@ void CSettings::CreateGUI()

m_pLabelBrowserBlacklistAdd = reinterpret_cast<CGUILabel*>(pManager->CreateLabel(m_pEditBrowserBlacklistAdd, _("Enter a domain e.g. google.com")));
m_pLabelBrowserBlacklistAdd->SetPosition(CVector2D(10.0f, 3.0f), false);
m_pLabelBrowserBlacklistAdd->SetTextColor(0, 0, 0);
m_pLabelBrowserBlacklistAdd->SetPlaceholderColors();
m_pLabelBrowserBlacklistAdd->SetSize(CVector2D(1, 1), true);
m_pLabelBrowserBlacklistAdd->SetAlpha(0.7f);
m_pLabelBrowserBlacklistAdd->SetProperty("MousePassThroughEnabled", "True");
Expand Down Expand Up @@ -982,7 +982,7 @@ void CSettings::CreateGUI()

m_pLabelBrowserWhitelistAdd = reinterpret_cast<CGUILabel*>(pManager->CreateLabel(m_pEditBrowserWhitelistAdd, _("Enter a domain e.g. google.com")));
m_pLabelBrowserWhitelistAdd->SetPosition(CVector2D(10.0f, 3.0f), false);
m_pLabelBrowserWhitelistAdd->SetTextColor(0, 0, 0);
m_pLabelBrowserWhitelistAdd->SetPlaceholderColors();
m_pLabelBrowserWhitelistAdd->SetSize(CVector2D(1, 1), true);
m_pLabelBrowserWhitelistAdd->SetAlpha(0.7f);
m_pLabelBrowserWhitelistAdd->SetProperty("MousePassThroughEnabled", "True");
Expand Down Expand Up @@ -1272,6 +1272,7 @@ void CSettings::CreateGUI()
m_pChatLoadPreset->SetClickHandler(GUI_CALLBACK(&CSettings::OnChatLoadPresetClick, this));
m_pInterfaceLanguageSelector->SetSelectionHandler(GUI_CALLBACK(&CSettings::OnLanguageChanged, this));
m_pInterfaceSkinSelector->SetSelectionHandler(GUI_CALLBACK(&CSettings::OnSkinChanged, this));
m_pInterfaceModern->SetClickHandler(GUI_CALLBACK(&CSettings::OnModernClick, this));
m_pMapAlpha->SetOnScrollHandler(GUI_CALLBACK(&CSettings::OnMapAlphaChanged, this));
m_pAudioMasterVolume->SetOnScrollHandler(GUI_CALLBACK(&CSettings::OnMasterVolumeChanged, this));
m_pAudioRadioVolume->SetOnScrollHandler(GUI_CALLBACK(&CSettings::OnRadioVolumeChanged, this));
Expand Down Expand Up @@ -2055,6 +2056,11 @@ void CSettings::CreateInterfaceTabGUI()
// Language
pLabel = reinterpret_cast<CGUILabel*>(pManager->CreateLabel(m_pTabInterface, strLanguage));
pLabel->SetPosition(CVector2D(vecTemp.fX, vecTemp.fY + 20.0f));

m_pInterfaceModernLabel = reinterpret_cast<CGUILabel*>(pManager->CreateLabel(m_pTabInterface, _("Use modern interface")));
m_pInterfaceModernLabel->SetPosition(CVector2D(vecTemp.fX + fIndentX + fComboWidth + 35.0f, vecTemp.fY + 20.0f));
m_pInterfaceModernLabel->AutoSize();

pLabel->GetPosition(vecTemp);
pLabel->AutoSize();

Expand All @@ -2063,6 +2069,14 @@ void CSettings::CreateInterfaceTabGUI()
m_pInterfaceLanguageSelector->SetSize(CVector2D(fComboWidth, 200.0f));
m_pInterfaceLanguageSelector->SetReadOnly(true);

m_pInterfaceModern = reinterpret_cast<CGUICheckBox*>(pManager->CreateCheckBox(m_pTabInterface, ""));
m_pInterfaceModern->SetPosition(CVector2D(vecTemp.fX + fIndentX + fComboWidth + 10.0f, vecTemp.fY - 1.0f));
m_pInterfaceModern->SetSize(CVector2D(20.0f, 20.0f));

bool modern;
CVARS_GET("cgui_modern_interface", modern);
m_pInterfaceModern->SetSelected(modern);

// Grab languages and populate
for (const auto& strLocale : g_pCore->GetLocalization()->GetAvailableLocales())
{
Expand Down Expand Up @@ -3711,6 +3725,10 @@ void CSettings::SaveData()
CVARS_SET("server_can_flash_window", m_pFlashWindow->GetSelected());
CVARS_SET("allow_tray_notifications", m_pTrayBalloon->GetSelected());

// Save modern skin setting
CVARS_SET("cgui_modern_interface", m_pInterfaceModern->GetSelected());


// Set our new skin last, as it'll destroy all our GUI
pItem = m_pInterfaceSkinSelector->GetSelectedItem();
if (pItem)
Expand Down Expand Up @@ -4926,3 +4944,15 @@ bool CSettings::IsActive()
{
return m_pWindow->IsActive();
}

bool CSettings::OnModernClick(CGUIElement* pElement)
{
if (m_bIsModLoaded)
{
m_pInterfaceModern->SetSelected(!m_pInterfaceModern->GetSelected());
g_pCore->ShowMessageBox(_("Error") + _E("CC82"), _("Please disconnect before changing the modern interface"), MB_BUTTON_OK | MB_ICON_INFO);
m_pWindow->MoveToBack();
return true;
}
return true;
}
5 changes: 5 additions & 0 deletions Client/core/CSettings.h
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,9 @@ class CSettings
CGUIComboBox* m_pInterfaceSkinSelector;
CGUIButton* m_pInterfaceLoadSkin;

CGUILabel* m_pInterfaceModernLabel;
CGUICheckBox* m_pInterfaceModern;
Comment on lines +291 to +292
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
CGUILabel* m_pInterfaceModernLabel;
CGUICheckBox* m_pInterfaceModern;
CGUILabel* m_pInterfaceModernLabel{};
CGUICheckBox* m_pInterfaceModern{};


CGUIComboBox* m_pChatPresets;
CGUIButton* m_pChatLoadPreset;

Expand Down Expand Up @@ -408,6 +411,8 @@ class CSettings
bool OnTabChanged(CGUIElement* pElement);
void ReloadBrowserLists();

bool OnModernClick(CGUIElement* pElement);

private:
void CreateInterfaceTabGUI();
void UpdateChatColorPreview(eChatColorType eType);
Expand Down
4 changes: 2 additions & 2 deletions Client/core/ServerBrowser/CServerBrowser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ void CServerBrowser::CreateTab(ServerBrowserType type, const char* szName)

m_pLabelAddressDescription[type] = reinterpret_cast<CGUILabel*>(pManager->CreateLabel(m_pEditAddress[type], "Enter an address [IP:Port]"));
m_pLabelAddressDescription[type]->SetPosition(CVector2D(10, 5), false);
m_pLabelAddressDescription[type]->SetTextColor(0, 0, 0);
m_pLabelAddressDescription[type]->SetPlaceholderColors();
m_pLabelAddressDescription[type]->AutoSize(m_pLabelAddressDescription[type]->GetText().c_str());
m_pLabelAddressDescription[type]->SetAlpha(0.6f);
m_pLabelAddressDescription[type]->SetProperty("MousePassThroughEnabled", "True");
Expand Down Expand Up @@ -421,7 +421,7 @@ void CServerBrowser::CreateTab(ServerBrowserType type, const char* szName)

m_pLabelSearchDescription[type] = reinterpret_cast<CGUILabel*>(pManager->CreateLabel(m_pEditSearch[type], _("Search servers...")));
m_pLabelSearchDescription[type]->SetPosition(CVector2D(10, 3), false);
m_pLabelSearchDescription[type]->SetTextColor(0, 0, 0);
m_pLabelSearchDescription[type]->SetPlaceholderColors();
m_pLabelSearchDescription[type]->SetSize(CVector2D(1, 1), true);
m_pLabelSearchDescription[type]->SetAlpha(0.6f);
m_pLabelSearchDescription[type]->SetProperty("MousePassThroughEnabled", "True");
Expand Down
2 changes: 1 addition & 1 deletion Client/gui/CGUIButton_Impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ CGUIButton_Impl::CGUIButton_Impl(CGUI_Impl* pGUI, CGUIElement* pParent, const ch
pGUI->GetUniqueName(szUnique);

// Create the window and set default settings
m_pWindow = pGUI->GetWindowManager()->createWindow(CGUIBUTTON_NAME, szUnique);
m_pWindow = pGUI->GetWindowManager()->createWindow(pGUI->ResolveModernName(CGUIBUTTON_NAME), szUnique);
m_pWindow->setDestroyedByParent(false);

m_pWindow->setText(CGUI_Impl::GetUTFString(szCaption));
Expand Down
2 changes: 1 addition & 1 deletion Client/gui/CGUICheckBox_Impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ CGUICheckBox_Impl::CGUICheckBox_Impl(CGUI_Impl* pGUI, CGUIElement* pParent, cons
pGUI->GetUniqueName(szUnique);

// Create the window and set default settings
m_pWindow = pGUI->GetWindowManager()->createWindow(CGUICHECKBOX_NAME, szUnique);
m_pWindow = pGUI->GetWindowManager()->createWindow(pGUI->ResolveModernName(CGUICHECKBOX_NAME), szUnique);
m_pWindow->setDestroyedByParent(false);

m_pWindow->setText(CGUI_Impl::GetUTFString(szCaption));
Expand Down
2 changes: 1 addition & 1 deletion Client/gui/CGUIComboBox_Impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ CGUIComboBox_Impl::CGUIComboBox_Impl(CGUI_Impl* pGUI, CGUIElement* pParent, cons
pGUI->GetUniqueName(szUnique);

// Create the window and set default settings
m_pWindow = pGUI->GetWindowManager()->createWindow(CGUICOMBOBOX_NAME, szUnique);
m_pWindow = pGUI->GetWindowManager()->createWindow(pGUI->ResolveModernName(CGUICOMBOBOX_NAME), szUnique);
m_pWindow->setDestroyedByParent(false);

// This needs a better alternative, so changing comboBox will change this - Jyrno42
Expand Down
2 changes: 1 addition & 1 deletion Client/gui/CGUIEdit_Impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ CGUIEdit_Impl::CGUIEdit_Impl(CGUI_Impl* pGUI, CGUIElement* pParent, const char*
pGUI->GetUniqueName(szUnique);

// Create the edit and set default settings
m_pWindow = pGUI->GetWindowManager()->createWindow(CGUIEDIT_NAME, szUnique);
m_pWindow = pGUI->GetWindowManager()->createWindow(pGUI->ResolveModernName(CGUIEDIT_NAME), szUnique);
m_pWindow->setDestroyedByParent(false);
m_pWindow->setRect(CEGUI::Absolute, CEGUI::Rect(0.00f, 0.00f, 0.128f, 0.24f));

Expand Down
4 changes: 2 additions & 2 deletions Client/gui/CGUIGridList_Impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ CGUIGridList_Impl::CGUIGridList_Impl(CGUI_Impl* pGUI, CGUIElement* pParent, bool

// Create the window and set default settings
if (bFrame)
m_pWindow = pGUI->GetWindowManager()->createWindow(CGUIGRIDLIST_NAME, szUnique);
m_pWindow = pGUI->GetWindowManager()->createWindow(pGUI->ResolveModernName(CGUIGRIDLIST_NAME), szUnique);
else
m_pWindow = pGUI->GetWindowManager()->createWindow(CGUIGRIDLISTNOFRAME_NAME, szUnique);
m_pWindow = pGUI->GetWindowManager()->createWindow(pGUI->ResolveModernName(CGUIGRIDLISTNOFRAME_NAME), szUnique);

m_pWindow->setDestroyedByParent(false);
m_pWindow->setRect(CEGUI::Relative, CEGUI::Rect(0.00f, 0.00f, 0.40f, 0.40f));
Expand Down
26 changes: 25 additions & 1 deletion Client/gui/CGUILabel_Impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ CGUILabel_Impl::CGUILabel_Impl(CGUI_Impl* pGUI, CGUIElement* pParent, const char
pGUI->GetUniqueName(szUnique);

// Create the window and set default settings
m_pWindow = pGUI->GetWindowManager()->createWindow(CGUILABEL_NAME, szUnique);
m_pWindow = pGUI->GetWindowManager()->createWindow(pGUI->ResolveModernName(CGUILABEL_NAME), szUnique);
m_pWindow->setDestroyedByParent(false);

// Store the pointer to this CGUI element in the CEGUI element
Expand Down Expand Up @@ -164,3 +164,27 @@ float CGUILabel_Impl::GetTextExtent()

return 0.0f;
}

void CGUILabel_Impl::InvertTextColor()
{
auto& color = GetTextColor();
SetTextColor(255 - color.R, 255 - color.G, 255 - color.B);
}

void CGUILabel_Impl::SetPlaceholderColors()
{
auto* text = reinterpret_cast<CEGUI::StaticText*>(m_pWindow);

if (!text->isPropertyPresent("PlaceholderTextColours"))
{
InvertTextColor();
return;
}

auto& prop = text->getProperty("PlaceholderTextColours");

unsigned int color = 0;
const char* buffer = prop.c_str();
sscanf(buffer, "tl:%x tr:%x bl:%x br:%x", &color, &color, &color, &color);
SetTextColor(color >> 16, (color >> 8) & 0xFF, color & 0xFF);
}
4 changes: 4 additions & 0 deletions Client/gui/CGUILabel_Impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,11 @@ class CGUILabel_Impl : public CGUILabel, public CGUIElement_Impl

eCGUIType GetType() { return CGUI_LABEL; };

void InvertTextColor();
void SetPlaceholderColors();

#define EXCLUDE_SET_TEXT
#include "CGUIElement_Inc.h"
#undef EXCLUDE_SET_TEXT

};
4 changes: 3 additions & 1 deletion Client/gui/CGUIListItem_Impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@

#include "StdInc.h"

extern CGUI_Impl* g_pGUI;

CGUIListItem_Impl::CGUIListItem_Impl(const char* szText, unsigned int uiType, CGUIStaticImage_Impl* pImage)
{
ItemType = uiType;
Expand All @@ -33,7 +35,7 @@ CGUIListItem_Impl::CGUIListItem_Impl(const char* szText, unsigned int uiType, CG
{
// Set flags and properties
m_pListItem->setAutoDeleted(false);
m_pListItem->setSelectionBrushImage("CGUI-Images", "ListboxSelectionBrush");
m_pListItem->setSelectionBrushImage("CGUI-Images", g_pGUI->ResolveModernName("ListboxSelectionBrush"));
}

m_pData = NULL;
Expand Down
2 changes: 1 addition & 1 deletion Client/gui/CGUIMemo_Impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ CGUIMemo_Impl::CGUIMemo_Impl(CGUI_Impl* pGUI, CGUIElement* pParent, const char*
pGUI->GetUniqueName(szUnique);

// Create the window and set default settings
m_pWindow = pGUI->GetWindowManager()->createWindow(CGUIMEMO_NAME, szUnique);
m_pWindow = pGUI->GetWindowManager()->createWindow(pGUI->ResolveModernName(CGUIMEMO_NAME), szUnique);
m_pWindow->setDestroyedByParent(false);

// Store the pointer to this CGUI element in the CEGUI element
Expand Down
2 changes: 1 addition & 1 deletion Client/gui/CGUIProgressBar_Impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ CGUIProgressBar_Impl::CGUIProgressBar_Impl(CGUI_Impl* pGUI, CGUIElement* pParent
pGUI->GetUniqueName(szUnique);

// Create the window and set default settings
m_pWindow = pGUI->GetWindowManager()->createWindow(CGUILABEL_NAME, szUnique);
m_pWindow = pGUI->GetWindowManager()->createWindow(pGUI->ResolveModernName(CGUILABEL_NAME), szUnique);
m_pWindow->setDestroyedByParent(false);

// Store the pointer to this CGUI element in the CEGUI element
Expand Down
2 changes: 1 addition & 1 deletion Client/gui/CGUIRadioButton_Impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ CGUIRadioButton_Impl::CGUIRadioButton_Impl(CGUI_Impl* pGUI, CGUIElement* pParent
pGUI->GetUniqueName(szUnique);

// Create the window and set default settings
m_pWindow = pGUI->GetWindowManager()->createWindow(CGUIRADIOBUTTON_NAME, szUnique);
m_pWindow = pGUI->GetWindowManager()->createWindow(pGUI->ResolveModernName(CGUIRADIOBUTTON_NAME), szUnique);
m_pWindow->setDestroyedByParent(false);

m_pWindow->setText(CGUI_Impl::GetUTFString(szCaption));
Expand Down
2 changes: 1 addition & 1 deletion Client/gui/CGUIScrollBar_Impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ CGUIScrollBar_Impl::CGUIScrollBar_Impl(CGUI_Impl* pGUI, bool bHorizontal, CGUIEl
pGUI->GetUniqueName(szUnique);

// Create the window and set default settings
m_pWindow = pGUI->GetWindowManager()->createWindow(bHorizontal ? CGUISCROLLBAR_HORIZONTAL_NAME : CGUISCROLLBAR_VERTICAL_NAME, szUnique);
m_pWindow = pGUI->GetWindowManager()->createWindow(pGUI->ResolveModernName(bHorizontal ? CGUISCROLLBAR_HORIZONTAL_NAME : CGUISCROLLBAR_VERTICAL_NAME), szUnique);
m_pWindow->setDestroyedByParent(false);

// Store the pointer to this CGUI element in the CEGUI element
Expand Down
2 changes: 1 addition & 1 deletion Client/gui/CGUIScrollPane_Impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ CGUIScrollPane_Impl::CGUIScrollPane_Impl(CGUI_Impl* pGUI, CGUIElement* pParent)
pGUI->GetUniqueName(szUnique);

// Create the window and set default settings
m_pWindow = pGUI->GetWindowManager()->createWindow(CGUISCROLLPANE_NAME, szUnique);
m_pWindow = pGUI->GetWindowManager()->createWindow(pGUI->ResolveModernName(CGUISCROLLPANE_NAME), szUnique);
m_pWindow->setDestroyedByParent(false);
m_pWindow->setRect(CEGUI::Relative, CEGUI::Rect(0.9f, 0.9f, 0.9f, 0.9f));

Expand Down
2 changes: 1 addition & 1 deletion Client/gui/CGUIStaticImage_Impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ CGUIStaticImage_Impl::CGUIStaticImage_Impl(CGUI_Impl* pGUI, CGUIElement* pParent
pGUI->GetUniqueName(szUnique);

// Create the control and set default properties
m_pWindow = pGUI->GetWindowManager()->createWindow(CGUISTATICIMAGE_NAME, szUnique);
m_pWindow = pGUI->GetWindowManager()->createWindow(pGUI->ResolveModernName(CGUISTATICIMAGE_NAME), szUnique);
m_pWindow->setDestroyedByParent(false);
m_pWindow->setRect(CEGUI::Relative, CEGUI::Rect(0.0f, 0.0f, 1.0f, 1.0f));
reinterpret_cast<CEGUI::StaticImage*>(m_pWindow)->setBackgroundEnabled(false);
Expand Down
2 changes: 1 addition & 1 deletion Client/gui/CGUITabPanel_Impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ CGUITabPanel_Impl::CGUITabPanel_Impl(CGUI_Impl* pGUI, CGUIElement* pParent)
pGUI->GetUniqueName(szUnique);

// Create the window and set default settings
m_pWindow = pGUI->GetWindowManager()->createWindow(CGUITABPANEL_NAME, szUnique);
m_pWindow = pGUI->GetWindowManager()->createWindow(pGUI->ResolveModernName(CGUITABPANEL_NAME), szUnique);
m_pWindow->setDestroyedByParent(false);
m_pWindow->setRect(CEGUI::Relative, CEGUI::Rect(0.9f, 0.9f, 0.9f, 0.9f));
reinterpret_cast<CEGUI::TabControl*>(m_pWindow)->setAbsoluteTabTextPadding(10.0f);
Expand Down
Loading
Loading