Split main animation controller panel into 3 segments

This commit is contained in:
Kah Wei 2023-03-05 01:45:26 +08:00
parent 32adb0c540
commit 066d060b29
1 changed files with 25 additions and 4 deletions

View File

@ -65,12 +65,33 @@ namespace SHADE
if (Begin()) if (Begin())
{ {
// Only render the node editor if there is controller data // Only render the node editor if there is controller data
if (controllerData.has_value()) if (controllerData.has_value())
{ {
// Calculate size of each portion
const float MAIN_PANEL_COLUMN_WIDTH = ImGui::GetWindowSize().x * 0.7f;
// Draw
drawActiveMenuBar(); drawActiveMenuBar();
drawNodeEditor(); ImGui::BeginTable("base_table", 3);
{
// Set up Columns
ImGui::TableSetupColumn("params_panel", ImGuiTableColumnFlags_WidthStretch);
ImGui::TableSetupColumn("main_panel", ImGuiTableColumnFlags_WidthFixed, MAIN_PANEL_COLUMN_WIDTH);
ImGui::TableSetupColumn("prop_panel", ImGuiTableColumnFlags_WidthStretch);
// Render contents
ImGui::TableNextRow();
{
ImGui::TableSetColumnIndex(0);
ImGui::Text("Parameters");
ImGui::TableSetColumnIndex(1);
drawNodeEditor();
ImGui::TableSetColumnIndex(2);
ImGui::Text("Properties");
}
}
ImGui::EndTable();
} }
else else
{ {