aboutsummaryrefslogtreecommitdiffstats
path: root/src/ui.c
blob: b1c00ce505015c13322153a1aff5ad16a767cc58 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#include "ui.h"
#include "game.h"

TexturedButton createTexturedButton(Texture* texture, Rectangle rect, const char* message,
                                    Color backgroundColor, Color foregroundColor)
{
    TexturedButton button;
    button.texture = texture;
    button.rect = rect;
    strncpy((char*)button.message, message, UI_BUTTON_NAME_MAX);
    button.backgroundColor = backgroundColor;
    button.foregroundColor = foregroundColor;
    button.isPressed = false;

    return button;
}

bool updateTexturedButton(TexturedButton* button)
{
    // Draw the button.

    return button->isPressed;
}