basic ui
This commit is contained in:
parent
0e0a294ece
commit
385d2a62cb
3 changed files with 1 additions and 33 deletions
|
@ -46,10 +46,6 @@ void drawGameData(SDL_Renderer *renderer, const GameData *gameData, SDL_Texture
|
|||
|
||||
// Present the rendered frame
|
||||
SDL_RenderPresent(renderer);
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
>>>>>>> 4b87dcb (ui)
|
||||
}
|
||||
|
||||
void drawMinimap(SDL_Renderer *renderer, const Map *map, int minimapX, int minimapY, int minimapSize) {
|
||||
|
@ -74,9 +70,4 @@ void drawMinimap(SDL_Renderer *renderer, const Map *map, int minimapX, int minim
|
|||
SDL_SetRenderDrawColor(renderer, 255, 255, 255, 255);
|
||||
SDL_Rect minimapBorderRect = {minimapX, minimapY, minimapSize, minimapSize};
|
||||
SDL_RenderDrawRect(renderer, &minimapBorderRect);
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
>>>>>>> 6abc1cd (draw function)
|
||||
=======
|
||||
>>>>>>> 4b87dcb (ui)
|
||||
}
|
12
src/ui.c
12
src/ui.c
|
@ -29,10 +29,6 @@ void handleButtonEvents(SDL_Event *event, Button buttons[], int numButtons) {
|
|||
for (int i = 0; i < numButtons; i++) {
|
||||
handleButtonClick(event, &buttons[i]);
|
||||
}
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
>>>>>>> 4b87dcb (ui)
|
||||
}
|
||||
|
||||
void drawButtons(SDL_Renderer *renderer, Button buttons[], int numButtons, TTF_Font *font) {
|
||||
|
@ -68,10 +64,4 @@ void drawButtons(SDL_Renderer *renderer, Button buttons[], int numButtons, TTF_F
|
|||
|
||||
// Present renderer
|
||||
SDL_RenderPresent(renderer);
|
||||
}
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
}
|
||||
>>>>>>> 206ed0e (basic ui controls)
|
||||
=======
|
||||
>>>>>>> 4b87dcb (ui)
|
||||
}
|
13
src/ui.h
13
src/ui.h
|
@ -9,27 +9,14 @@ typedef struct {
|
|||
int x, y, w, h;
|
||||
bool clicked;
|
||||
void (*onClick)();
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< HEAD
|
||||
char text[50];
|
||||
=======
|
||||
>>>>>>> 206ed0e (basic ui controls)
|
||||
=======
|
||||
char text[50];
|
||||
>>>>>>> 4b87dcb (ui)
|
||||
} Button;
|
||||
|
||||
// Function prototypes
|
||||
bool isPointInsideRect(int x, int y, SDL_Rect rect);
|
||||
void handleButtonClick(SDL_Event *event, Button *button);
|
||||
void handleButtonEvents(SDL_Event *event, Button buttons[], int numButtons);
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< HEAD
|
||||
void drawButtons(SDL_Renderer *renderer, Button buttons[], int numButtons, TTF_Font *font);
|
||||
=======
|
||||
>>>>>>> 206ed0e (basic ui controls)
|
||||
=======
|
||||
void drawButtons(SDL_Renderer *renderer, Button buttons[], int numButtons, TTF_Font *font);
|
||||
>>>>>>> 4b87dcb (ui)
|
||||
|
||||
#endif /* UI_H */
|
||||
|
|
Loading…
Reference in a new issue