-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
/
Copy pathofxPanel.h
39 lines (31 loc) · 1.11 KB
/
ofxPanel.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
#pragma once
#include "ofxGuiGroup.h"
#include "ofImage.h"
#ifndef TARGET_EMSCRIPTEN
constexpr const char* ofxPanelDefaultFilename = "settings.xml";
#else
constexpr const char* ofxPanelDefaultFilename = "settings.json";
#endif
class ofxGuiGroup;
class ofxPanel : public ofxGuiGroup {
public:
ofxPanel();
ofxPanel(const ofParameterGroup & parameters, const of::filesystem::path & filename=ofxPanelDefaultFilename, float x = 10, float y = 10);
~ofxPanel();
ofxPanel * setup(const std::string& collectionName="", const of::filesystem::path & filename=ofxPanelDefaultFilename, float x = 10, float y = 10);
ofxPanel * setup(const ofParameterGroup & parameters, const of::filesystem::path & filename=ofxPanelDefaultFilename, float x = 10, float y = 10);
bool mousePressed(ofMouseEventArgs & args);
bool mouseReleased(ofMouseEventArgs & args);
ofEvent<void> loadPressedE;
ofEvent<void> savePressedE;
protected:
void render();
bool setValue(float mx, float my, bool bCheck);
void generateDraw();
void loadIcons();
private:
ofRectangle loadBox, saveBox;
ofImage loadIcon, saveIcon;
glm::vec3 grabPt;
bool bGrabbed;
};