1
0
mirror of synced 2024-11-28 17:40:51 +01:00
ImHex/lib/third_party/imgui
SparkyTD 62aea46c61
impr: Ensure that Text Editor's cursor blink state is never invisible after a keyboard event (#1664)
### Problem description
By default, the cursor's blinking cycle is independent from user
actions, which feels unconventional while editing pattern code. This
change ensures that the blinking cycle is reset, and the cursor is made
visible every time the editor receives a keyboard event like character
entry, or arrow navigation.


### Implementation description
I moved the hard-coded blink timing numbers to their dedicated static
constant fields since now they are referenced from multiple different
places.

I added the function `void ResetCursorBlinkTime()` to `TextEditor.cpp`
that will reset the blink cycle to `currentMillis() -
sCursorBlinkOnTime`, ensuring that the cursor is visible. This function
is called for every keyboard and mouse click event.

### Screenshots
Before:


https://github.com/WerWolv/ImHex/assets/45818400/668c6802-79a3-450b-80d3-d6abf2ce27be

After:


https://github.com/WerWolv/ImHex/assets/45818400/ee7f60e0-a75f-416d-b86d-8d12b5cdadf2

---------

Co-authored-by: Nik <werwolv98@gmail.com>
2024-05-11 15:58:55 +02:00
..
cimgui build: Updated ImGui to v1.90.6 2024-05-08 22:56:20 +02:00
ColorTextEditor impr: Ensure that Text Editor's cursor blink state is never invisible after a keyboard event (#1664) 2024-05-11 15:58:55 +02:00
custom build: Updated ImGui to v1.90.6 2024-05-08 22:56:20 +02:00
imgui build: Updated ImGui to v1.90.6 2024-05-08 22:56:20 +02:00
imnodes build: Make external plugins build again 2024-02-24 15:06:10 +01:00
implot build: Make external plugins build again 2024-02-24 15:06:10 +01:00
CMakeLists.txt impr: Get rid of cimgui shared library by hooking pinvoke handler 2024-03-12 23:17:49 +01:00