Initially implemented 'ritual blanket' UI for the crafting of rituals in combat.
This commit is contained in:
parent
263b7741f6
commit
65c9e4b0c6
5 changed files with 56 additions and 30 deletions
|
@ -10,7 +10,7 @@ namespace gui {
|
|||
using std::any, std::any_cast, std::string, std::make_any;
|
||||
|
||||
StatusUI::StatusUI(GameLevel level) :
|
||||
$level(level)
|
||||
$level(level), $ritual_ui(level)
|
||||
{
|
||||
$gui.position(STATUS_UI_X, STATUS_UI_Y, STATUS_UI_WIDTH, STATUS_UI_HEIGHT);
|
||||
$gui.layout(
|
||||
|
@ -55,14 +55,20 @@ namespace gui {
|
|||
}
|
||||
}
|
||||
|
||||
$ritual_ui = textures::get("ritual_crafting_area");
|
||||
$ritual_ui.sprite->setPosition({0,0});
|
||||
$ritual_ui.sprite->setTextureRect($ritual_closed_rect);
|
||||
$ritual_ui.init();
|
||||
$gui.init();
|
||||
}
|
||||
|
||||
bool StatusUI::mouse(float x, float y) {
|
||||
if($ritual_ui.is_open()) {
|
||||
return $ritual_ui.mouse(x, y);
|
||||
} else {
|
||||
return $gui.mouse(x, y);
|
||||
}
|
||||
}
|
||||
|
||||
void StatusUI::select_ritual() {
|
||||
dbc::log("ritual selected but no way to trigger it yet");
|
||||
$ritual_ui.toggle();
|
||||
}
|
||||
|
||||
void StatusUI::select_slot(DinkyECS::Entity ent, any slot_name) {
|
||||
|
@ -128,7 +134,7 @@ namespace gui {
|
|||
|
||||
void StatusUI::render(sf::RenderWindow &window) {
|
||||
$gui.render(window);
|
||||
window.draw(*$ritual_ui.sprite);
|
||||
$ritual_ui.render(window);
|
||||
}
|
||||
|
||||
void StatusUI::log(string msg) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue