enforce code style warnings
This commit is contained in:
parent
c72a215afb
commit
54a49c2d60
10 changed files with 47 additions and 108 deletions
22
kubo_bar.c
22
kubo_bar.c
|
|
@ -18,16 +18,7 @@
|
|||
|
||||
#include "kubo_bar.h"
|
||||
|
||||
static inline int push_text(int x, int y, const char *text, Color bg_color) {
|
||||
|
||||
int font_size = KUBO_BAR_HEIGHT - KUBO_BAR_PADDING;
|
||||
int text_width = MeasureText(text, font_size);
|
||||
|
||||
DrawRectangle(x - KUBO_BAR_PADDING, y, text_width + (2 * KUBO_BAR_PADDING),
|
||||
KUBO_BAR_HEIGHT, bg_color);
|
||||
DrawText(text, x, y + (KUBO_BAR_PADDING / 2), font_size, WHITE);
|
||||
return x + text_width;
|
||||
}
|
||||
static inline int push_text(int x, int y, const char *text, Color bg_color);
|
||||
|
||||
void kubo_bar_render(struct kubo_context *context) {
|
||||
const int bar_y = GetScreenHeight() - KUBO_BAR_HEIGHT;
|
||||
|
|
@ -44,3 +35,14 @@ void kubo_bar_render(struct kubo_context *context) {
|
|||
KUBO_BAR_HEIGHT - KUBO_BAR_PADDING);
|
||||
}
|
||||
}
|
||||
|
||||
static inline int push_text(int x, int y, const char *text, Color bg_color) {
|
||||
int font_size = KUBO_BAR_HEIGHT - KUBO_BAR_PADDING;
|
||||
int text_width = MeasureText(text, font_size);
|
||||
|
||||
DrawRectangle(x - KUBO_BAR_PADDING, y, text_width + (2 * KUBO_BAR_PADDING),
|
||||
KUBO_BAR_HEIGHT, bg_color);
|
||||
DrawText(text, x, y + (KUBO_BAR_PADDING / 2), font_size, WHITE);
|
||||
return x + text_width;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue