Big changes to use the new lel-guecs setup but now almost everything works. Only thing missing is Issue #16 in quecs.

This commit is contained in:
Zed A. Shaw 2025-07-23 14:03:41 -04:00
parent 86ddfc460f
commit d93bc1615c
14 changed files with 51 additions and 59 deletions

View file

@ -17,15 +17,15 @@ namespace gui {
$gui.position(STATUS_UI_X, STATUS_UI_Y, STATUS_UI_WIDTH, STATUS_UI_HEIGHT);
$gui.layout(
"[ritual_ui]"
"[earring|armor_head|amulet]"
"[back|*%(200,300)character_view|_|armor_bdy]"
"[hand_r|_|_ |hand_l]"
"[ring_r|_|_ |ring_l]"
"[pocket_r|armor_leg|pocket_l]");
"[=earring|=armor_head|=amulet]"
"[=back|=*%(200,300)character_view|_|=armor_bdy]"
"[=hand_r|_|_ |=hand_l]"
"[=ring_r|_|_ |=ring_l]"
"[=pocket_r|=armor_leg|=pocket_l]");
}
void StatusUI::init() {
$gui.set<Background>($gui.MAIN, {$gui.$parser});
$gui.set<Background>($gui.MAIN, {$gui.$parser, });
for(auto& [name, cell] : $gui.cells()) {
auto gui_id = $gui.entity(name);
@ -43,7 +43,7 @@ namespace gui {
});
$gui.set<Sound>(gui_id, {"pickup"});
} else {
$gui.set<Textual>(gui_id, {guecs::to_wstring(name)});
$gui.set<Text>(gui_id, {guecs::to_wstring(name)});
$gui.set<Clickable>(gui_id, {
guecs::make_action($level, Events::GUI::INV_SELECT, {gui_id})
});