tim_event_consume()

This commit is contained in:
2026-01-12 15:51:07 +05:00
parent 6f8f2a54c0
commit 1aa33128e9
2 changed files with 6 additions and 1 deletions

View File

@@ -310,6 +310,10 @@ bool tim_is_mouse_over(TimRect r);
// returns true if event is mouse left-down and over r
bool tim_is_mouse_click_over(TimRect r);
static inline void tim_event_consume(){
tim->event.type = TimEvent_Void;
}
#pragma endregion

View File

@@ -47,7 +47,8 @@ static TimKey edit_event(TimEditState* e, TimRect r) {
// not focused or no key press
return 0;
}
tim->event.type = TimEvent_Void; // consume event
tim_event_consume();
switch (tim->event.key) {
case TimKey_Escape: