1
0
Fork 0
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:
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

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(());
}