summaryrefslogtreecommitdiff
path: root/src/interface/ScrollPanel.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/interface/ScrollPanel.h')
-rw-r--r--src/interface/ScrollPanel.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/interface/ScrollPanel.h b/src/interface/ScrollPanel.h
new file mode 100644
index 0000000..ae2a4ce
--- /dev/null
+++ b/src/interface/ScrollPanel.h
@@ -0,0 +1,25 @@
+#pragma once
+
+#include "Panel.h"
+
+namespace ui
+{
+ class ScrollPanel: public Panel
+ {
+ protected:
+ int scrollBarWidth;
+ Point maxOffset;
+ float offsetX;
+ float offsetY;
+ float yScrollVel;
+ float xScrollVel;
+ public:
+ ScrollPanel(Point position, Point size);
+
+ int GetScrollLimit();
+
+ virtual void XDraw(const Point& screenPos);
+ virtual void XTick(float dt);
+ virtual void XOnMouseWheelInside(int localx, int localy, int d);
+ };
+} \ No newline at end of file