Quick prototype of how switch to an icon during pickup makes the rendering bug go away and also looks better visually.

This commit is contained in:
Zed A. Shaw 2025-07-22 01:08:48 -04:00
parent 6f91533950
commit b311713064
5 changed files with 12 additions and 2 deletions

View file

@ -75,7 +75,7 @@ namespace gui {
dbc::check($level.world->has<components::Sprite>(item),
"item in inventory UI doesn't exist in world. New level?");
auto& sprite = $level.world->get<components::Sprite>(item);
$gui.set_init<guecs::Sprite>(id, {sprite.name});
$gui.set_init<guecs::Sprite>(id, {fmt::format("{}_ICON", sprite.name)});
guecs::GrabSource grabber{
item, [&, id]() { return remove_slot(id); }};