36 lines
854 B
C
36 lines
854 B
C
|
#pragma once
|
||
|
#include "imgui.h"
|
||
|
#include <functional>
|
||
|
#if defined(IMGUI_IMPL_OPENGL_ES2)
|
||
|
#include <SDL_opengles2.h>
|
||
|
#else
|
||
|
#include <SDL_opengl.h>
|
||
|
#endif
|
||
|
#include <SDL.h>
|
||
|
#include <SDL_video.h>
|
||
|
#include <string>
|
||
|
#include "theme.h"
|
||
|
static const char* NAME = "Neko Player";
|
||
|
class RendererBackend {
|
||
|
public:
|
||
|
SDL_Window *window;
|
||
|
int window_width = 475;
|
||
|
int window_height = 354;
|
||
|
bool done = false;
|
||
|
Theme *theme;
|
||
|
bool vsync = false;
|
||
|
std::string lang;
|
||
|
std::string userdir;
|
||
|
int framerate = 60;
|
||
|
ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
|
||
|
ImFont *title;
|
||
|
const char *prefPath;
|
||
|
float accent_color = 280.0;
|
||
|
int Run();
|
||
|
void SetWindowTitle(const char *title);
|
||
|
virtual void Init();
|
||
|
virtual void GuiFunction();
|
||
|
virtual void Deinit();
|
||
|
RendererBackend();
|
||
|
~RendererBackend();
|
||
|
};
|