Add a terrible maze generation algorithm to test if a maze style map looks/feels better. The walls are disabled so you can walk around.
This commit is contained in:
parent
6cbfcf993e
commit
7a0b2f988d
9 changed files with 207 additions and 52 deletions
|
@ -15,11 +15,11 @@ namespace gui {
|
|||
$gui.position(STATUS_UI_X, STATUS_UI_Y, STATUS_UI_WIDTH, STATUS_UI_HEIGHT);
|
||||
$gui.layout(
|
||||
"[ ritual_ui ]"
|
||||
"[inv_slot1 | inv_slot2 | inv_slot3]"
|
||||
"[inv_slot4 | inv_slot5 | inv_slot6]"
|
||||
"[*%(200,300)character_view|_|stat1]"
|
||||
"[_|_|stat2]"
|
||||
"[_|_|stat3]");
|
||||
"[inv_1|inv_2|inv_3]"
|
||||
"[inv_4|*%(200,300)character_view|_|inv_5]"
|
||||
"[inv_6|_|_ |inv_7]"
|
||||
"[inv_8|_|_ |inv_9]"
|
||||
"[inv_10|inv_11|inv_12]");
|
||||
|
||||
size_t inv_id = 0;
|
||||
for(auto [name, entity] : $gui.$name_ents) {
|
||||
|
@ -37,14 +37,9 @@ namespace gui {
|
|||
auto char_view = $gui.entity(name);
|
||||
$gui.set<Rectangle>(char_view, {});
|
||||
$gui.set<Sprite>(char_view, {"peasant_girl"});
|
||||
} else if(name.starts_with("stat")) {
|
||||
auto stat = $gui.entity(name);
|
||||
$gui.set<Rectangle>(stat, {});
|
||||
$gui.set<Label>(stat, {guecs::to_wstring(name)});
|
||||
} else {
|
||||
auto button = $gui.entity(name);
|
||||
$gui.set<Rectangle>(button, {});
|
||||
$gui.set<Textual>(button, {L""});
|
||||
$gui.set<ActionData>(button, {make_any<string>(name)});
|
||||
|
||||
if(name == "ritual_ui") {
|
||||
|
@ -53,6 +48,7 @@ namespace gui {
|
|||
});
|
||||
$gui.set<Sound>(button, {"pickup"});
|
||||
} else {
|
||||
$gui.set<Textual>(button, {guecs::to_wstring(name)});
|
||||
$gui.set<Clickable>(button, {
|
||||
[this](auto ent, auto data){ select_slot(ent, data); }
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue