/***************************************************************************** * Copyright (c) 2014-2026 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 * * OpenRCT2 is licensed under the GNU General Public License version 3. *****************************************************************************/ #include #include #include #include #include #include #include #include #include #include using namespace OpenRCT2::Drawing; namespace OpenRCT2::Ui::Windows { static constexpr ScreenSize kWindowSize = { 300, 16 }; static constexpr Widget kEditorBottomToolbarWidgets[] = { makeWidget({ 0, 0 }, { 0, 0 }, WidgetType::placeholder, WindowColour::primary), }; class EditorStatusLine final : public Window { public: void onOpen() override { setWidgets(kEditorBottomToolbarWidgets); } void onPrepareDraw() override { ColourSchemeUpdateByClass( this, gLegacyScene == LegacyScene::scenarioEditor ? WindowClass::editorStepControlScenario : WindowClass::editorStepControlTrack); } void onDraw(RenderTarget& rt) override { auto colour = colours[2].withFlag(ColourFlag::translucent, false).withFlag(ColourFlag::withOutline, true); auto stringId = Editor::getStepStringId(getGameState().editorStep); drawText(rt, windowPos + ScreenCoordsXY{ width / 2, height - 12 }, stringId, { colour, TextAlignment::centre }); } }; WindowBase* editorStatusLineOpen() { auto* windowMgr = GetWindowManager(); auto* window = windowMgr->Create( WindowClass::editorStatusLine, { (ContextGetWidth() - kWindowSize.width) / 2, ContextGetHeight() - kWindowSize.height }, kWindowSize, { WindowFlag::stickToFront, WindowFlag::transparent, WindowFlag::noBackground, WindowFlag::noTitleBar }); return window; } } // namespace OpenRCT2::Ui::Windows