Hide dialog

This commit is contained in:
Bill Rossi 2025-02-26 20:10:40 -05:00
parent f33844834b
commit b9ea226344

View File

@ -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);