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:
committed by
Gymnasiast
parent
9f343abdda
commit
078ba79cb8
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user