Skip to content

Commit

Permalink
Change displaying prompt and fit with Phobos-developers#1477
Browse files Browse the repository at this point in the history
  • Loading branch information
CrimRecya committed Feb 5, 2025
1 parent 32c59fe commit 88a6c20
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/Commands/AutoBuilding.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ const wchar_t* AutoBuildingCommandClass::GetUIDescription() const
void AutoBuildingCommandClass::Execute(WWKey eInput) const
{
Phobos::Config::AutoBuilding_Enable = !Phobos::Config::AutoBuilding_Enable;
const int tabIndex = SidebarClass::Instance->ActiveTabIndex;

MessageListClass::Instance->PrintMessage(
Phobos::Config::AutoBuilding_Enable ? L"Auto Building Switch On." : L"Auto Building Switch Off.",
150,
HouseClass::CurrentPlayer->ColorSchemeIndex,
true
);
if (!tabIndex || tabIndex == 1)
{
SidebarClass::Instance->SidebarBackgroundNeedsRedraw = true;
SidebarClass::Instance->RepaintSidebar(tabIndex);
}
}

0 comments on commit 88a6c20

Please sign in to comment.