pthom / hello_imgui

Hello, Dear ImGui: unleash your creativity in app development and prototyping
https://pthom.github.io/hello_imgui
MIT License
604 stars 91 forks source link

Unable to add left edge toolbar #107

Closed gou177 closed 1 month ago

gou177 commented 1 month ago

To reproduce add here:

runnerParams.callbacks.AddEdgeToolbar(HelloImGui::EdgeToolbarType::Left, []() {});

I get std::out_of_range error Found typo in source code:

if ( edgeToolbarType == EdgeToolbarType::Left)
{
    auto width = HelloImGui::EmSize(
        runnerParams.callbacks.edgesToolbars.at(EdgeToolbarType::Right).options.sizeEm);
    fullScreenSize.x = width;
}

if i replace EdgeToolbarType::Right to EdgeToolbarType::Left everything works as expected