Add debugger window for invincibility

This commit is contained in:
dawnDus 2022-03-23 18:09:32 -04:00
parent 890c297437
commit 0dbee1e854
No known key found for this signature in database
GPG Key ID: 972AABDE81848F21
1 changed files with 14 additions and 1 deletions

View File

@ -1,4 +1,4 @@
use imgui::{ CollapsingHeader, Condition, ImStr, ImString, Slider, Window};
use imgui::{CollapsingHeader, Condition, ImStr, ImString, Slider, Window};
use itertools::Itertools;
use crate::framework::context::Context;
@ -62,6 +62,19 @@ impl LiveDebugger {
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 {
return Ok(());
}