diff --git a/Source/Client/Mode/GameModeHandlers.cpp b/Source/Client/Mode/GameModeHandlers.cpp index c6b098fca..81faca6c9 100644 --- a/Source/Client/Mode/GameModeHandlers.cpp +++ b/Source/Client/Mode/GameModeHandlers.cpp @@ -2204,8 +2204,11 @@ void CGameMode::ReceiveAchievementUpdate( const std::string text = FormatOwnedString(LookupMessage(MSI_NOTICE_NEXT_ROULLETE_STAGE), info.title.c_str()); static_cast(this->achievementBalloon)->WrapText(text.c_str(), 72); static_cast(this->achievementBalloon)->m_fontHeight = 20; - static_cast(this->achievementBalloon)->m_textColor = 0xFFFFFF; - static_cast(this->achievementBalloon)->m_outlineColor = 0; + { + UIBalloonText* balloon = static_cast(this->achievementBalloon); + balloon->m_textColor = 0xFFFFFF; + balloon->m_outlineColor = 0; + } this->achievementBalloon->Move(0, 50); g_effectMgr->Spawn(g_session.m_aid, 0x446, vector3d{0.0f, 0.0f, 0.0f}, 0, -1, 0, 0); if (UIWindow* window = g_windowMgr.LookupWindow(WID_MENUICONWND)) { diff --git a/Source/UI/GameSettings/UIBattleMsgOptionWnd.cpp b/Source/UI/GameSettings/UIBattleMsgOptionWnd.cpp index 4dc3c25b4..f3c330fc5 100644 --- a/Source/UI/GameSettings/UIBattleMsgOptionWnd.cpp +++ b/Source/UI/GameSettings/UIBattleMsgOptionWnd.cpp @@ -276,8 +276,11 @@ int UIBattleMsgOptionWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a this->allChecked = 0; } } - this->m_allCheckBox->geometry.state = this->allChecked; - this->m_allCheckBox->Invalidate(); + { + auto* allCheckBox = this->m_allCheckBox; + allCheckBox->geometry.state = this->allChecked; + allCheckBox->Invalidate(); + } this->text = info.name; this->text += LookupMessage(MSI_SET_CHATINFO); this->Invalidate(); diff --git a/Source/UI/GameSettings/UIHotKeyWnd.cpp b/Source/UI/GameSettings/UIHotKeyWnd.cpp index a6aba0557..bddac139a 100644 --- a/Source/UI/GameSettings/UIHotKeyWnd.cpp +++ b/Source/UI/GameSettings/UIHotKeyWnd.cpp @@ -265,8 +265,11 @@ void UIHotKeyWnd::OnLBtnDown(int x, int y) { this->ToScreen(screenX, screenY); const char* text = LookupMessage(MSI_HOTKEYWND_NOTICE1); this->m_balloon->SetText(text, 0x3C); - this->m_balloon->m_textColor = 0xFFFFFF; - this->m_balloon->m_outlineColor = 0; + { + UIBalloonText* balloon = this->m_balloon; + balloon->m_textColor = 0xFFFFFF; + balloon->m_outlineColor = 0; + } this->m_balloon->Move( (this->geometry.width - this->m_balloon->geometry.width) / 2 + screenX, (this->m_selectedRow % this->m_rowsPerPage - 1) * this->m_rowHeight + this->m_verticalMargin + this->m_tabHeight + screenY + this->m_titleHeight @@ -539,8 +542,11 @@ bool UIHotKeyWnd::AssignSelectedHotkey(int mode) { const int balloonY = (this->m_selectedRow % this->m_rowsPerPage - 1) * this->m_rowHeight + this->m_verticalMargin + this->m_tabHeight + this->m_titleHeight; this->m_balloon->SetText(LookupMessage(MSI_HOTKEYWND_NOTICE1), 0x3C); - this->m_balloon->m_textColor = 0xFFFFFF; - this->m_balloon->m_outlineColor = 0; + { + UIBalloonText* balloon = this->m_balloon; + balloon->m_textColor = 0xFFFFFF; + balloon->m_outlineColor = 0; + } this->m_balloon->Move((this->geometry.width - this->m_balloon->geometry.width) / 2 + screenX, screenY + balloonY); this->Invalidate(); @@ -612,8 +618,11 @@ bool UIHotKeyWnd::AssignSelectedHotkey(int mode) { } this->m_balloon->SetText(LookupMessage(rejection), 0x3C); - this->m_balloon->m_textColor = 0xFFFF; - this->m_balloon->m_outlineColor = 0; + { + UIBalloonText* balloon = this->m_balloon; + balloon->m_textColor = 0xFFFF; + balloon->m_outlineColor = 0; + } this->m_balloon->Move((this->geometry.width - this->m_balloon->geometry.width) / 2 + screenX, screenY + balloonY); this->Invalidate(); return false; diff --git a/Source/UI/RuneSystem/UIRuneSystemWnd.cpp b/Source/UI/RuneSystem/UIRuneSystemWnd.cpp index 478f70edc..faf6f16a8 100644 --- a/Source/UI/RuneSystem/UIRuneSystemWnd.cpp +++ b/Source/UI/RuneSystem/UIRuneSystemWnd.cpp @@ -2216,8 +2216,11 @@ int UIRuneSystemWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argume return 0; } case 0xA9: - this->m_tab->geometry.state = argument1; - this->m_tab->Invalidate(); + { + auto* tab = this->m_tab; + tab->geometry.state = argument1; + tab->Invalidate(); + } this->SelectTab(); switch (argument1) { case 0: