aboutsummaryrefslogtreecommitdiff
path: root/source/raylib.c
blob: 935feee897737e7bb806dbe742c35ee2caa3f7e9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
/* raylib.c & raygui.c */

#include <raylib.h>

Font DefaultFont(char * choice) {
  Font font = LoadFont(choice);
  if (!IsFontValid(font)) { font = GetFontDefault(); }
  return font;
}

/* raygui.c */

#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunused-parameter"
#pragma GCC diagnostic ignored "-Wshadow"
#pragma GCC diagnostic ignored "-Wunused-function"
#pragma GCC diagnostic ignored "-Wunused-result"
#pragma GCC diagnostic ignored "-Wpragmas"
#pragma GCC diagnostic ignored "-Wunknown-warning-option"
#pragma GCC diagnostic ignored "-Walloc-size-larger-than="
#pragma GCC diagnostic ignored "-Wunused-but-set-variable"

#define RAYGUI_IMPLEMENTATION
#include <raygui.h>
#include <style_dark.h>
#pragma GCC diagnostic pop

/* removes the timewaster of decompressing and loading a font never used */
void GuiLoadStyleDarkSimple(void) {
  for (int i = 0; i < DARK_STYLE_PROPS_COUNT; i++) {
    GuiSetStyle(darkStyleProps[i].controlId, darkStyleProps[i].propertyId, darkStyleProps[i].propertyValue);
  }
}