|
|
|
@ -361,7 +361,7 @@ void ImGui::ShowDemoWindow(bool* p_open)
|
|
|
|
|
ImGui::DragInt("drag int", &i1, 1);
|
|
|
|
|
ImGui::SameLine(); ShowHelpMarker("Click and drag to edit value.\nHold SHIFT/ALT for faster/slower edit.\nDouble-click or CTRL+click to input value.");
|
|
|
|
|
|
|
|
|
|
ImGui::DragInt("drag int 0..100", &i2, 1, 0, 100, "%.0f%%");
|
|
|
|
|
ImGui::DragInt("drag int 0..100", &i2, 1, 0, 100, "%d%%");
|
|
|
|
|
|
|
|
|
|
static float f1=1.00f, f2=0.0067f;
|
|
|
|
|
ImGui::DragFloat("drag float", &f1, 0.005f);
|
|
|
|
@ -996,7 +996,7 @@ void ImGui::ShowDemoWindow(bool* p_open)
|
|
|
|
|
static float begin = 10, end = 90;
|
|
|
|
|
static int begin_i = 100, end_i = 1000;
|
|
|
|
|
ImGui::DragFloatRange2("range", &begin, &end, 0.25f, 0.0f, 100.0f, "Min: %.1f %%", "Max: %.1f %%");
|
|
|
|
|
ImGui::DragIntRange2("range int (no bounds)", &begin_i, &end_i, 5, 0, 0, "Min: %.0f units", "Max: %.0f units");
|
|
|
|
|
ImGui::DragIntRange2("range int (no bounds)", &begin_i, &end_i, 5, 0, 0, "Min: %d units", "Max: %d units");
|
|
|
|
|
ImGui::TreePop();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -1371,9 +1371,9 @@ void ImGui::ShowDemoWindow(bool* p_open)
|
|
|
|
|
static int track_line = 50, scroll_to_px = 200;
|
|
|
|
|
ImGui::Checkbox("Track", &track);
|
|
|
|
|
ImGui::PushItemWidth(100);
|
|
|
|
|
ImGui::SameLine(130); track |= ImGui::DragInt("##line", &track_line, 0.25f, 0, 99, "Line = %.0f");
|
|
|
|
|
ImGui::SameLine(130); track |= ImGui::DragInt("##line", &track_line, 0.25f, 0, 99, "Line = %d");
|
|
|
|
|
bool scroll_to = ImGui::Button("Scroll To Pos");
|
|
|
|
|
ImGui::SameLine(130); scroll_to |= ImGui::DragInt("##pos_y", &scroll_to_px, 1.00f, 0, 9999, "Y = %.0f px");
|
|
|
|
|
ImGui::SameLine(130); scroll_to |= ImGui::DragInt("##pos_y", &scroll_to_px, 1.00f, 0, 9999, "Y = %d px");
|
|
|
|
|
ImGui::PopItemWidth();
|
|
|
|
|
if (scroll_to) track = false;
|
|
|
|
|
|
|
|
|
|