From 823765175958a75ab05573a06403883d96098864 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Sat, 10 Jan 2009 15:34:18 +0000 Subject: minor ui cleanups --- src/ui/widget.cc | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) (limited to 'src/ui/widget.cc') 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; } -- cgit v1.2.3