38 float x1 ,
float y1 ,
float x2 ,
float y2,
39 float tX1,
float tY1,
float tX2,
float tY2) :
41 _r(1.0f), _g(1.0f), _b(1.0f), _a(1.0f), _angle(0.0f),
42 _x1 (x1) , _y1 (y1) , _x2 (x2) , _y2 (y2) ,
43 _tX1(tX1), _tY1(tY1), _tX2(tX2), _tY2(tY2),
44 _scissorX(0), _scissorY(0), _scissorWidth(0), _scissorHeight(0),
45 _xor(false), _scissor(false), _additiveBlending(false) {
66 float x1 ,
float y1 ,
float x2 ,
float y2,
67 float tX1,
float tY1,
float tX2,
float tY2) :
69 _r(1.0f), _g(1.0f), _b(1.0f), _a(1.0f), _angle(0.0f),
70 _x1 (x1) , _y1 (y1) , _x2 (x2) , _y2 (y2) ,
71 _tX1(tX1), _tY1(tY1), _tX2(tX2), _tY2(tY2),
72 _scissorX(0), _scissorY(0), _scissorWidth(0), _scissorHeight(0),
73 _xor(false), _scissor(false), _additiveBlending(false) {
94 float x1 ,
float y1 ,
float x2 ,
float y2,
95 float tX1,
float tY1,
float tX2,
float tY2) :
97 _texture(texture), _r(1.0f), _g(1.0f), _b(1.0f), _a(1.0f), _angle(0.0f),
98 _x1 (x1) , _y1 (y1) , _x2 (x2) , _y2 (y2) ,
99 _tX1(tX1), _tY1(tY1), _tX2(tX2), _tY2(tY2),
100 _scissorX(0), _scissorY(0), _scissorWidth(0), _scissorHeight(0),
101 _xor(false), _scissor(false), _additiveBlending(false) {
229 if ((x <
_x1) || (x >
_x2))
231 if ((y <
_y1) || (y >
_y2))
251 glPushAttrib(GL_COLOR_BUFFER_BIT);
252 glBlendFunc(GL_ONE, GL_ONE);
256 glEnable(GL_COLOR_LOGIC_OP);
261 glEnable(GL_SCISSOR_TEST);
263 glGetIntegerv(GL_VIEWPORT, viewport);
272 glRotatef(
_angle, 0.0f, 0.0f, 1.0f);
288 glDisable(GL_SCISSOR_TEST);
291 glDisable(GL_COLOR_LOGIC_OP);
297 glColor4f(1.0f, 1.0f, 1.0f, 1.0f);
void setScissor(int x, int y, int width, int height)
Set the scissor test parameters.
void setHeight(float h)
Set the quad's height.
Only render transparent parts.
const TXI & getTXI() const
Return the TXI.
Texture & getTexture() const
virtual void hide()
Hide the object.
A class holding an UTF-8 string.
#define TextureMan
Shortcut for accessing the texture manager.
double _distance
The distance of the object from the viewer.
void setWidth(float w)
Set the quad's width.
The Aurora texture manager.
float getWidth() const
Return the quad's width.
void unlockFrameIfVisible()
void lockFrameIfVisible()
void setColor(float r, float g, float b, float a)
Set the current color of the quad.
void setXOR(bool enabled)
Enable/Disable XOR mode.
void getColor(float &r, float &g, float &b, float &a) const
Get the current color of the quad.
Utility templates and functions.
void setRotation(float angle)
Set the current rotation of the quad in degrees.
GUIQuad(const Common::UString &texture, float x1, float y1, float x2, float y2, float tX1=0.0f, float tY1=0.0f, float tX2=1.0f, float tY2=1.0f)
bool empty() const
Is the string empty?
bool isIn(float x, float y) const
Is the point within the quad?
void getPosition(float &x, float &y, float &z) const
Get the current position of the quad.
A texture as used in the Aurora engines.
void setTexture(const Common::UString &texture)
Set the current texture of the quad.
void setPosition(float x, float y, float z=-FLT_MAX)
Set the current position of the quad.
const Features & getFeatures() const
void render(RenderPass pass)
Render the object.
A textured quad for a GUI element.
float getHeight() const
Return the quad's height.
Only render opaque parts.
void calculateDistance()
Calculate the object's distance.