mirror of
https://github.com/bloxstraplabs/bloxstrap.git
synced 2025-04-21 18:11:27 -07:00
Add selector between Voxel and Future lighting
This commit is contained in:
parent
58fb73c127
commit
a7f0b14081
@ -20,8 +20,15 @@ namespace Bloxstrap.Singletons
|
|||||||
{
|
{
|
||||||
{ "Automatic", "" },
|
{ "Automatic", "" },
|
||||||
{ "Direct3D 11", "FFlagDebugGraphicsPreferD3D11" },
|
{ "Direct3D 11", "FFlagDebugGraphicsPreferD3D11" },
|
||||||
{ "OpenGL", "FFlagDebugGraphicsPreferOpenGL" },
|
{ "Vulkan", "FFlagDebugGraphicsPreferVulkan" },
|
||||||
{ "Vulkan", "FFlagDebugGraphicsPreferVulkan" }
|
{ "OpenGL", "FFlagDebugGraphicsPreferOpenGL" }
|
||||||
|
};
|
||||||
|
|
||||||
|
public static IReadOnlyDictionary<string, string> LightingTechnologies => new Dictionary<string, string>
|
||||||
|
{
|
||||||
|
{ "Automatic", "" },
|
||||||
|
{ "Voxel", "DFFlagDebugRenderForceTechnologyVoxel" },
|
||||||
|
{ "Future Is Bright", "FFlagDebugForceFutureIsBrightPhase3" }
|
||||||
};
|
};
|
||||||
|
|
||||||
// this is one hell of a variable definition lmao
|
// this is one hell of a variable definition lmao
|
||||||
|
@ -128,10 +128,33 @@ namespace Bloxstrap.ViewModels
|
|||||||
set => App.Settings.Prop.DisableFullscreenOptimizations = value;
|
set => App.Settings.Prop.DisableFullscreenOptimizations = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool ForceFutureEnabled
|
public IReadOnlyDictionary<string, string> LightingTechnologies => FastFlagManager.LightingTechnologies;
|
||||||
|
|
||||||
|
// this is basically the same as the code for rendering selection, maybe this could be abstracted in some way?
|
||||||
|
public string SelectedLightingTechnology
|
||||||
{
|
{
|
||||||
get => App.FastFlags.GetValue("FFlagDebugForceFutureIsBrightPhase3") == "True";
|
get
|
||||||
set => App.FastFlags.SetValue("FFlagDebugForceFutureIsBrightPhase3", value ? "True" : null);
|
{
|
||||||
|
foreach (var mode in LightingTechnologies)
|
||||||
|
{
|
||||||
|
if (App.FastFlags.GetValue(mode.Value) == "True")
|
||||||
|
return mode.Key;
|
||||||
|
}
|
||||||
|
|
||||||
|
return "Automatic";
|
||||||
|
}
|
||||||
|
|
||||||
|
set
|
||||||
|
{
|
||||||
|
foreach (var mode in LightingTechnologies)
|
||||||
|
{
|
||||||
|
if (mode.Key != "Automatic")
|
||||||
|
App.FastFlags.SetValue(mode.Value, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (value != "Automatic")
|
||||||
|
App.FastFlags.SetValue(LightingTechnologies[value], "True");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -154,11 +154,11 @@
|
|||||||
<ui:CardControl Grid.Row="5" Margin="0,8,0,0" Padding="16,13,16,12">
|
<ui:CardControl Grid.Row="5" Margin="0,8,0,0" Padding="16,13,16,12">
|
||||||
<ui:CardControl.Header>
|
<ui:CardControl.Header>
|
||||||
<StackPanel>
|
<StackPanel>
|
||||||
<TextBlock FontSize="14" Text="Force enable Future Is Bright lighting in all games" />
|
<TextBlock FontSize="14" Text="Lighting technology" />
|
||||||
<TextBlock Margin="0,2,0,0" FontSize="12" Text="Roblox's experimental lighting engine, normally only enabled by the game developer." Foreground="{DynamicResource TextFillColorTertiaryBrush}" />
|
<TextBlock Margin="0,2,0,0" FontSize="12" Text="Select which lighting technology should always be used in every game." Foreground="{DynamicResource TextFillColorTertiaryBrush}" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</ui:CardControl.Header>
|
</ui:CardControl.Header>
|
||||||
<ui:ToggleSwitch IsChecked="{Binding ForceFutureEnabled, Mode=TwoWay}" />
|
<ComboBox Margin="5,0,0,0" Padding="10,5,10,5" Width="200" ItemsSource="{Binding LightingTechnologies.Keys, Mode=OneTime}" Text="{Binding SelectedLightingTechnology, Mode=TwoWay}" />
|
||||||
</ui:CardControl>
|
</ui:CardControl>
|
||||||
<ui:CardControl Grid.Row="6" Margin="0,8,0,0" Padding="16,13,16,12">
|
<ui:CardControl Grid.Row="6" Margin="0,8,0,0" Padding="16,13,16,12">
|
||||||
<ui:CardControl.Header>
|
<ui:CardControl.Header>
|
||||||
|
Loading…
Reference in New Issue
Block a user