SHA256
Finalize O5Kit Theme & Window Generation
This commit is contained in:
2 files changed
+11
-9
No files matched your search
@@ -59,9 +59,8 @@ internal static class RenderConfigWindow
|
||||
{
|
||||
Id = "RendererMod_RenderConfig",
|
||||
Title = LocalizationManager.Get("ui.render_config.window_title"),
|
||||
Size = new Vector2(580f, 480f),
|
||||
Draggable = true,
|
||||
Resizable = true,
|
||||
Size = new Vector2(900, 600), TopBarHeight = 40,
|
||||
Draggable = true, Resizable = true,
|
||||
ShowCloseButton = true
|
||||
});
|
||||
|
||||
@@ -126,7 +125,7 @@ internal static class RenderConfigWindow
|
||||
defaultValue: 60, min: 0.01, max: 3000, value: 60,
|
||||
format: "F3", clampMode: ClampMode.All,
|
||||
|
||||
sliderFilter: value => renderFpsSnap.OrderBy(n => Math.Abs(n - value)).First(),
|
||||
sliderFilter: value => Snap(renderFpsSnap, value),
|
||||
inputFilter: null, onComplete: null, onChanged: val => { config.RenderFPS = val; },
|
||||
text: LocalizationManager.Get("ui.render_config.render_fps"),
|
||||
id: "slider_render_fps", showFill: true
|
||||
@@ -137,7 +136,7 @@ internal static class RenderConfigWindow
|
||||
defaultValue: 60, min: 0.01, max: 600, value: 60,
|
||||
format: "F3", clampMode: ClampMode.All,
|
||||
|
||||
sliderFilter: value => videoFpsSnap.OrderBy(n => Math.Abs(n - value)).First(),
|
||||
sliderFilter: value => Snap(videoFpsSnap, value),
|
||||
inputFilter: null, onComplete: null, onChanged: val => { config.VideoFPS = val; },
|
||||
text: LocalizationManager.Get("ui.render_config.video_fps"),
|
||||
id: "slider_video_fps", showFill: true
|
||||
@@ -148,7 +147,7 @@ internal static class RenderConfigWindow
|
||||
defaultValue: 2560, min: 0, max: 15360, value: 2560,
|
||||
format: "F0", clampMode: ClampMode.All,
|
||||
|
||||
sliderFilter: value => renderWidthSnap.OrderBy(n => Math.Abs(n - value)).First(), inputFilter: value => Math.Max(value, 2),
|
||||
sliderFilter: value => Snap(renderWidthSnap, value), inputFilter: value => Math.Max(value, 2),
|
||||
onComplete: null, onChanged: val => { config.RenderWidth = (int)Math.Round(val); },
|
||||
text: LocalizationManager.Get("ui.render_config.render_width"),
|
||||
id: "slider_render_width", showFill: true
|
||||
@@ -159,7 +158,7 @@ internal static class RenderConfigWindow
|
||||
defaultValue: 1440, min: 0, max: 8640, value: 1440,
|
||||
format: "F0", clampMode: ClampMode.All,
|
||||
|
||||
sliderFilter: value => renderHeightSnap.OrderBy(n => Math.Abs(n - value)).First(), inputFilter: value => Math.Max(value, 2),
|
||||
sliderFilter: value => Snap(renderHeightSnap, value), inputFilter: value => Math.Max(value, 2),
|
||||
onComplete: null, onChanged: val => { config.RenderWidth = (int)Math.Round(val); },
|
||||
text: LocalizationManager.Get("ui.render_config.render_height"),
|
||||
id: "slider_render_height", showFill: true
|
||||
@@ -293,7 +292,7 @@ internal static class RenderConfigWindow
|
||||
defaultValue: 256, min: 64, max: 384, value: 256,
|
||||
format: "F0", clampMode: ClampMode.All,
|
||||
|
||||
sliderFilter: value => audioBitrateSnap.OrderBy(n => Math.Abs(n - value)).First(),
|
||||
sliderFilter: value => Snap(audioBitrateSnap, value),
|
||||
inputFilter: null, onComplete: null, onChanged: val => { config.AudioConfig.AudioBitrate = (int)Math.Round(val) * 1000; },
|
||||
text: LocalizationManager.Get("ui.render_config.audio_bitrate"),
|
||||
id: "slider_audio_bitrate", showFill: true
|
||||
@@ -465,6 +464,9 @@ internal static class RenderConfigWindow
|
||||
|
||||
return;
|
||||
|
||||
double Snap(double[] array, double value) =>
|
||||
array.OrderBy(n => Math.Abs(n - value)).First();
|
||||
|
||||
void UpdateVideoCodec(Codec codec)
|
||||
{
|
||||
_sampleRateDropdown?.SetValues(CodecUtil.AvailableSampleRate[CodecUtil.AudioCodecMatch[codec]]);
|
||||
|
||||
Reference in new issue
Block a user