aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornathansmith117 <thenathansmithsmith@gmail.com>2024-02-17 21:58:35 +0000
committernathansmith117 <thenathansmithsmith@gmail.com>2024-02-17 21:58:35 +0000
commit801df9c821db87cf2e50f486c63ff083b375eb7e (patch)
treea15d9f7b44ce6e76e41919a5e6b8596d4979434a
parent5d1e44f80cd2fc8ebfb56096d9b2e82dee3ce39f (diff)
downloadPenguinYippies-801df9c821db87cf2e50f486c63ff083b375eb7e.tar.gz
PenguinYippies-801df9c821db87cf2e50f486c63ff083b375eb7e.tar.bz2
PenguinYippies-801df9c821db87cf2e50f486c63ff083b375eb7e.zip
Textured button drawing added
-rw-r--r--src/ui.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/ui.c b/src/ui.c
index b1c00ce..d0e9aa3 100644
--- a/src/ui.c
+++ b/src/ui.c
@@ -18,6 +18,14 @@ TexturedButton createTexturedButton(Texture* texture, Rectangle rect, const char
bool updateTexturedButton(TexturedButton* button)
{
// Draw the button.
+ DrawTexturePro(
+ *button->texture,
+ (Rectangle){0.0, 0.0, button->texture->width, button->texture->height},
+ button->rect,
+ Vector2Zero(),
+ 0.0,
+ button->backgroundColor
+ );
return button->isPressed;
}