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/status_ui.hpp

38 lines
1.1 KiB

#pragma once
#include "levelmanager.hpp"
#include "constants.hpp"
#include <deque>
#include "textures.hpp"
#include <guecs/ui.hpp>
#include "gui/ritual_ui.hpp"
#include "gui/guecstra.hpp"
namespace gui {
class StatusUI {
public:
guecs::UI $gui;
std::unordered_map<DinkyECS::Entity, DinkyECS::Entity> $slots;
GameLevel $level;
ritual::UI $ritual_ui;
DinkyECS::Entity $selected_entity;
StatusUI(GameLevel level);
void select_ritual();
void update_level(GameLevel &level);
bool mouse(float x, float y, bool hover);
void init();
void render(sf::RenderWindow &window);
void update();
bool place_slot(DinkyECS::Entity gui_id);
guecs::GrabSource& get_grab_source(DinkyECS::Entity entity);
bool has_grab_source(DinkyECS::Entity gui_id);
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 entity);
bool commit_drop(DinkyECS::Entity entity);
};
}