generated from 4D-Modding/4dmod-example
-
Notifications
You must be signed in to change notification settings - Fork 0
/
StateTest.h
40 lines (29 loc) · 1.01 KB
/
StateTest.h
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
39
40
#pragma once
#include <4dm.h>
using namespace fdm;
class StateTest : public State
{
public:
static StateTest instanceObj;
QuadRenderer qr;
const Shader* qs;
FontRenderer font;
// ui
gui::Interface ui{};
gui::Button btn1{};
gui::Text text{};
int clicks = 0;
StateTest() {}
void updateProjection(const glm::ivec2& size);
static void viewportCallback(void* user, const glm::ivec4& pos, const glm::ivec2& scroll);
void init(StateManager& s) override;
void close(StateManager& s) override;
void render(StateManager& s) override;
void mouseInput(StateManager& s, double xpos, double ypos) override;
void scrollInput(StateManager& s, double xoff, double yoff) override;
void mouseButtonInput(StateManager& s, int button, int action, int mods) override;
void keyInput(StateManager&, int key, int scancode, int action, int mods) override;
void windowResize(StateManager&, int width, int height) override;
void charInput(StateManager&, uint32_t codepoint) override;
static void btn1Callback(void* user);
};