#pragma once #include "AppLayer.h" #include "../Screens/Screen.h" #include "Widgets/Panel.h" #include #include #include "../Widgets/DebugOverlay.h" // render ui-v2 screens + animate transitions + splash screen class ScreenLayer: public AppLayer { static std::stack> screens; static std::list> pointerStreams; static std::unique_ptr overlay; static std::unique_ptr statusbar; static bool pointerDispatchActive; static bool closeRequested; static UI::Thickness safeInsets; // last queried device cutout insets static float uiScale; // window display scale for UI static void updateSafeAreaInsets(SDL_Window* window, int pixelWidth, int pixelHeight); static void updateUIScale(SDL_Window* window); static void FlushDeferredActions(); public: ScreenLayer(); static void OpenScreen(std::unique_ptr screen); static void CloseScreen(); static void SetDebugVisible(bool visible); static void SetFps(double fps); static float GetUIScale(); static void SetUIScale(float scale); bool OnDown(std::shared_ptr stream) override; virtual void OnRender() override; virtual void OnActivate() override; virtual void OnDeactivate() override; };