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

📄 guiappobj.h

📁 老外为HGE写的扩展GUI
💻 H
字号:
#ifndef __GUIAPPOBJ_H__
#define __GUIAPPOBJ_H__

#include "hgegui.h"
#include "hgefont.h"
#include "hgevector.h"
#include "hgecolor.h"

class GUIAppWindow;

class GUIAppObject : public hgeGUIObject {
protected:
	GUIAppObject *parentwin;
	bool isSelected;
public:
	GUIAppObject () {
		parentwin = 0;
		isSelected = false;
	}

	virtual void SetParent (GUIAppObject*window) {
		parentwin = window;
	}
	
	virtual bool TestPoint(float x, float y) {
		return rect.TestPoint(x,y);
	}

	virtual void Selected ( bool selected ) {
		isSelected = selected;
	}

	virtual void OnEvent ( int id ) {
	}

	virtual float GetWidth () {
		return rect.x2 - rect.x1;
	}

	virtual float GetHeight () {
		return rect.y2 - rect.y1;
	}

	virtual void Move (float dx, float dy ) {
		rect.Set(rect.x1-dx,rect.y1-dy,rect.x2-dx,rect.y2-dy);
	}

	virtual bool IsSelected () {
		return isSelected;
	}
};


#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -