mirror of
https://github.com/enduro2d/enduro2d.git
synced 2025-12-14 16:09:06 +07:00
layout item gizmos
This commit is contained in:
@@ -108,6 +108,7 @@ namespace e2d
|
||||
static const char* title;
|
||||
|
||||
void operator()(gcomponent<layout_item>& c) const;
|
||||
void operator()(gcomponent<layout_item>& c, gizmos_context& ctx) const;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -175,4 +175,14 @@ namespace e2d
|
||||
c->size(size);
|
||||
}
|
||||
}
|
||||
|
||||
void component_inspector<layout_item>::operator()(
|
||||
gcomponent<layout_item>& c,
|
||||
gizmos_context& ctx) const
|
||||
{
|
||||
ctx.draw_wire_rect(
|
||||
c->size() * 0.5f,
|
||||
c->size(),
|
||||
ctx.selected() ? color32(255,255,255) : color32(127,127,127));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user