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

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

void 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->smallerButton, (screenHeight*4)/100, (screenWidth/75), true, BLACK);
    
}


