#ifndef BUTTONS_H_ #define BUTTONS_H_ #include "raylib.h" #include "../game.h" typedef struct Button{ Texture2D textures[4]; // [0]: Normal [1]: Hovered [2]: Pressed [3]: Released Vector2 position; // Linke obere Ecke des Buttons Vector2 centerPosition; // Die Mitte des Buttons char text[20]; // Text, den der Button zentriert anzeigt, aktuell max. 19 Zeichen int state; // 0: default 1: hovered 2: pressed 3: released int id; // Durch die ID wird dem Button eine Funktion zugeordnet int fontSize; // FontSize kann für jeden Button individuell festgelegt werden } Button; // Textures: [0]: Normal [1]: Hovered [2]: Pressed [3]: Released Button * ButtonInitButton(Texture2D textures[4], Vector2 *position, char *text, int textLEN, int fontSize, int id); // executes the logic of one button of certain id - huge switch? void ButtonExecuteButton(Button *button, Game * game); int ButtonUpdateButtonState(Button * button); void ButtonDrawButton(Button * button); #endif