2013-03-13 15:55:39 +00:00
|
|
|
#ifndef _GWEN_USER_INTERFACE_H
|
|
|
|
#define _GWEN_USER_INTERFACE_H
|
|
|
|
|
|
|
|
struct GwenInternalData;
|
|
|
|
|
2013-04-29 06:11:10 +00:00
|
|
|
typedef void (*b3ComboBoxCallback) (int combobox, const char* item);
|
|
|
|
typedef void (*b3ToggleButtonCallback)(int button, int state);
|
2013-03-13 15:55:39 +00:00
|
|
|
|
|
|
|
class GwenUserInterface
|
|
|
|
{
|
|
|
|
GwenInternalData* m_data;
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
GwenUserInterface();
|
|
|
|
|
|
|
|
virtual ~GwenUserInterface();
|
|
|
|
|
|
|
|
void init(int width, int height,struct sth_stash* stash,float retinaScale);
|
|
|
|
|
|
|
|
void draw(int width, int height);
|
|
|
|
|
|
|
|
void resize(int width, int height);
|
|
|
|
|
|
|
|
bool mouseMoveCallback( float x, float y);
|
|
|
|
bool mouseButtonCallback(int button, int state, float x, float y);
|
|
|
|
|
2013-04-29 06:11:10 +00:00
|
|
|
void setToggleButtonCallback(b3ToggleButtonCallback callback);
|
2014-01-26 19:27:20 +00:00
|
|
|
b3ToggleButtonCallback getToggleButtonCallback();
|
|
|
|
|
2013-03-13 15:55:39 +00:00
|
|
|
void registerToggleButton(int buttonId, const char* name);
|
|
|
|
|
2013-04-29 06:11:10 +00:00
|
|
|
void setComboBoxCallback(b3ComboBoxCallback callback);
|
2014-01-26 19:27:20 +00:00
|
|
|
b3ComboBoxCallback getComboBoxCallback();
|
2013-12-20 06:14:37 +00:00
|
|
|
void registerComboBox(int buttonId, int numItems, const char** items, int startItem = 0);
|
2013-03-13 15:55:39 +00:00
|
|
|
|
|
|
|
void setStatusBarMessage(const char* message, bool isLeft=true);
|
2014-01-26 19:27:20 +00:00
|
|
|
|
|
|
|
GwenInternalData* getInternalData()
|
|
|
|
{
|
|
|
|
return m_data;
|
|
|
|
}
|
|
|
|
|
2013-03-13 15:55:39 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif //_GWEN_USER_INTERFACE_H
|
|
|
|
|