17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-10-26 15:54:53 +01:00

feat(ui): imgui 1.91.9b-docking in place of 1.73: local changes of the backends carried over (glad as the gl loader, srgb and gamma of the ui, gles glsl string), BufferingBar/Spinner kept, imgui_tables in cmake; cursor position, cursor enter and focus of the main window passed to the glfw backend, which works with events now; code adapted to the api: ImGuiListClipper::Begin, BeginListBox, ImTextureID as an integer, ImageButton with an id, ImGuiKey without GetKeyIndex, logarithmic sliders in place of the removed power argument; ImGuizmo with the math operators defined before imgui.h and SetNextFrameWantCaptureMouse

This commit is contained in:
2026-10-08 20:38:13 +02:00
parent e661b9f1c7
commit 344034ec70
40 changed files with 48540 additions and 14321 deletions

View File

@@ -650,7 +650,7 @@ void nodebank_panel::render()
ImGui::InputTextWithHint(STR_C("Search"), STR_C("Search node bank"), m_nodesearch, IM_ARRAYSIZE(m_nodesearch));
// the list takes the rest of the window, but keeps a usable height when the sections above are expanded (the window scrolls then)
auto const listheight{std::max(ImGui::GetContentRegionAvail().y, ImGui::GetTextLineHeightWithSpacing() * 10.0f)};
if (ImGui::ListBoxHeader("##nodebank", ImVec2(-1, listheight)))
if (ImGui::BeginListBox("##nodebank", ImVec2(-1, listheight)))
{
auto idx{0};
auto isvisible{false};
@@ -710,7 +710,7 @@ void nodebank_panel::render()
ImGui::TextDisabled(EditorIncludes.ready().empty() ? " (none yet, describe the templates in the Include database window)" : " (no match)");
}
}
ImGui::ListBoxFooter();
ImGui::EndListBox();
}
ImGui::PopItemWidth();
}
@@ -772,7 +772,7 @@ bool nodebank_panel::set_combo(char const *Label, model_set_ref &Ref, char const
void nodebank_panel::manual_list(char const *Id, std::vector<std::string> &List, int &Selected)
{
ImGui::PushID(Id);
if (ImGui::ListBoxHeader("##list", ImVec2(-1, ImGui::GetTextLineHeightWithSpacing() * 6.5f)))
if (ImGui::BeginListBox("##list", ImVec2(-1, ImGui::GetTextLineHeightWithSpacing() * 6.5f)))
{
for (int idx = 0; idx < static_cast<int>(List.size()); ++idx)
{
@@ -784,7 +784,7 @@ void nodebank_panel::manual_list(char const *Id, std::vector<std::string> &List,
{
ImGui::TextDisabled(STR_C("(empty)"));
}
ImGui::ListBoxFooter();
ImGui::EndListBox();
}
if (ImGui::Button(STR_C("Add selected")))
{
@@ -1787,7 +1787,8 @@ void includes_panel::render_list()
static_cast<int>(EditorIncludes.ready().size()));
ImGui::BeginChild("##templates", ImVec2(0.0f, ImGui::GetTextLineHeightWithSpacing() * 9.0f), true);
ImGuiListClipper clipper(static_cast<int>(m_listed.size()));
ImGuiListClipper clipper;
clipper.Begin(static_cast<int>(m_listed.size()));
while (clipper.Step())
{
for (auto row = clipper.DisplayStart; row < clipper.DisplayEnd; ++row)