mirror of
https://github.com/doukutsu-rs/doukutsu-rs
synced 2024-11-22 13:42:47 +00:00
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 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(());
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue