guiappbutton.h
来自「老外为HGE写的扩展GUI」· C头文件 代码 · 共 37 行
H
37 行
#ifndef __GUIAPPBUTTON_H__
#define __GUIAPPBUTTON_H__
#include "hgesprite.h"
#include "guiappobj.h"
class GUIAppButton : public GUIAppObject {
public:
GUIAppButton(int id, float x, float y, const char *file);
GUIAppButton(int id, float x, float y, float w, float h, HTEXTURE tex, float tx, float ty);
virtual ~GUIAppButton();
void SetMode(bool _bTrigger) { bTrigger=_bTrigger; }
void SetState(bool _bPressed) { bPressed=_bPressed; }
bool GetState() const { return bPushed; }
float GetWidth();
float GetHeight();
void SetPos(float x, float y );
virtual void Render();
virtual void Move(float dx, float dy);
virtual bool MouseLButton(bool bDown);
virtual void Focus(bool focus);
virtual void Selected(bool focus);
virtual bool KeyClick(int key, int chr );
private:
bool bTrigger;
bool bPressed;
bool bPushed;
bool bOldState;
bool inFocus;
hgeSprite *sprDef;
hgeSprite *sprUp;
hgeSprite *sprDown;
};
#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?