Add debugger window for invincibility
This commit is contained in:
parent
890c297437
commit
0dbee1e854
|
@ -1,4 +1,4 @@
|
||||||
use imgui::{ CollapsingHeader, Condition, ImStr, ImString, Slider, Window};
|
use imgui::{CollapsingHeader, Condition, ImStr, ImString, Slider, Window};
|
||||||
use itertools::Itertools;
|
use itertools::Itertools;
|
||||||
|
|
||||||
use crate::framework::context::Context;
|
use crate::framework::context::Context;
|
||||||
|
@ -62,6 +62,19 @@ impl LiveDebugger {
|
||||||
self.selected_event = -1;
|
self.selected_event = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if state.settings.god_mode {
|
||||||
|
Window::new("God Mode Enabled [F3]")
|
||||||
|
.resizable(false)
|
||||||
|
.collapsed(true, Condition::Appearing)
|
||||||
|
.position([5.0, 100.0], Condition::FirstUseEver)
|
||||||
|
.size([180.0, 0.0], Condition::FirstUseEver)
|
||||||
|
.build(ui, || {
|
||||||
|
if ui.button("Disable") {
|
||||||
|
state.settings.god_mode = false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
if !state.debugger {
|
if !state.debugger {
|
||||||
return Ok(());
|
return Ok(());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue