// IAEngine: 2D Game Engine by IA // Copyright (C) 2025 IASoft (PVT) LTD (oss@iasoft.dev) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . #pragma once #include namespace ia::iae { class UI { public: STATIC VOID PadX(IN FLOAT32 v = 5.0f); STATIC VOID PadY(IN FLOAT32 v = 5.0f); STATIC VOID AlignCursorLeft(IN CONST ImRect &rect); STATIC VOID AlignCursorRight(IN CONST ImRect &rect, IN FLOAT32 width); STATIC VOID AlignCursorTop(IN CONST ImRect &rect); STATIC VOID AlignCursorBottom(IN CONST ImRect &rect, IN FLOAT32 height); STATIC VOID AlignCursorHCenter(IN CONST ImRect &rect, IN FLOAT32 width); STATIC VOID AlignCursorVCenter(IN CONST ImRect &rect, IN FLOAT32 height); STATIC VOID DrawTextCentered(IN CONST ImVec2& viewExtent, IN CONST String& text); public: STATIC VOID OpenFilePreviewView(); STATIC VOID CloseFilePreviewView(); STATIC VOID OpenAssetView(); STATIC VOID CloseAssetView(); STATIC class View_Asset* GetAssetView(); STATIC class View_FilePreview *GetFilePreviewView(); STATIC class IView *GetFocusedView() { return s_focusedView; } private: STATIC class IView *s_focusedView; private: STATIC VOID Initialize(); STATIC VOID Terminate(); STATIC VOID Draw(); STATIC VOID Update(); STATIC VOID ProcessEvent(IN SDL_Event *event); friend class Editor; private: STATIC VOID DrawMenuBar(); }; } // namespace ia::iae