1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-15 11:03:00 +01:00

Introduce WF_NO_TITLE_BAR and apply to windows

This commit is contained in:
Michael Steenbeek
2025-02-24 18:03:00 +01:00
committed by Gymnasiast
parent 9f343abdda
commit 078ba79cb8
14 changed files with 18 additions and 13 deletions

View File

@@ -157,7 +157,7 @@ namespace OpenRCT2::Ui::Windows
auto* windowMgr = GetWindowManager();
auto* window = windowMgr->FocusOrCreate<DebugPaintWindow>(
WindowClass::DebugPaint, { 16, ContextGetHeight() - 16 - 33 - WINDOW_HEIGHT }, WINDOW_WIDTH, WINDOW_HEIGHT,
WF_STICK_TO_FRONT | WF_TRANSPARENT);
WF_STICK_TO_FRONT | WF_TRANSPARENT | WF_NO_TITLE_BAR);
return window;
}

View File

@@ -363,7 +363,8 @@ namespace OpenRCT2::Ui::Windows
// Create the window (width/height position are set later)
auto* windowMgr = GetWindowManager();
auto* w = windowMgr->Create<DropdownWindow>(WindowClass::Dropdown, width, customItemHeight, WF_STICK_TO_FRONT);
auto* w = windowMgr->Create<DropdownWindow>(
WindowClass::Dropdown, width, customItemHeight, WF_STICK_TO_FRONT | WF_NO_TITLE_BAR);
if (w != nullptr)
{
auto numRowsPerColumn = prefRowsPerColumn > 0 ? static_cast<int32_t>(prefRowsPerColumn) : Dropdown::kItemsMaxSize;

View File

@@ -399,7 +399,7 @@ namespace OpenRCT2::Ui::Windows
auto* windowMgr = GetWindowManager();
auto* window = windowMgr->Create<EditorBottomToolbarWindow>(
WindowClass::BottomToolbar, ScreenCoordsXY(0, ContextGetHeight() - 32), ContextGetWidth(), 32,
WF_STICK_TO_FRONT | WF_TRANSPARENT | WF_NO_BACKGROUND);
WF_STICK_TO_FRONT | WF_TRANSPARENT | WF_NO_BACKGROUND | WF_NO_TITLE_BAR);
return window;
}

View File

@@ -142,7 +142,8 @@ namespace OpenRCT2::Ui::Windows
auto errorWindow = std::make_unique<ErrorWindow>(std::move(buffer), numLines, autoClose);
return windowMgr->Create(
std::move(errorWindow), WindowClass::Error, windowPosition, width, height, WF_STICK_TO_FRONT | WF_TRANSPARENT);
std::move(errorWindow), WindowClass::Error, windowPosition, width, height,
WF_STICK_TO_FRONT | WF_TRANSPARENT | WF_NO_TITLE_BAR);
}
WindowBase* ErrorOpen(StringId title, StringId message, const Formatter& args, bool autoClose)

View File

@@ -693,7 +693,7 @@ namespace OpenRCT2::Ui::Windows
auto* windowMgr = GetWindowManager();
auto* window = windowMgr->Create<GameBottomToolbar>(
WindowClass::BottomToolbar, ScreenCoordsXY(0, screenHeight - toolbar_height), screenWidth, toolbar_height,
WF_STICK_TO_FRONT | WF_TRANSPARENT | WF_NO_BACKGROUND);
WF_STICK_TO_FRONT | WF_TRANSPARENT | WF_NO_BACKGROUND | WF_NO_TITLE_BAR);
return window;
}

View File

@@ -78,6 +78,6 @@ namespace OpenRCT2::Ui::Windows
{
auto* windowMgr = GetWindowManager();
return windowMgr->Create<MainWindow>(
WindowClass::MainWindow, { 0, 0 }, ContextGetWidth(), ContextGetHeight(), WF_STICK_TO_BACK);
WindowClass::MainWindow, { 0, 0 }, ContextGetWidth(), ContextGetHeight(), WF_STICK_TO_BACK | WF_NO_TITLE_BAR);
}
} // namespace OpenRCT2::Ui::Windows

View File

@@ -58,6 +58,6 @@ namespace OpenRCT2::Ui::Windows
auto* windowMgr = GetWindowManager();
return windowMgr->Create<TitleExitWindow>(
WindowClass::TitleExit, ScreenCoordsXY(ContextGetWidth() - 40, ContextGetHeight() - 64), 40, 64,
WF_STICK_TO_BACK | WF_TRANSPARENT);
WF_STICK_TO_BACK | WF_TRANSPARENT | WF_NO_TITLE_BAR);
}
} // namespace OpenRCT2::Ui::Windows

View File

@@ -73,7 +73,7 @@ namespace OpenRCT2::Ui::Windows
if (window == nullptr)
{
window = windowMgr->Create<TitleLogoWindow>(
WindowClass::TitleLogo, ScreenCoordsXY(0, 0), WW, WH, WF_STICK_TO_BACK | WF_TRANSPARENT);
WindowClass::TitleLogo, ScreenCoordsXY(0, 0), WW, WH, WF_STICK_TO_BACK | WF_TRANSPARENT | WF_NO_TITLE_BAR);
}
return window;
}

View File

@@ -290,6 +290,6 @@ namespace OpenRCT2::Ui::Windows
auto* windowMgr = GetWindowManager();
return windowMgr->Create<TitleMenuWindow>(
WindowClass::TitleMenu, ScreenCoordsXY(0, ContextGetHeight() - 182), 0, windowHeight,
WF_STICK_TO_BACK | WF_TRANSPARENT | WF_NO_BACKGROUND);
WF_STICK_TO_BACK | WF_TRANSPARENT | WF_NO_BACKGROUND | WF_NO_TITLE_BAR);
}
} // namespace OpenRCT2::Ui::Windows

View File

@@ -59,7 +59,7 @@ namespace OpenRCT2::Ui::Windows
{
window = windowMgr->Create<TitleOptionsWindow>(
WindowClass::TitleOptions, ScreenCoordsXY(ContextGetWidth() - 80, 0), 80, 15,
WF_STICK_TO_BACK | WF_TRANSPARENT);
WF_STICK_TO_BACK | WF_TRANSPARENT | WF_NO_TITLE_BAR);
}
return window;

View File

@@ -46,7 +46,7 @@ namespace OpenRCT2::Ui::Windows
{
window = windowMgr->Create<TitleVersionWindow>(
WindowClass::TitleVersion, ScreenCoordsXY(kTextOffset, ContextGetHeight() - 30), WW, WH,
WF_STICK_TO_BACK | WF_TRANSPARENT);
WF_STICK_TO_BACK | WF_TRANSPARENT | WF_NO_TITLE_BAR);
}
return window;
}

View File

@@ -162,7 +162,8 @@ namespace OpenRCT2::Ui::Windows
auto* windowMgr = GetWindowManager();
windowMgr->Create(
std::move(tooltipWindow), WindowClass::Tooltip, windowPos, width, height, WF_TRANSPARENT | WF_STICK_TO_FRONT);
std::move(tooltipWindow), WindowClass::Tooltip, windowPos, width, height,
WF_TRANSPARENT | WF_STICK_TO_FRONT | WF_NO_TITLE_BAR);
}
void WindowTooltipOpen(WindowBase* widgetWindow, WidgetIndex widgetIndex, const ScreenCoordsXY& screenCoords)

View File

@@ -1015,7 +1015,7 @@ namespace OpenRCT2::Ui::Windows
auto* windowMgr = GetWindowManager();
auto* window = windowMgr->Create<TopToolbar>(
WindowClass::TopToolbar, ScreenCoordsXY(0, 0), ContextGetWidth(), kTopToolbarHeight + 1,
WF_STICK_TO_FRONT | WF_TRANSPARENT | WF_NO_BACKGROUND);
WF_STICK_TO_FRONT | WF_TRANSPARENT | WF_NO_BACKGROUND | WF_NO_TITLE_BAR);
window->SetWidgets(_topToolbarWidgets);

View File

@@ -96,6 +96,8 @@ namespace OpenRCT2
// Create only flags
WF_AUTO_POSITION = (1 << 16),
WF_CENTRE_SCREEN = (1 << 17),
WF_NO_TITLE_BAR = (1 << 18),
};
enum