diff --git a/Content/Common/Data/UI/Options.rml b/Content/Common/Data/UI/Options.rml
index c33fee1..dbb97ce 100644
--- a/Content/Common/Data/UI/Options.rml
+++ b/Content/Common/Data/UI/Options.rml
@@ -97,6 +97,15 @@
+
+
+
+ |
+
+
+ |
+
+
diff --git a/RbfxTemplate/SettingsMenuState.cs b/RbfxTemplate/SettingsMenuState.cs
index 3536508..c7942d1 100644
--- a/RbfxTemplate/SettingsMenuState.cs
+++ b/RbfxTemplate/SettingsMenuState.cs
@@ -24,9 +24,35 @@ public override void OnDataModelInitialized(GameRmlUIComponent menuComponent)
val => Settings.MusicVolume = val.Float);
menuComponent.BindDataModelProperty("effects", val => val.Set(Settings.EffectVolume),
val => Settings.EffectVolume = val.Float);
+ menuComponent.BindDataModelProperty("debughud", val => val.Set(GetDebugHUD()),
+ val => SetDebugHUD(val.Bool));
//menuComponent.BindDataModelProperty("shadows", val => val.Set(_shadowsQuality), (val) => _shadowsQuality = val.Convert(VariantType.VarInt).Int);
}
+ private void SetDebugHUD(bool value)
+ {
+ if (value)
+ {
+ Context.Engine.CreateDebugHud().Mode = DebugHudMode.DebughudShowAll;
+ }
+ else
+ {
+ var hud = GetSubsystem();
+ if (hud != null)
+ {
+ hud.Mode = DebugHudMode.DebughudShowNone;
+ }
+ }
+ }
+
+ private bool GetDebugHUD()
+ {
+ var hud = GetSubsystem();
+ if (hud == null)
+ return false;
+ return hud.Mode != DebugHudMode.DebughudShowNone;
+ }
+
public override void Activate(StringVariantMap bundle)
{
Settings = Application.Settings;