Exploring raycasters and possibly make a little "doom like" game based on it.
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.
 
 
 
 
 
 
raycaster/gui/loot_ui.hpp

35 lines
996 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"
namespace gui {
class LootUI {
public:
bool active = false;
guecs::UI $gui;
GameLevel $level;
std::unordered_map<DinkyECS::Entity, DinkyECS::Entity> contents;
DinkyECS::Entity $selected_entity;
LootUI(GameLevel level);
void init();
void update();
void render(sf::RenderWindow& window);
void update_level(GameLevel &level);
bool mouse(float x, float y, bool hover);
guecs::GrabSource& get_grab_source(DinkyECS::Entity entity);
std::optional<DinkyECS::Entity> begin_grab(DinkyECS::Entity slot);
void commit_grab(DinkyECS::Entity slot_id);
guecs::DropTarget& get_drop_target(DinkyECS::Entity gui_id);
void begin_drop(DinkyECS::Entity world_entity);
bool place_slot(DinkyECS::Entity id);
};
}