#include "ritual_ui.hpp" #include "components.hpp" #include "guecs.hpp" #include "rand.hpp" #include "animation.hpp" #include "rand.hpp" #include "sound.hpp" namespace gui { using namespace guecs; using std::any, std::any_cast, std::string, std::make_any; RitualUI::RitualUI(GameLevel level) : $level(level) { $gui.position(STATUS_UI_X, STATUS_UI_Y, STATUS_UI_WIDTH, STATUS_UI_HEIGHT); $gui.layout( "[_]" "[inv_slot0 | inv_slot1 | inv_slot2| inv_slot3]" "[inv_slot4 | inv_slot5 | inv_slot6| inv_slot7]" "[inv_slot8 | inv_slot9 | inv_slot10| inv_slot11]" "[inv_slot12 | inv_slot13 | inv_slot14| inv_slot15]" "[reset |*%(200,400)result_text|_]" "[*%(100,200)result_image|_ |_]" "[_|_|_]" "[combine|_|_]" "[_|craft0|craft1|craft2|craft3|_]" "[_|craft4|craft5|craft6|craft7|_]" "[ ritual_ui ]"); } void RitualUI::init() { update_items(); auto combine = $gui.entity("combine"); $gui.set(combine, {0.4f}); $gui.set(combine, {"the_ritual_circle"}); $gui.set(combine, { [&](auto ent, auto){ combine_clicked(ent); } }); auto result_image = $gui.entity("result_image"); $gui.set(result_image, {"severed_finger-128"}); $gui.set(result_image, {10, {60, 60, 60, 30}}); auto result_text = $gui.entity("result_text"); $gui.set(result_text, {15, {60, 60, 60, 30}}); $gui.set(result_text, { L"Celiac migas\nunicorn hexagon.\nBrooklyn williamsburg\ntruffaut pickled\nchillwave raclette\nchurch-key sus.", 16, ColorValue::LIGHT_LIGHT, 10}); auto reset = $gui.entity("reset"); $gui.set(reset, {5, {60, 60, 60, 30}}); $gui.set