Nav: Tidying up, renaming + update AnyRequest flag in NavMoveRequestSubmit().

This commit is contained in:
ocornut
2021-09-02 18:41:00 +02:00
parent 528104a89b
commit ade4c15eea
3 changed files with 11 additions and 13 deletions

View File

@ -2416,7 +2416,6 @@ bool ImGui::DragScalar(const char* label, ImGuiDataType data_type, void* p_data,
temp_input_is_active = true;
}
// Experimental: simple click (without moving) turns Drag into an InputText
// FIXME: Currently polling ImGuiConfigFlags_IsTouchScreen, may either poll an hypothetical ImGuiBackendFlags_HasKeyboard and/or an explicit drag settings.
if (g.IO.ConfigDragClickToInputText && temp_input_allowed && !temp_input_is_active)
if (g.ActiveId == id && hovered && g.IO.MouseReleased[0] && !IsMouseDragPastThreshold(0, g.IO.MouseDragThreshold * DRAG_MOUSE_THRESHOLD_FACTOR))
{