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.
35 lines
954 B
35 lines
954 B
#pragma once
|
|
#include "gui/guecstra.hpp"
|
|
#include "levelmanager.hpp"
|
|
#include <SFML/Graphics/RenderWindow.hpp>
|
|
#include <SFML/Graphics/Font.hpp>
|
|
#include <guecs/ui.hpp>
|
|
#include "events.hpp"
|
|
#include "inventory.hpp"
|
|
|
|
namespace gui {
|
|
class LootUI {
|
|
public:
|
|
bool active = false;
|
|
guecs::UI $gui;
|
|
GameLevel $level;
|
|
std::unordered_map<guecs::Entity, std::string> $slot_to_name;
|
|
DinkyECS::Entity $target;
|
|
|
|
LootUI(GameLevel level);
|
|
|
|
void set_target(DinkyECS::Entity entity) {
|
|
$target = entity;
|
|
}
|
|
|
|
void init();
|
|
void update();
|
|
void render(sf::RenderWindow& window);
|
|
void update_level(GameLevel &level);
|
|
bool mouse(float x, float y, bool hover);
|
|
void make_button(const std::string &name, const std::wstring& label, Events::GUI event);
|
|
|
|
void remove_slot(guecs::Entity slot_id);
|
|
bool place_slot(guecs::Entity gui_id, DinkyECS::Entity world_entity);
|
|
};
|
|
}
|
|
|