Refactor the way assets are laid out in the assets/ dir and then have a build script that can automatically pixelate/posterize images that I save, saving me tons of time.
This commit is contained in:
parent
3dc70c3af6
commit
dc8648016d
108 changed files with 177 additions and 277 deletions
|
@ -170,9 +170,8 @@ namespace gui {
|
|||
int i = 0;
|
||||
for(auto& [item_id, item] : $blanket.contents) {
|
||||
auto slot_id = $gui.entity("inv_slot", i++);
|
||||
auto icon_name = fmt::format("{}-64", item);
|
||||
|
||||
$gui.set_init<Sprite>(slot_id, {icon_name});
|
||||
$gui.set_init<Sprite>(slot_id, {item});
|
||||
$gui.set<Clickable>(slot_id, {
|
||||
[&, slot_id, item_id](auto, auto) {
|
||||
auto data = std::make_any<SelectedItem>(slot_id, item_id);
|
||||
|
@ -223,13 +222,13 @@ namespace gui {
|
|||
|
||||
switch(ritual.element) {
|
||||
case FIRE:
|
||||
$gui.show_sprite("result_image", "broken_yoyo-64");
|
||||
$gui.show_sprite("result_image", "broken_yoyo");
|
||||
break;
|
||||
case LIGHTNING:
|
||||
$gui.show_sprite("result_image", "pocket_watch-64");
|
||||
$gui.show_sprite("result_image", "pocket_watch");
|
||||
break;
|
||||
default:
|
||||
$gui.show_sprite("result_image", "severed_finger-64");
|
||||
$gui.show_sprite("result_image", "severed_finger");
|
||||
}
|
||||
|
||||
$gui.set<Clickable>(combine, {
|
||||
|
@ -237,7 +236,7 @@ namespace gui {
|
|||
});
|
||||
} else {
|
||||
$gui.show_label("result_text", L"That won't work.");
|
||||
$gui.show_sprite("result_image", "dubious_combination-128");
|
||||
$gui.show_sprite("result_image", "dubious_combination");
|
||||
$gui.remove<Clickable>(combine);
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue