SaveTool: change a drag widget to a slider.

This commit is contained in:
Guillaume Jacquemin 2021-10-12 16:53:19 +02:00
parent 8fedbdd4e5
commit 05a2b1cfb0

View file

@ -107,8 +107,8 @@ auto SaveTool::drawIntEditPopup(int* value_to_edit, int max) -> bool {
drawHelpMarker("You can either drag the widget left or right to change the value,\n" drawHelpMarker("You can either drag the widget left or right to change the value,\n"
"or click on it while holding Ctrl to edit the value directly."); "or click on it while holding Ctrl to edit the value directly.");
ImGui::SameLine(); ImGui::SameLine();
drawUnsafeWidget([](auto... args){ return ImGui::DragInt("", args...); }, drawUnsafeWidget([](auto... args){ return ImGui::SliderInt("", args...); },
value_to_edit, 1.0f, 0, max, "%d", ImGuiSliderFlags_AlwaysClamp); value_to_edit, 0, max, "%d", ImGuiSliderFlags_AlwaysClamp);
ImGui::SameLine(); ImGui::SameLine();
if(drawUnsafeWidget([]{ return ImGui::Button("Apply"); })) { if(drawUnsafeWidget([]{ return ImGui::Button("Apply"); })) {
apply = true; apply = true;