blob: 7cf625be9e09ada187d2bf419f48462f1af87e5f (
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
26
27
28
29
30
31
32
33
|
#pragma once
#include <SFML/Graphics/RenderWindow.hpp>
#include <SFML/Graphics/Color.hpp>
#include <SFML/System/Vector2.hpp>
namespace dchat
{
class Scrollbar
{
public:
Scrollbar();
void draw(sf::RenderWindow &window);
float getScrollingForContent() const;
float width;
double maxHeight;
double scroll;
double maxScroll;
double scrollRelative;
sf::Vector2f position;
sf::Color backgroundColor;
sf::Color scrollColor;
private:
float height;
bool grabbing;
bool followMouse;
sf::Vector2f grabOffset;
};
}
|