How to create submenus (or multiple command UIs)
还没有人认领这个 Issue。
评估
调研方向
从 issue 中展示的 Command UI callback 以及 ImGui::InputInt 和 ImGui::Button 的用法开始。确定如何让持久化的半径输入框或独立子菜单在多次 callback 调用之间保持可见,并定义应将哪种交互视为完成;issue 未指定任何文件或测试。
由索引模型根据 Issue 内容生成。
描述
I have some UI
Everything into the Command UI is a Imgui::Button inside the callback
ImGui::InputInt("Radius", &radius);
ImGui::SameLine();
//
// Button
if (ImGui::Button("Max Curvature"))
{
// get mesh
polyscope::registerSurfaceMesh("mesh", V, F);
// Compute curvature directions via quadric fitting
MatrixXd PD1, PD2;
VectorXd PV1, PV2;
std::vector<Index> bv = {};
igl::principal_curvature(V, F, PD1, PD2, PV1, PV2, bv, radius);
polyscope::getSurfaceMesh("mesh")
->addVertexScalarQuantity("Max Curvature", PV1,
polyscope::DataType::SYMMETRIC);
}
pretty standard. Now I'd like to add the "radius" input inside the button scope, so that when I press the button all the relevant data is presented to the user.
Of course, if I simply put the input widget code inside the button one the input widget is just show for an instant then deleted, as the callback runs over and over.
The best option would be to create a separate sub-UI, possibly opening down below the command UI itself. Or to create multiple command UIs.
Is there a way?
Thank you
- 主要语言
- C++
- 星标
- 2.2k
- 派生
- 242
- 平均合并
- 11 分钟
- 30 天内合并 PR
- 1
贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
nmwsharp/polyscope 的其他 Issue
-
难度 5/5 一周以上 新手友好度 35/100
-
难度 3/5 1-2 天 新手友好度 48/100
-
难度 5/5 一周以上 新手友好度 30/100
-
Rust Version 未关闭
难度 5/5 一周以上 新手友好度 15/100
-
enhancement
难度 5/5 一周以上 新手友好度 20/100
查看 nmwsharp/polyscope 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 75/100
flutter-webrtc/flutter-webrtc#2206 ·
-
难度 2/5 1-3 小时 新手友好度 70/100
google-ai-edge/LiteRT-LM#3739 ·
-
Component: GLib
难度 2/5 1-3 小时 新手友好度 70/100
-
难度 2/5 1-3 小时 新手友好度 65/100
brave/brave-browser#59300 ·
-
Mute ydb/tests/functional/dstool/test_canonical_requests.py.Test.test_group_take_snapshot in main 未关闭ai_reviewed
难度 2/5 1-3 小时 新手友好度 70/100
ydb-platform/ydb#53974 · 3 条评论 ·