aboutsummaryrefslogtreecommitdiffstats
path: root/src/ui.h
blob: 5868b50ccbae0239857f770b01945d4acf23fd8a (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
#include "utils.h"

#ifndef UI_H
#define UI_H

#ifndef RAYGUI_WINDOWBOX_STATUSBAR_HEIGHT
#define RAYGUI_WINDOWBOX_STATUSBAR_HEIGHT 24
#endif

#ifndef RAYGUI_WINDOW_CLOSEBUTTON_SIZE
#define RAYGUI_WINDOW_CLOSEBUTTON_SIZE 18
#endif

typedef void (*DrawWindowContentCallback)(Vector2 position, Vector2 scroll);

typedef struct {
  Rectangle rect;
  bool minimized;
  bool moving;
  bool resizing;
  DrawWindowContentCallback callback;
  Vector2 contentSize;
  Vector2 scroll;
} FloatingWindow;

FloatingWindow createFloatingWindow();
void updateFloatingWindow(FloatingWindow* window, const char* title);

#endif