Cursor & Selection
| 1106 | |
| 1107 | // Cursor & Selection |
| 1108 | void CursorAnimReset() { CursorAnim = -0.30f; } // After a user-input the cursor stays on for a while without blinking |
| 1109 | void CursorClamp() { Stb.cursor = ImMin(Stb.cursor, CurLenW); Stb.select_start = ImMin(Stb.select_start, CurLenW); Stb.select_end = ImMin(Stb.select_end, CurLenW); } |
| 1110 | bool HasSelection() const { return Stb.select_start != Stb.select_end; } |
| 1111 | void ClearSelection() { Stb.select_start = Stb.select_end = Stb.cursor; } |