Converting between bevy and egui types
ThomasAlban opened this issue · comments
Thomas Alban commented
Is there currently any easy way to convert between Bevy and Egui's types (such as Vec2
, Vec3
, Pos2
, Rect
, etc)?
In my code I often find myself needing to do things like this:
let rect = egui::Rect {
min: Pos2 {
x: viewport_rect.min.x,
y: viewport_rect.min.y,
},
max: Pos2 {
x: viewport_rect.max.x,
y: viewport_rect.max.y,
},
};
It would be nice if bevy_egui
implemented easy ways to convert (if it doesn't already and I'm not missing it!)