#include "menu-button.h"
#include <stdlib.h>
#include <stdio.h>

Menu_Button * Menu_Button_init(Rectangle button, Rectangle smallerButton, Rectangle textBox, char* displayText, Display display){
    Menu_Button * self = malloc(sizeof(Menu_Button));
    self->button = button;
    self->smallerButton = smallerButton;
    self->textBox = textBox;
    self->displayText = displayText;
    self->displayOnClick = display;
    return self;
}

void Menu_Button_draw(Menu_Button * self, Font * font, const int screenWidth, const int screenHeight){
    DrawRectangleRec(self->button, RED);
    DrawRectangleRec(self->smallerButton, WHITE);
    DrawTextRec(*font, self->displayText, self->textBox, (screenHeight*4)/100, (screenWidth/75), true, BLACK);
}

void Menu_Button_delete(Menu_Button * self){
    free(self);
}
