feature/imgui-sdl
Last change
on this file since 5081b9a was d8cf709, checked in by Dmitry Portnoy <dportnoy@…>, 4 years ago |
Change UIEvent to also include the original event from the UI library the game gui is currently using, such as SDL or GLFW.
|
-
Property mode
set to
100644
|
File size:
950 bytes
|
Line | |
---|
1 | #ifndef _GAME_GUI_SDL_H
|
---|
2 | #define _GAME_GUI_SDL_H
|
---|
3 |
|
---|
4 | #include "game-gui.hpp"
|
---|
5 |
|
---|
6 | #include <SDL2/SDL.h>
|
---|
7 |
|
---|
8 | #ifdef GAMEGUI_INCLUDE_VULKAN
|
---|
9 | #include <SDL2/SDL_vulkan.h>
|
---|
10 | #endif
|
---|
11 |
|
---|
12 | class GameGui_SDL : public GameGui {
|
---|
13 | public:
|
---|
14 | GameGui_SDL();
|
---|
15 |
|
---|
16 | string& getError();
|
---|
17 |
|
---|
18 | bool init();
|
---|
19 | void shutdown();
|
---|
20 |
|
---|
21 | void* createWindow(const string& title, int width, int height, bool fullscreen);
|
---|
22 | void destroyWindow();
|
---|
23 |
|
---|
24 | void processEvents();
|
---|
25 | int pollEvent(UIEvent* uiEvent);
|
---|
26 | bool keyPressed(unsigned int key);
|
---|
27 |
|
---|
28 | void refreshWindowSize();
|
---|
29 | int getWindowWidth();
|
---|
30 | int getWindowHeight();
|
---|
31 |
|
---|
32 | #ifdef GAMEGUI_INCLUDE_VULKAN
|
---|
33 | bool createVulkanSurface(VkInstance instance, VkSurfaceKHR* surface);
|
---|
34 | vector<const char*> getRequiredExtensions();
|
---|
35 | #endif
|
---|
36 |
|
---|
37 | private:
|
---|
38 | SDL_Window* window;
|
---|
39 | int windowWidth, windowHeight;
|
---|
40 | const Uint8* keyState;
|
---|
41 |
|
---|
42 | string s_errorMessage;
|
---|
43 | };
|
---|
44 |
|
---|
45 | #endif // _GAME_GUI_SDL_H
|
---|
Note:
See
TracBrowser
for help on using the repository browser.