mirror of
https://github.com/0O0o0oOoO00/Alas.git
synced 2026-05-22 04:39:28 +08:00
37 lines
666 B
C++
37 lines
666 B
C++
#ifndef UI_HPP
|
|
#define UI_HPP
|
|
|
|
#include <EGL/egl.h>
|
|
|
|
#include "cracker.hpp"
|
|
#include "imgui/imgui.h"
|
|
|
|
class CrackerUI {
|
|
public:
|
|
CrackerUI();
|
|
|
|
void init(EGLint width, EGLint height);
|
|
void draw_menu();
|
|
void render_ui();
|
|
|
|
void show_ui();
|
|
void close_ui();
|
|
bool is_ui_showed();
|
|
|
|
static CrackerUI& get_instance();
|
|
|
|
private:
|
|
ImVec2 m_constrain_min;
|
|
ImVec2 m_constrain_max;
|
|
float m_font_size = 25.0;
|
|
bool m_has_inited = false;
|
|
std::atomic<bool> m_is_show_ui = false;
|
|
int m_all_ship_properties = 0;
|
|
Cracker::Config m_cracker_config;
|
|
};
|
|
|
|
void ui_eglSwapBuffers(EGLDisplay dpy, EGLSurface surface);
|
|
|
|
|
|
#endif //UI_HPP
|