Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
path: root/src/ui
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui')
-rw-r--r--src/ui/widget.h26
1 files changed, 22 insertions, 4 deletions
diff --git a/src/ui/widget.h b/src/ui/widget.h
index acee725..d8969cc 100644
--- a/src/ui/widget.h
+++ b/src/ui/widget.h
@@ -50,21 +50,39 @@ public:
return widget_size;
}
- /// left coordinate of location()
+ /// x coordinate of the left of the widget
/**
- * @see location
+ * @see location()
*/
inline float left() const {
return widget_location.x;
}
+
+ /// x coordinate of the right of the widget
+ /**
+ * @see location()
+ * @see size()
+ */
+ inline float right() const {
+ return widget_location.x + widget_size.x;
+ }
- /// top coordinate of location()
+ /// y coordinate of the top of the widget
/**
- * @see location
+ * @see location()
*/
inline float top() const {
return widget_location.y;
}
+
+ /// y coordinate of the bottom of the widget
+ /**
+ * @see location()
+ * @see size()
+ */
+ inline float bottom() const {
+ return widget_location.y + widget_size.y;
+ }
/// width of the widget in pixels
/**