diff --git a/dialog.c b/dialog.c index 341fef4..f4ef484 100644 --- a/dialog.c +++ b/dialog.c @@ -256,6 +256,10 @@ Rectangle dialog_option_inner_rectangle(Dialog *d, int i) { } void dialog_draw(Dialog *d) { + Vector2 mouse_pos = GetMousePosition(); + DrawText("Hide Dialog", 1225, 850, 30, BLACK); + if (mouse_pos.x > 1225 && mouse_pos.y > 850) return; + int text_width; DrawRectangleRec(DIALOG_OUTER_RECTANGLE, BLACK); DrawRectangleRec(DIALOG_INNER_RECTANGLE, WHITE); @@ -276,8 +280,8 @@ void dialog_draw(Dialog *d) { } void dialog_handle_input(Dialog *d) { + Vector2 mouse_pos = GetMousePosition(); if (IsMouseButtonPressed(0)) { - Vector2 mouse_pos = GetMousePosition(); for (int i = 0; i < d->options_count; i++) { DialogOption *o = &d->options[i]; Rectangle outer = dialog_option_outer_rectangle(d, i);