tim_event_consume()
This commit is contained in:
@@ -310,6 +310,10 @@ bool tim_is_mouse_over(TimRect r);
|
|||||||
// returns true if event is mouse left-down and over r
|
// returns true if event is mouse left-down and over r
|
||||||
bool tim_is_mouse_click_over(TimRect r);
|
bool tim_is_mouse_click_over(TimRect r);
|
||||||
|
|
||||||
|
static inline void tim_event_consume(){
|
||||||
|
tim->event.type = TimEvent_Void;
|
||||||
|
}
|
||||||
|
|
||||||
#pragma endregion
|
#pragma endregion
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -47,7 +47,8 @@ static TimKey edit_event(TimEditState* e, TimRect r) {
|
|||||||
// not focused or no key press
|
// not focused or no key press
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
tim->event.type = TimEvent_Void; // consume event
|
|
||||||
|
tim_event_consume();
|
||||||
|
|
||||||
switch (tim->event.key) {
|
switch (tim->event.key) {
|
||||||
case TimKey_Escape:
|
case TimKey_Escape:
|
||||||
|
|||||||
Reference in New Issue
Block a user