Something went wrong. Try again.
art software for the rest of us
drawing paint image sdl art
Something went wrong. Try again.
C
12345678910111213141516171819202122232425262728293031323334353637383940#pragma once
#include "AppLayer.h"#include "../Screens/Screen.h"#include "Widgets/Panel.h"#include <stack>#include <list>
#include "../Widgets/DebugOverlay.h"
// render ui-v2 screens + animate transitions + splash screenclass ScreenLayer: public AppLayer { static std::stack<std::unique_ptr<Screen>> screens; static std::list<std::shared_ptr<PointerStream>> pointerStreams; static std::unique_ptr<DebugOverlay> overlay; static std::unique_ptr<UI::Panel> 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> 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<PointerStream> stream) override;
virtual void OnRender() override; virtual void OnActivate() override; virtual void OnDeactivate() override;};