38 lines
No EOL
1,011 B
C++
Executable file
38 lines
No EOL
1,011 B
C++
Executable file
#pragma once
|
|
|
|
#include <vector>
|
|
#include "../../headers/gameobject.hpp"
|
|
#include "../../headers/clickable.hpp"
|
|
#include "../../headers/mouse.hpp"
|
|
|
|
namespace asloengine
|
|
{
|
|
|
|
class ScrollView : public GameObject, public virtual Clickable
|
|
{
|
|
|
|
public:
|
|
std::vector<GameObject *> objects;
|
|
bool needs_clean = false;
|
|
sf::Vector2f size;
|
|
float scroll_amount;
|
|
float max_scroll_amount;
|
|
float scroll_speed;
|
|
|
|
ScrollView(sf::String _name, sf::Vector2f _size, float _max_scroll_amount, float _scroll_speed = 25);
|
|
virtual ~ScrollView() override;
|
|
|
|
virtual void set_rotation(float _rotation);
|
|
|
|
virtual void draw() override;
|
|
virtual void on_start() override;
|
|
virtual void on_update(float delta_time) override;
|
|
virtual void clean();
|
|
virtual void on_destroy() override;
|
|
|
|
protected:
|
|
virtual sf::View change_view();
|
|
|
|
};
|
|
|
|
} |