Skip to content

Commit

Permalink
Rename "Fast Flags" tab to "Engine settings"
Browse files Browse the repository at this point in the history
also remove debug flags
  • Loading branch information
pizzaboxer committed Oct 6, 2024
1 parent 65a7bb1 commit 8748b3c
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 71 deletions.
12 changes: 0 additions & 12 deletions Bloxstrap/FastFlagManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,6 @@ public class FastFlagManager : JsonManager<Dictionary<string, object>>
{
{ "Network.Log", "FLogNetwork" },

#if DEBUG
{ "HTTP.Log", "DFLogHttpTraceLight" },

{ "HTTP.Proxy.Enable", "DFFlagDebugEnableHttpProxy" },
{ "HTTP.Proxy.Address.1", "DFStringDebugPlayerHttpProxyUrl" },
{ "HTTP.Proxy.Address.2", "DFStringHttpCurlProxyHostAndPort" },
{ "HTTP.Proxy.Address.3", "DFStringHttpCurlProxyHostAndPortForExternalUrl" },
#endif

{ "Rendering.Framerate", "DFIntTaskSchedulerTargetFps" },
{ "Rendering.ManualFullscreen", "FFlagHandleAltEnterFullscreenManually" },
{ "Rendering.DisableScaling", "DFFlagDisableDPIScale" },
Expand All @@ -45,9 +36,6 @@ public class FastFlagManager : JsonManager<Dictionary<string, object>>

{ "UI.Hide", "DFIntCanHideGuiGroupId" },
{ "UI.FontSize", "FIntFontSizePadding" },
#if DEBUG
{ "UI.FlagState", "FStringDebugShowFlagState" },
#endif

{ "UI.FullscreenTitlebarDelay", "FIntFullscreenTitleBarTriggerDelayMillis" },

Expand Down
2 changes: 1 addition & 1 deletion Bloxstrap/Resources/Strings.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Bloxstrap/Resources/Strings.resx
Original file line number Diff line number Diff line change
Expand Up @@ -646,7 +646,7 @@ Do NOT use this to import large "flag lists" made by other people that promise t
<value>Rendering mode</value>
</data>
<data name="Menu.FastFlags.Title" xml:space="preserve">
<value>Fast Flags</value>
<value>Engine settings</value>
</data>
<data name="Menu.FontFiles" xml:space="preserve">
<value>Font files</value>
Expand Down
28 changes: 0 additions & 28 deletions Bloxstrap/UI/Elements/Settings/Pages/FastFlagsPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,34 +21,6 @@
<TextBlock Margin="0,2,0,0" FontSize="12" Text="{x:Static resources:Strings.Menu_FastFlags_Help_Description}" Padding="0,0,16,0" Foreground="{DynamicResource TextFillColorTertiaryBrush}" />
</StackPanel>
</ui:CardAction>

<controls:OptionControl
Header="{x:Static resources:Strings.Menu_FastFlags_ManagerEnabled_Title}"
Description="{x:Static resources:Strings.Menu_FastFlags_ManagerEnabled_Description}">
<ui:ToggleSwitch IsChecked="{Binding UseFastFlagManager, Mode=TwoWay}" />
</controls:OptionControl>

<StackPanel Visibility="{Binding ShowDebugFlags, Mode=OneTime}">
<TextBlock Text="Debug" FontSize="20" FontWeight="Medium" Margin="0,16,0,0" />

<controls:OptionControl
Header="HTTP request logging"
Description="Enables logging of HTTP requests (DFLogHttpTraceLight=12).">
<ui:ToggleSwitch IsChecked="{Binding HttpRequestLogging, Mode=TwoWay}" />
</controls:OptionControl>

<controls:OptionControl
Header="HTTP proxy address"
Description="Set blank if not using a proxy. Don't forget to add cacert.pem as a mod.">
<ui:TextBox Margin="5,0,0,0" Padding="10,5,10,5" Width="200" Text="{Binding HttpRequestProxy, Mode=TwoWay}" />
</controls:OptionControl>

<controls:OptionControl
Header="Flag state overlay"
Description="Show values of specified flags during runtime. Each flag is comma separated.">
<ui:TextBox Margin="5,0,0,0" Padding="10,5,10,5" Width="200" Text="{Binding StateOverlayFlags, Mode=TwoWay}" />
</controls:OptionControl>
</StackPanel>

<TextBlock Text="{x:Static resources:Strings.Common_Presets}" FontSize="20" FontWeight="Medium" Margin="0,16,0,0" />

Expand Down
29 changes: 0 additions & 29 deletions Bloxstrap/UI/ViewModels/Settings/FastFlagsViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,42 +18,13 @@ public class FastFlagsViewModel : NotifyPropertyChangedViewModel
private void OpenFastFlagEditor() => OpenFlagEditorEvent?.Invoke(this, EventArgs.Empty);

public ICommand OpenFastFlagEditorCommand => new RelayCommand(OpenFastFlagEditor);

#if DEBUG
public Visibility ShowDebugFlags => Visibility.Visible;
#else
public Visibility ShowDebugFlags => Visibility.Collapsed;
#endif

public bool UseFastFlagManager
{
get => App.Settings.Prop.UseFastFlagManager;
set => App.Settings.Prop.UseFastFlagManager = value;
}

public bool HttpRequestLogging
{
get => App.FastFlags.GetPreset("HTTP.Log") is not null;
set => App.FastFlags.SetPreset("HTTP.Log", value ? 12 : null);
}

public string HttpRequestProxy
{
get => App.FastFlags.GetPreset("HTTP.Proxy.Address.1") ?? "";

set
{
App.FastFlags.SetPreset("HTTP.Proxy.Enable", String.IsNullOrEmpty(value) ? null : true);
App.FastFlags.SetPreset("HTTP.Proxy.Address", String.IsNullOrEmpty(value) ? null : value);
}
}

public string StateOverlayFlags
{
get => App.FastFlags.GetPreset("UI.FlagState") ?? "";
set => App.FastFlags.SetPreset("UI.FlagState", String.IsNullOrEmpty(value) ? null : value);
}

public int FramerateLimit
{
get => int.TryParse(App.FastFlags.GetPreset("Rendering.Framerate"), out int x) ? x : 0;
Expand Down

0 comments on commit 8748b3c

Please sign in to comment.