⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 guiappbutton.h

📁 老外为HGE写的扩展GUI
💻 H
字号:
#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 + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -