Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2009-01-10 15:34:18 +0000
committerStijn Buys <ingar@osirion.org>2009-01-10 15:34:18 +0000
commit823765175958a75ab05573a06403883d96098864 (patch)
treec72d876ab2d33169338e118593501fe95cf72939 /src/ui/widget.cc
parent8a64be76cf42b11880aea39f7309b185a8c3b7f5 (diff)
minor ui cleanups
Diffstat (limited to 'src/ui/widget.cc')
-rw-r--r--src/ui/widget.cc20
1 files changed, 16 insertions, 4 deletions
diff --git a/src/ui/widget.cc b/src/ui/widget.cc
index a7c667e..ef5d472 100644
--- a/src/ui/widget.cc
+++ b/src/ui/widget.cc
@@ -190,7 +190,19 @@ void Widget::set_font(const Font *font)
widget_font = font;
}
-void Widget::set_location(float const x, float const y)
+void Widget::set_geometry(const float x, const float y, const float w, const float h)
+{
+ widget_location.assign(x, y);
+ widget_size.assign(w, h);
+}
+
+void Widget::set_geometry(const math::Vector2f &location, const math::Vector2f &size)
+{
+ widget_location.assign(location);
+ widget_size.assign(size);
+}
+
+void Widget::set_location(const float x, const float y)
{
widget_location.assign(x, y);
}
@@ -200,7 +212,7 @@ void Widget::set_location(const math::Vector2f &location)
widget_location.assign(location);
}
-void Widget::set_size(float const w, float const h)
+void Widget::set_size(const float w, const float h)
{
widget_size.assign(w, h);
}
@@ -210,12 +222,12 @@ void Widget::set_size(const math::Vector2f &size)
widget_size.assign(size);
}
-void Widget::set_width(float const w)
+void Widget::set_width(const float w)
{
widget_size.x = w;
}
-void Widget::set_height(float const h)
+void Widget::set_height(const float h)
{
widget_size.y = h;
}