2023-08-05 05:22:20 +03:00
|
|
|
#include <imgui.h>
|
2023-07-30 06:14:30 +03:00
|
|
|
#include "camera.h"
|
|
|
|
#include "player.h"
|
2023-08-02 00:54:12 +03:00
|
|
|
#include "world.h"
|
2023-07-30 06:14:30 +03:00
|
|
|
|
|
|
|
namespace Menu {
|
|
|
|
static const ImGuiWindowFlags windowFlags = ImGuiWindowFlags_NoCollapse | ImGuiWindowFlags_NoSavedSettings | ImGuiWindowFlags_AlwaysAutoResize;
|
2023-08-05 05:22:20 +03:00
|
|
|
static const ImVec2 minWndSize = ImVec2(0.0f, 0.0f);
|
2024-01-06 03:33:37 +02:00
|
|
|
static const ImVec2 maxWndSize = ImVec2(900.0f, 675.0f);
|
2023-07-30 06:14:30 +03:00
|
|
|
|
|
|
|
bool isOpen = false;
|
|
|
|
|
|
|
|
void Render() {
|
2023-08-05 05:22:20 +03:00
|
|
|
ImGui::SetNextWindowSizeConstraints(minWndSize, maxWndSize);
|
2023-08-05 21:39:43 +03:00
|
|
|
ImGui::Begin("EGameTools", &Menu::isOpen, windowFlags); {
|
2023-07-30 06:14:30 +03:00
|
|
|
if (ImGui::BeginTabBar("##MainTabBar")) {
|
|
|
|
if (ImGui::BeginTabItem("Player")) {
|
|
|
|
Menu::Player::Render();
|
|
|
|
ImGui::EndTabItem();
|
|
|
|
}
|
|
|
|
if (ImGui::BeginTabItem("Camera")) {
|
|
|
|
Menu::Camera::Render();
|
|
|
|
ImGui::EndTabItem();
|
|
|
|
}
|
|
|
|
if (ImGui::BeginTabItem("World")) {
|
2023-08-02 00:54:12 +03:00
|
|
|
Menu::World::Render();
|
2023-07-30 06:14:30 +03:00
|
|
|
ImGui::EndTabItem();
|
|
|
|
}
|
|
|
|
ImGui::EndTabBar();
|
|
|
|
}
|
|
|
|
ImGui::End();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|