Eraser tweaks
This commit is contained in:
parent
2ffbbfa5af
commit
e28a07b4e3
1 changed files with 7 additions and 3 deletions
|
|
@ -1512,10 +1512,14 @@ namespace gmtk
|
|||
{
|
||||
if (selected_)
|
||||
{
|
||||
if (map_.world.index<index>().find(*selected_))
|
||||
if (auto entity = map_.world.index<index>().find(*selected_))
|
||||
{
|
||||
gfx::color_rgba color = {255, 128, 128, 255};
|
||||
draw_selection(selected_->bbox(), painter_, color, true);
|
||||
auto acc = map_.world.get(*entity);
|
||||
if (*active_card_ != card_type::eraser || (!acc.contains<source>() && !acc.contains<lab>()))
|
||||
{
|
||||
gfx::color_rgba color = {255, 128, 128, 255};
|
||||
draw_selection(selected_->bbox(), painter_, color, true);
|
||||
}
|
||||
}
|
||||
else if (*active_card_ != card_type::eraser)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue