lowenware / dotrix

A 3D engine with ECS and Vulkan renderer for Rust developers
https://dotrix.rs
MIT License
292 stars 11 forks source link

Expose egui::Ui which was hidden by overlay::Ui #134

Closed QuantumEntangledAndy closed 2 years ago

QuantumEntangledAndy commented 2 years ago

This was an odd one. I was doing some Ui on my game and found that I needed a function that could take egui::Ui as input. Went ahead and imported it via dotrix::egui::Ui but got this:

error[E0603]: trait `Ui` is private
  --> src/gui/mod.rs:6:26
   |
6  | use dotrix::egui::{Egui, Ui};
   |                          ^^ private trait
   |
note: the trait `Ui` is defined here
  --> dotrix/dotrix_egui/src/lib.rs:20:31
   |
20 | use dotrix_overlay::{Overlay, Ui, Widget};
   |                               ^^

For more information about this error, try `rustc --explain E0603`.
error: could not compile `innermind` due to previous error

The overlay::Ui is hiding it.


This PR

Which ensures that all of egui is avaliable under a unique path in addition in case we have any more name clashes.

Alternativly we could add things like pub use egui::Ui as EguiUi when needed but we make run into issues with this again if add another similarly named object