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:
parent
6f91533950
commit
b311713064
5 changed files with 12 additions and 2 deletions
|
@ -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); }};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue