Cursor & Selection
| 1071 | |
| 1072 | // Cursor & Selection |
| 1073 | void CursorAnimReset() { CursorAnim = -0.30f; } // After a user-input the cursor stays on for a while without blinking |
| 1074 | void CursorClamp() { Stb.cursor = ImMin(Stb.cursor, CurLenW); Stb.select_start = ImMin(Stb.select_start, CurLenW); Stb.select_end = ImMin(Stb.select_end, CurLenW); } |
| 1075 | bool HasSelection() const { return Stb.select_start != Stb.select_end; } |
| 1076 | void ClearSelection() { Stb.select_start = Stb.select_end = Stb.cursor; } |