i learned my lesson, i will be less lazy from now on
parent
e5101f6c7d
commit
ecdcf00b0f
|
@ -25,8 +25,8 @@ pub enum Callback
|
|||
|
||||
#[derive(Clone)]
|
||||
pub enum OpenWindows {
|
||||
ModelInfo,
|
||||
TestWind,
|
||||
ModelInfo
|
||||
}
|
||||
|
||||
pub struct Debug {
|
||||
|
@ -81,7 +81,9 @@ impl Debug {
|
|||
{
|
||||
match call {
|
||||
Callback::ModelInfo(a) =>
|
||||
Debug::displayModel(ui, &a),
|
||||
{
|
||||
Debug::displayModel(ui, &a)
|
||||
},
|
||||
Callback::TestWind(mut a) =>
|
||||
ret = Debug::displayTest(ui, &mut a),
|
||||
}
|
||||
|
|
13
src/scene.rs
13
src/scene.rs
|
@ -74,7 +74,7 @@ impl Scene{
|
|||
currentFrame: 0.0,
|
||||
deltaTime: 0.0,
|
||||
lastFrame: 0.0,
|
||||
DebugMode: false,
|
||||
DebugMode: true,
|
||||
selectedModel: 0,
|
||||
|
||||
};
|
||||
|
@ -117,20 +117,19 @@ impl Scene{
|
|||
}
|
||||
self.Car.Draw(&self.shaders[0]);
|
||||
|
||||
|
||||
if self.tempData.DebugMode{
|
||||
let mut Callbacks = Vec::new();
|
||||
let windows = self.debug.windows.clone();
|
||||
for i in 0..windows.len()
|
||||
for window in windows
|
||||
{
|
||||
|
||||
match &windows[i] {
|
||||
ModelInfo => Callbacks.push(debug::ModelInfo(&self.Car)),
|
||||
TestWind => Callbacks.push(debug::TestWind(self.tempData.spinSpeed, self.tempData.selectedModel)),
|
||||
match window {
|
||||
debug::OpenWindows::ModelInfo => Callbacks.push(debug::ModelInfo(&self.Car)),
|
||||
debug::OpenWindows::TestWind => Callbacks.push(debug::TestWind(self.tempData.spinSpeed, self.tempData.selectedModel)),
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
for command in self.debug.drawImgui(&events_loop, &window, Callbacks)
|
||||
{
|
||||
use crate::debug::dEvent;
|
||||
|
|
Loading…
Reference in New Issue