test version will be rewritten before main.

This commit is contained in:
Yggdrasil75
2026-03-05 14:59:23 -05:00
parent 3d96e569c8
commit 6336d45075
7 changed files with 601 additions and 7 deletions

View File

@@ -32,6 +32,7 @@ private:
std::map<int, bool> keyStates;
float deltaTime = 0.16f;
bool orbitEquator = false;
bool collapsed;
float rotationRadius = 2500;
float angle = 0.0f;
const float ω = (std::pow(M_PI, 2) / 30) / 10;
@@ -84,7 +85,7 @@ public:
void renderUI(GLFWwindow* window) {
handleCameraControls(window);
ImGui::Begin("Planet Simulation");
collapsed = ImGui::Begin("Planet Simulation");
if (ImGui::BeginTable("MainLayout", 2, ImGuiTableFlags_Resizable | ImGuiTableFlags_BordersOuter)) {
ImGui::TableSetupColumn("Controls", ImGuiTableColumnFlags_WidthStretch, 0.3f);
ImGui::TableSetupColumn("Preview", ImGuiTableColumnFlags_WidthStretch, 0.7f);
@@ -289,8 +290,9 @@ public:
void renderPreviewPanel() {
ImGui::BeginChild("PreviewChild", ImVec2(0, 0), true, ImGuiWindowFlags_NoScrollbar | ImGuiWindowFlags_NoScrollWithMouse);
livePreview();
if (!collapsed) {
livePreview();
}
if (textureInitialized) {
float aspect = (float)currentPreviewFrame.getWidth() / (float)currentPreviewFrame.getHeight();
float availWidth = ImGui::GetContentRegionAvail().x;