summaryrefslogtreecommitdiff
path: root/src/interface/ScrollPanel.h
blob: fc54b31356e6422310e55e681bba1343aed5dba2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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 Draw(const Point& screenPos);
		virtual void XTick(float dt);
		virtual void XOnMouseWheelInside(int localx, int localy, int d);
	};
}