Files
IAEngine/Src/Editor/imp/hpp/UI/UI.hpp
Isuru Samarathunga 9d6f525b81 Fixes
2025-11-11 09:24:14 +05:30

64 lines
1.9 KiB
C++

// 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 <https://www.gnu.org/licenses/>.
#pragma once
#include <UI/Base.hpp>
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);
public:
STATIC VOID FocusAssetView();
STATIC class View_Asset *GetAssetView();
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