mirror of
https://github.com/Drezil/imgui.git
synced 2024-11-15 01:17:00 +00:00
io.OptNoCursorBlink -> io.OptCursorBlink (#1427)
This commit is contained in:
parent
669498ff26
commit
30bf40195b
@ -780,7 +780,7 @@ ImGuiIO::ImGuiIO()
|
|||||||
#else
|
#else
|
||||||
OptMacOSXBehaviors = false;
|
OptMacOSXBehaviors = false;
|
||||||
#endif
|
#endif
|
||||||
OptNoCursorBlink = false;
|
OptCursorBlink = true;
|
||||||
|
|
||||||
// Settings (User Functions)
|
// Settings (User Functions)
|
||||||
RenderDrawListsFn = NULL;
|
RenderDrawListsFn = NULL;
|
||||||
@ -8494,7 +8494,7 @@ bool ImGui::InputTextEx(const char* label, char* buf, int buf_size, const ImVec2
|
|||||||
draw_window->DrawList->AddText(g.Font, g.FontSize, render_pos - render_scroll, GetColorU32(ImGuiCol_Text), buf_display, buf_display + edit_state.CurLenA, 0.0f, is_multiline ? NULL : &clip_rect);
|
draw_window->DrawList->AddText(g.Font, g.FontSize, render_pos - render_scroll, GetColorU32(ImGuiCol_Text), buf_display, buf_display + edit_state.CurLenA, 0.0f, is_multiline ? NULL : &clip_rect);
|
||||||
|
|
||||||
// Draw blinking cursor
|
// Draw blinking cursor
|
||||||
bool cursor_is_visible = (g.IO.OptNoCursorBlink) || (g.InputTextState.CursorAnim <= 0.0f) || fmodf(g.InputTextState.CursorAnim, 1.20f) <= 0.80f;
|
bool cursor_is_visible = (!g.IO.OptCursorBlink) || (g.InputTextState.CursorAnim <= 0.0f) || fmodf(g.InputTextState.CursorAnim, 1.20f) <= 0.80f;
|
||||||
ImVec2 cursor_screen_pos = render_pos + cursor_offset - render_scroll;
|
ImVec2 cursor_screen_pos = render_pos + cursor_offset - render_scroll;
|
||||||
ImRect cursor_screen_rect(cursor_screen_pos.x, cursor_screen_pos.y-g.FontSize+0.5f, cursor_screen_pos.x+1.0f, cursor_screen_pos.y-1.5f);
|
ImRect cursor_screen_rect(cursor_screen_pos.x, cursor_screen_pos.y-g.FontSize+0.5f, cursor_screen_pos.x+1.0f, cursor_screen_pos.y-1.5f);
|
||||||
if (cursor_is_visible && cursor_screen_rect.Overlaps(clip_rect))
|
if (cursor_is_visible && cursor_screen_rect.Overlaps(clip_rect))
|
||||||
|
2
imgui.h
2
imgui.h
@ -804,7 +804,7 @@ struct ImGuiIO
|
|||||||
|
|
||||||
// Advanced/subtle behaviors
|
// Advanced/subtle behaviors
|
||||||
bool OptMacOSXBehaviors; // = defined(__APPLE__) // OS X style: Text editing cursor movement using Alt instead of Ctrl, Shortcuts using Cmd/Super instead of Ctrl, Line/Text Start and End using Cmd+Arrows instead of Home/End, Double click selects by word instead of selecting whole text, Multi-selection in lists uses Cmd/Super instead of Ctrl
|
bool OptMacOSXBehaviors; // = defined(__APPLE__) // OS X style: Text editing cursor movement using Alt instead of Ctrl, Shortcuts using Cmd/Super instead of Ctrl, Line/Text Start and End using Cmd+Arrows instead of Home/End, Double click selects by word instead of selecting whole text, Multi-selection in lists uses Cmd/Super instead of Ctrl
|
||||||
bool OptNoCursorBlink; // = false // Disable blinking cursor
|
bool OptCursorBlink; // = true // Enable blinking cursor, for users who consider it annoying.
|
||||||
|
|
||||||
//------------------------------------------------------------------
|
//------------------------------------------------------------------
|
||||||
// Settings (User Functions)
|
// Settings (User Functions)
|
||||||
|
Loading…
Reference in New Issue
Block a user