as working as it was a few commits ago

pull/3/head
Milk.H 2023-03-23 13:50:51 +01:00
parent ecdcf00b0f
commit 0c39d1b1e4
No known key found for this signature in database
GPG Key ID: 3D9DAE46AAC37BD8
2 changed files with 13 additions and 7 deletions

View File

@ -101,20 +101,24 @@ impl Debug {
fn displayTest(ui: &mut imgui::Ui, testI: &mut info::testI) -> Vec<dEvent> fn displayTest(ui: &mut imgui::Ui, testI: &mut info::testI) -> Vec<dEvent>
{ {
let mut ret = Vec::new(); let mut ret = Vec::new();
let mut selectedModel = testI.selectedModel;
let mut spinSpeed = testI.spinSpeed;
ui.window("POLY I WILL FUCKING") ui.window("POLY I WILL FUCKING")
.size([500.0, 100.0], imgui::Condition::FirstUseEver) .size([500.0, 100.0], imgui::Condition::FirstUseEver)
.build(|| { .build(|| {
ui.text("you serve no purpose in life"); ui.text("you serve no purpose in life");
ui.text("Your Purpose in life is to suck my dick"); ui.text("Your Purpose in life is to suck my dick");
ui.slider("The Spin Speed", 0.1, 10.0, &mut testI.spinSpeed); ui.slider("The Spin Speed", 0.1, 10.0, &mut spinSpeed);
if ui if ui
.button("Quit") { .button("Quit") {
ret.push(dEvent::exit); ret.push(dEvent::exit);
} }
if ui.list_box("Select Model to Load", &mut testI.selectedModel, &MODELS, 5) { if ui.list_box("Select Model to Load", &mut selectedModel, &MODELS, 5) {
ret.push(dEvent::loadModel(testI.selectedModel)); ret.push(dEvent::loadModel(selectedModel));
} }
}); });
ret.push(dEvent::setTest(spinSpeed, selectedModel
));
ret ret
} }

View File

@ -74,7 +74,7 @@ impl Scene{
currentFrame: 0.0, currentFrame: 0.0,
deltaTime: 0.0, deltaTime: 0.0,
lastFrame: 0.0, lastFrame: 0.0,
DebugMode: true, DebugMode: false,
selectedModel: 0, selectedModel: 0,
}; };
@ -136,10 +136,12 @@ impl Scene{
match command match command
{ {
dEvent::exit => ret = SceneEnum::Exit, dEvent::exit => ret = SceneEnum::Exit,
dEvent::loadModel(i) => { dEvent::loadModel(i) => self.Car = Model::new(MODELS[i as usize], Arc::clone(&self.gl)),
self.Car = Model::new(MODELS[i as usize], Arc::clone(&self.gl)); dEvent::setTest(a, b) => {
self.tempData.spinSpeed = a;
self.tempData.selectedModel = b;
} }
_ => (),
} }
} }
} }