Misc: Made it accepted to call SetMouseCursor() with any out-of-bound value, as a way to allow hacking in custom cursors if desirable.

This commit is contained in:
ocornut
2024-09-16 11:19:05 +02:00
parent 4d00bf8add
commit dab63231d8
5 changed files with 13 additions and 6 deletions

View File

@@ -4438,7 +4438,7 @@ bool ImGui::InputTextEx(const char* label, const char* hint, char* buf, int buf_
}
const bool hovered = ItemHoverable(frame_bb, id, g.LastItemData.InFlags);
if (hovered)
g.MouseCursor = ImGuiMouseCursor_TextInput;
SetMouseCursor(ImGuiMouseCursor_TextInput);
// We are only allowed to access the state if we are already the active widget.
ImGuiInputTextState* state = GetInputTextState(id);