rework map rendering

This commit is contained in:
Eduardo Bart
2012-01-29 22:00:12 -02:00
parent 4276bd680d
commit 9db7bd2602
62 changed files with 1244 additions and 752 deletions

View File

@@ -90,7 +90,7 @@ void UIWidget::drawChildren()
g_painter.setColor(Fw::green);
g_painter.drawBoundingRect(child->getRect());
}
//g_fonts.getDefaultFont()->renderText(child->getId(), child->getPos() + Point(2, 0), Fw::red);
//g_fonts.getDefaultFont()->renderText(child->getId(), child->getPosition() + Point(2, 0), Fw::red);
g_painter.setOpacity(oldOpacity);
}

View File

@@ -189,7 +189,7 @@ protected:
// function shortcuts
public:
void resize(int width, int height) { setRect(Rect(getPos(), Size(width, height))); }
void resize(int width, int height) { setRect(Rect(getPosition(), Size(width, height))); }
void move(int x, int y) { setRect(Rect(x, y, getSize())); }
void hide() { setVisible(false); }
void show() { setVisible(true); }
@@ -262,7 +262,7 @@ public:
void setWidth(int width) { resize(width, getHeight()); }
void setHeight(int height) { resize(getWidth(), height); }
void setSize(const Size& size) { resize(size.width(), size.height()); }
void setPos(const Point& pos) { move(pos.x, pos.y); }
void setPosition(const Point& pos) { move(pos.x, pos.y); }
void setColor(const Color& color) { m_color = color; }
void setBackgroundColor(const Color& color) { m_backgroundColor = color; }
void setBackgroundOffsetX(int x) { m_backgroundRect.setX(x); }
@@ -309,7 +309,7 @@ public:
int getX() { return m_rect.x(); }
int getY() { return m_rect.y(); }
Point getPos() { return m_rect.topLeft(); }
Point getPosition() { return m_rect.topLeft(); }
int getWidth() { return m_rect.width(); }
int getHeight() { return m_rect.height(); }
Size getSize() { return m_rect.size(); }

View File

@@ -55,7 +55,7 @@ void UIWidget::parseBaseStyle(const OTMLNodePtr& styleNode)
else if(node->tag() == "y")
setY(node->value<int>());
else if(node->tag() == "pos")
setPos(node->value<Point>());
setPosition(node->value<Point>());
else if(node->tag() == "width")
setWidth(node->value<int>());
else if(node->tag() == "height")