Fixes
This commit is contained in:
31
Src/Editor/imp/hpp/UI/Base.hpp
Normal file
31
Src/Editor/imp/hpp/UI/Base.hpp
Normal file
@ -0,0 +1,31 @@
|
||||
// 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 <Base.hpp>
|
||||
|
||||
namespace ia::iae
|
||||
{
|
||||
STATIC CONSTEXPR IVec2 SCENE_EDITOR_RESOULTION = {800, 604};
|
||||
|
||||
STATIC CONSTEXPR Vec2 LAYOUT_TOP_LEFT_VIEW_EXTENT = {0.275f, 0.55f};
|
||||
STATIC CONSTEXPR Vec2 LAYOUT_TOP_MIDDLE_VIEW_EXTENT = {0.45f, 0.55f};
|
||||
STATIC CONSTEXPR Vec2 LAYOUT_TOP_RIGHT_VIEW_EXTENT = {0.275f, 0.55f};
|
||||
STATIC CONSTEXPR Vec2 LAYOUT_BOTTOM_VIEW_EXTENT = {1.0f, 0.45f};
|
||||
|
||||
STATIC CONSTEXPR FLOAT32 MENUBAR_HEIGHT = 18.0f;
|
||||
} // namespace ia::iae
|
||||
0
Src/Editor/imp/hpp/UI/Popup.hpp
Normal file
0
Src/Editor/imp/hpp/UI/Popup.hpp
Normal file
32
Src/Editor/imp/hpp/UI/UI.hpp
Normal file
32
Src/Editor/imp/hpp/UI/UI.hpp
Normal file
@ -0,0 +1,32 @@
|
||||
// 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 Initialize();
|
||||
STATIC VOID Terminate();
|
||||
|
||||
STATIC VOID Update();
|
||||
STATIC VOID Draw();
|
||||
};
|
||||
}
|
||||
30
Src/Editor/imp/hpp/UI/View/Asset.hpp
Normal file
30
Src/Editor/imp/hpp/UI/View/Asset.hpp
Normal file
@ -0,0 +1,30 @@
|
||||
// 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/View/IView.hpp>
|
||||
|
||||
namespace ia::iae
|
||||
{
|
||||
class View_Asset : public IView
|
||||
{
|
||||
public:
|
||||
VOID Initialize();
|
||||
VOID Terminate();
|
||||
VOID Render();
|
||||
};
|
||||
}
|
||||
55
Src/Editor/imp/hpp/UI/View/AssetBrowser.hpp
Normal file
55
Src/Editor/imp/hpp/UI/View/AssetBrowser.hpp
Normal file
@ -0,0 +1,55 @@
|
||||
// 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/View/IView.hpp>
|
||||
|
||||
#include <filesystem>
|
||||
|
||||
namespace ia::iae
|
||||
{
|
||||
class View_AssetBrowser : public IView
|
||||
{
|
||||
struct FileEntry
|
||||
{
|
||||
PCCHAR Icon{""};
|
||||
String Name{};
|
||||
BOOL IsDirectory{};
|
||||
String IconAndName{};
|
||||
std::filesystem::path Path{};
|
||||
};
|
||||
|
||||
public:
|
||||
VOID Initialize();
|
||||
VOID Terminate();
|
||||
VOID Render();
|
||||
|
||||
private:
|
||||
VOID ChangeCurrentOpenDirectory(IN CONST std::filesystem::path &path);
|
||||
VOID FillFileEntries(IN CONST std::filesystem::path &path, IN Vector<FileEntry> &fileEntries);
|
||||
|
||||
PCCHAR GetFileEntryIcon(IN PCCHAR extension);
|
||||
|
||||
VOID OpenAsset(IN CONST std::filesystem::path &path);
|
||||
|
||||
private:
|
||||
Vector<FileEntry> m_assetDirectoryFiles;
|
||||
std::filesystem::path m_assetDirectoryPath{};
|
||||
Vector<FileEntry> m_currentOpenDirectoryFiles;
|
||||
std::filesystem::path m_currentOpenDirectoryPath{};
|
||||
};
|
||||
} // namespace ia::iae::editor
|
||||
30
Src/Editor/imp/hpp/UI/View/Console.hpp
Normal file
30
Src/Editor/imp/hpp/UI/View/Console.hpp
Normal file
@ -0,0 +1,30 @@
|
||||
// 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/View/IView.hpp>
|
||||
|
||||
namespace ia::iae
|
||||
{
|
||||
class View_Console : public IView
|
||||
{
|
||||
public:
|
||||
VOID Initialize();
|
||||
VOID Terminate();
|
||||
VOID Render();
|
||||
};
|
||||
}
|
||||
79
Src/Editor/imp/hpp/UI/View/IView.hpp
Normal file
79
Src/Editor/imp/hpp/UI/View/IView.hpp
Normal file
@ -0,0 +1,79 @@
|
||||
// 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 IView
|
||||
{
|
||||
public:
|
||||
PURE_VIRTUAL(VOID Initialize());
|
||||
PURE_VIRTUAL(VOID Terminate());
|
||||
PURE_VIRTUAL(VOID Render());
|
||||
|
||||
public:
|
||||
VOID SetIcon(IN PCCHAR icon)
|
||||
{
|
||||
m_icon = icon;
|
||||
m_iconAndName = BuildString(m_icon, " ", m_name);
|
||||
}
|
||||
|
||||
VOID SetName(IN CONST String &name)
|
||||
{
|
||||
m_name = name;
|
||||
m_iconAndName = m_icon ? BuildString(m_icon, " ", m_name) : m_name;
|
||||
}
|
||||
|
||||
public:
|
||||
CONST String &Name() CONST
|
||||
{
|
||||
return m_name;
|
||||
}
|
||||
|
||||
CONST PCCHAR Icon() CONST
|
||||
{
|
||||
return m_icon;
|
||||
}
|
||||
|
||||
CONST String &IconAndName() CONST
|
||||
{
|
||||
return m_iconAndName;
|
||||
}
|
||||
|
||||
protected:
|
||||
INLINE VOID PreRender();
|
||||
INLINE VOID PostRender();
|
||||
|
||||
protected:
|
||||
ImVec2 m_extent{};
|
||||
|
||||
String m_name{};
|
||||
PCCHAR m_icon{};
|
||||
String m_iconAndName{};
|
||||
};
|
||||
|
||||
VOID IView::PreRender()
|
||||
{
|
||||
m_extent = ImGui::GetWindowSize();
|
||||
}
|
||||
|
||||
VOID IView::PostRender()
|
||||
{
|
||||
}
|
||||
} // namespace ia::iae
|
||||
30
Src/Editor/imp/hpp/UI/View/Main.hpp
Normal file
30
Src/Editor/imp/hpp/UI/View/Main.hpp
Normal file
@ -0,0 +1,30 @@
|
||||
// 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/View/IView.hpp>
|
||||
|
||||
namespace ia::iae
|
||||
{
|
||||
class View_Main : public IView
|
||||
{
|
||||
public:
|
||||
VOID Initialize();
|
||||
VOID Terminate();
|
||||
VOID Render();
|
||||
};
|
||||
} // namespace ia::iae
|
||||
30
Src/Editor/imp/hpp/UI/View/Nodes.hpp
Normal file
30
Src/Editor/imp/hpp/UI/View/Nodes.hpp
Normal file
@ -0,0 +1,30 @@
|
||||
// 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/View/IView.hpp>
|
||||
|
||||
namespace ia::iae
|
||||
{
|
||||
class View_Nodes : public IView
|
||||
{
|
||||
public:
|
||||
VOID Initialize();
|
||||
VOID Terminate();
|
||||
VOID Render();
|
||||
};
|
||||
}
|
||||
30
Src/Editor/imp/hpp/UI/View/Package.hpp
Normal file
30
Src/Editor/imp/hpp/UI/View/Package.hpp
Normal file
@ -0,0 +1,30 @@
|
||||
// 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/View/IView.hpp>
|
||||
|
||||
namespace ia::iae
|
||||
{
|
||||
class View_Package : public IView
|
||||
{
|
||||
public:
|
||||
VOID Initialize();
|
||||
VOID Terminate();
|
||||
VOID Render();
|
||||
};
|
||||
}
|
||||
30
Src/Editor/imp/hpp/UI/View/Properties.hpp
Normal file
30
Src/Editor/imp/hpp/UI/View/Properties.hpp
Normal file
@ -0,0 +1,30 @@
|
||||
// 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/View/IView.hpp>
|
||||
|
||||
namespace ia::iae
|
||||
{
|
||||
class View_Properties : public IView
|
||||
{
|
||||
public:
|
||||
VOID Initialize();
|
||||
VOID Terminate();
|
||||
VOID Render();
|
||||
};
|
||||
}
|
||||
30
Src/Editor/imp/hpp/UI/View/Scene.hpp
Normal file
30
Src/Editor/imp/hpp/UI/View/Scene.hpp
Normal file
@ -0,0 +1,30 @@
|
||||
// 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/View/IView.hpp>
|
||||
|
||||
namespace ia::iae
|
||||
{
|
||||
class View_Scene : public IView
|
||||
{
|
||||
public:
|
||||
VOID Initialize();
|
||||
VOID Terminate();
|
||||
VOID Render();
|
||||
};
|
||||
}
|
||||
0
Src/Editor/imp/hpp/UI/Window.hpp
Normal file
0
Src/Editor/imp/hpp/UI/Window.hpp
Normal file
Reference in New Issue
Block a user