Files
panopainter/engine/app.h

47 lines
1.1 KiB
C++

#pragma once
#include "shader.h"
#include "shape.h"
#include "texture.h"
#include "layout.h"
#include "font.h"
class App
{
public:
static App I;
Sampler sampler;
Texture2D tex;
LayoutManager layout;
NodeMessageBox* msgbox;
NodeSettings* settings;
NodePopupMenu* popup = nullptr;
NodePopupMenu* menu_file = nullptr;
NodePopupMenu* menu_edit = nullptr;
NodePopupMenu* menu_layers = nullptr;
NodeBorder* sidebar = nullptr;
NodePanelBrush* brushes;
NodePanelLayer* layers;
NodePanelColor* color;
NodePanelStroke* stroke;
const uint16_t main_id = const_hash("main");
float width;
float height;
#ifdef __ANDROID__
float zoom = 4.0;
#else
float zoom = 1.0;
#endif // __ANDROID__
void init();
void initShaders();
void initAssets();
void initLayout();
void create();
void clear();
void update(float dt);
void resize(float w, float h);
bool mouse_down(int button, float x, float y);
bool mouse_move(float x, float y);
bool mouse_up(int button, float x, float y);
};