Skip to content

Commit 4778082

Browse files
committed
Command line args editor
1 parent d815b73 commit 4778082

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

src/lib/geogram_gfx/gui/simple_application.cpp

+13-1
Original file line numberDiff line numberDiff line change
@@ -1163,7 +1163,7 @@ namespace GEO {
11631163
if(!command_line_editor_visible_) {
11641164
return;
11651165
}
1166-
ImGui::SetNextWindowSize(ImVec2(400,200),ImGuiCond_FirstUseEver);
1166+
ImGui::SetNextWindowSize(ImVec2(600,400),ImGuiCond_FirstUseEver);
11671167
ImGui::Begin("Parameters...",&command_line_editor_visible_);
11681168
std::vector<std::string> groups;
11691169
CmdLine::get_arg_groups(groups);
@@ -1234,6 +1234,18 @@ namespace GEO {
12341234
ImGui::Tooltip(help);
12351235
} break;
12361236
case CmdLine::ARG_PERCENT: {
1237+
ImGui::Text("%s",arg_name.c_str());
1238+
ImGui::SameLine();
1239+
ImGui::SetNextItemWidth(-1.0f);
1240+
double val = CmdLine::get_arg_percent(
1241+
full_arg_name,100.0
1242+
);
1243+
if(ImGui::InputDouble(
1244+
("##" + arg_name + "##" + group).c_str(), &val
1245+
)) {
1246+
CmdLine::set_arg(full_arg_name, val);
1247+
}
1248+
ImGui::Tooltip(help + " (percent)");
12371249
} break;
12381250
}
12391251
}

0 commit comments

Comments
 (0)