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

📄 unifiedcoordsystem.pkg

📁 cegui界面库
💻 PKG
字号:
/***********************************************************************
	UDim
***********************************************************************/
class UDim
{
	float d_scale @ scale;
	float d_offset @ offset;

	float asAbsolute(float base) const;
	float asRelative(float base) const;

	UDim operator+ (const UDim& other) const;
	UDim operator- (const UDim& other) const;
	UDim operator/ (const UDim& other) const;
	UDim operator* (const UDim& other) const;

	bool operator== (const UDim& other) const;

	UDim();
	UDim(float scale, float offset);
};


/***********************************************************************
	UVector2
***********************************************************************/
class UVector2
{
	UDim d_x @ x;
	UDim d_y @ y;

	Vector2 asAbsolute(const Size& base) const;
	Vector2 asRelative(const Size& base) const;

	UVector2 operator+ (const UVector2& other) const;
	UVector2 operator- (const UVector2& other) const;
	UVector2 operator/ (const UVector2& other) const;
	UVector2 operator* (const UVector2& other) const;

	bool operator== (const UVector2& other) const;

	UVector2();
	UVector2(UDim& scale, UDim& offset);
};


/***********************************************************************
	URect
***********************************************************************/
class URect
{
	UVector2 d_min @ min;
	UVector2 d_max @ max;

	Rect asAbsolute(const Size& base) const;
	Rect asRelative(const Size& base) const;

	const UVector2& getPosition() const;
	UVector2 getSize() const;
	UDim getWidth() const;
	UDim getHeight() const;

	void setPosition(const UVector2& pos);
	void setSize(const UVector2& sz);
	void setWidth(const UDim& w);
	void setHeight(const UDim& h);

	void offset(const UVector2& sz);

	URect();
	URect(const UVector2& min, const UVector2& max);
	URect(const UDim& left, const UDim& top, const UDim& right, const UDim& bottom);
};

⌨️ 快捷键说明

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