You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
625 B
28 lines
625 B
#pragma once
|
|
#include "components.hpp"
|
|
#include "events.hpp"
|
|
#include <guecs/ui.hpp>
|
|
#include "textures.hpp"
|
|
|
|
namespace guecs {
|
|
Clickable make_action(DinkyECS::World& target, Events::GUI event);
|
|
Clickable make_action(DinkyECS::World& target, Events::GUI event, std::any data);
|
|
|
|
struct GrabSource : public Sprite {
|
|
void grab(sf::RenderWindow& window) {
|
|
window.setMouseCursorVisible(false);
|
|
sprite->setOrigin({128, 128});
|
|
}
|
|
|
|
void move(sf::Vector2i position) {
|
|
sprite->setPosition({
|
|
float(position.x),
|
|
float(position.y)
|
|
});
|
|
}
|
|
};
|
|
|
|
struct DropTarget {
|
|
|
|
};
|
|
}
|
|
|