-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathinput.c
38 lines (31 loc) · 780 Bytes
/
input.c
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
34
35
36
37
38
#include <raylib.h>
#include <stdlib.h>
#include "microui.h"
#include "murl.h"
int main(void) {
InitWindow(800, 600, "Custom Input");
SetTargetFPS(60);
mu_Context *ctx = malloc(sizeof(mu_Context));
mu_init(ctx);
murl_setup_font(ctx);
while (!WindowShouldClose()) {
murl_handle_mouse_move(ctx);
murl_handle_mouse_scroll(ctx);
murl_handle_mouse_buttons_input(ctx);
murl_handle_keyboard_input(ctx);
murl_handle_text_input(ctx);
mu_begin(ctx);
if (mu_begin_window(ctx, "Custom Input", mu_rect(0, 0, 800, 600))) {
mu_label(ctx, "This is a label");
mu_end_window(ctx);
}
mu_end(ctx);
BeginDrawing();
ClearBackground(BLACK);
murl_render(ctx);
EndDrawing();
}
free(ctx);
CloseWindow();
return 0;
}