summaryrefslogtreecommitdiff
path: root/ted.c
diff options
context:
space:
mode:
Diffstat (limited to 'ted.c')
-rw-r--r--ted.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/ted.c b/ted.c
index 2322987..e952ece 100644
--- a/ted.c
+++ b/ted.c
@@ -80,6 +80,13 @@ u32 ted_get_key_modifier(Ted *ted) {
| alt_down << KEY_MODIFIER_ALT_BIT;
}
+bool ted_clicked_in_rect(Ted *ted, Rect rect) {
+ arr_foreach_ptr(ted->mouse_clicks[SDL_BUTTON_LEFT], MouseClick, click) {
+ if (rect_contains_point(rect, click->pos))
+ return true;
+ }
+ return false;
+}
void ted_set_message(Ted *ted, MessageType type, const char *fmt, ...) {
va_list args;