diff options
author | nathansmith117 <thenathansmithsmith@gmail.com> | 2024-02-21 18:17:41 +0000 |
---|---|---|
committer | nathansmith117 <thenathansmithsmith@gmail.com> | 2024-02-21 18:17:41 +0000 |
commit | 2f6a0233b16d25df9b79a61b93fd8a72626bad3c (patch) | |
tree | fb505b87c4492494bc43c488da594ec31bf2ab35 /src/ui.c | |
parent | ba522d0b6e8172d2d9f0ee107fbb2d6499380847 (diff) | |
download | PenguinYippies-2f6a0233b16d25df9b79a61b93fd8a72626bad3c.tar.gz PenguinYippies-2f6a0233b16d25df9b79a61b93fd8a72626bad3c.tar.bz2 PenguinYippies-2f6a0233b16d25df9b79a61b93fd8a72626bad3c.zip |
Fixed mouse position with render texture
Diffstat (limited to 'src/ui.c')
-rw-r--r-- | src/ui.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -1,5 +1,6 @@ #include "ui.h" #include "game.h" +#include "util.h" TexturedButton createTexturedButton(Texture* texture, Rectangle rect, const char* message, Color backgroundColor, Color foregroundColor) @@ -46,7 +47,7 @@ bool updateTexturedButton(TexturedButton* button) button->isPressed = false; // Outline and detect click stuff. - if (CheckCollisionPointRec(GetMousePosition(), button->rect)) + if (CheckCollisionPointRec(getScaledMousePosition(), button->rect)) { // Draw outline thingy. if (IsMouseButtonDown(MOUSE_LEFT_BUTTON)) |