summaryrefslogtreecommitdiff
path: root/src/widget_type.h
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2010-12-10 17:33:50 +0000
committerrubidium <rubidium@openttd.org>2010-12-10 17:33:50 +0000
commit0848d92af1dc3f99009c5ab271b15c06663898c3 (patch)
tree7671fafd4806f3dd24dee6c2127b4cacc21e8f5e /src/widget_type.h
parent91b043afbc86b22d9d98cd4f0c9c9e72e6f03a9f (diff)
downloadopenttd-0848d92af1dc3f99009c5ab271b15c06663898c3.tar.xz
(svn r21447) -Add: accessor function to get the direction of a scrollbar
Diffstat (limited to 'src/widget_type.h')
-rw-r--r--src/widget_type.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/widget_type.h b/src/widget_type.h
index 96d40d95c..54183b0d0 100644
--- a/src/widget_type.h
+++ b/src/widget_type.h
@@ -560,6 +560,15 @@ public:
}
/**
+ * Is the scrollbar vertical or not?
+ * @return True iff the scrollbar is vertical.
+ */
+ FORCEINLINE bool IsVertical() const
+ {
+ return this->is_vertical;
+ }
+
+ /**
* Sets the number of elements in the list
* @param num the number of elements in the list
* @note updates the position if needed