Icons now work way better and don't have the the 'Rayview cuts icons' bug. It actually was a bug in the lel-guecs Sprite class that was using the TextureRect from the source sprite. Now its initialized with the framesize from the .json. This also uses the new guecs::Icon, but I have to fix that as it doesn't scale correctly. Closes #2.
This commit is contained in:
parent
b311713064
commit
ff7111b006
22 changed files with 81 additions and 64 deletions
|
@ -21,11 +21,9 @@ namespace guecs {
|
|||
}
|
||||
|
||||
void GrabSource::setSprite(guecs::UI& gui, guecs::Entity gui_id) {
|
||||
dbc::check(gui.has<guecs::Sprite>(gui_id), "GrabSource given sprite gui_id that doesn't exist");
|
||||
dbc::check(gui.has<guecs::Icon>(gui_id), "GrabSource given sprite gui_id that doesn't exist");
|
||||
|
||||
fmt::println("> Grabsource Set sprite entity {}", world_entity);
|
||||
|
||||
auto& sp = gui.get<guecs::Sprite>(gui_id);
|
||||
auto& sp = gui.get<guecs::Icon>(gui_id);
|
||||
sprite = sp.sprite;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue