mirror of
https://github.com/EricPlayZ/EGameTools.git
synced 2025-07-19 01:47:50 +08:00
34 lines
1.1 KiB
C++
34 lines
1.1 KiB
C++
#include <imgui.h>
|
|
#include "camera.h"
|
|
#include "player.h"
|
|
#include "world.h"
|
|
|
|
namespace Menu {
|
|
static const ImGuiWindowFlags windowFlags = ImGuiWindowFlags_NoCollapse | ImGuiWindowFlags_NoSavedSettings | ImGuiWindowFlags_AlwaysAutoResize;
|
|
static const ImVec2 minWndSize = ImVec2(0.0f, 0.0f);
|
|
static const ImVec2 maxWndSize = ImVec2(900.0f, 675.0f);
|
|
|
|
bool isOpen = false;
|
|
|
|
void Render() {
|
|
ImGui::SetNextWindowSizeConstraints(minWndSize, maxWndSize);
|
|
ImGui::Begin("EGameTools", &Menu::isOpen, windowFlags); {
|
|
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")) {
|
|
Menu::World::Render();
|
|
ImGui::EndTabItem();
|
|
}
|
|
ImGui::EndTabBar();
|
|
}
|
|
ImGui::End();
|
|
}
|
|
}
|
|
} |