Files
ichni_Official/Assets/Scripts/UI/Settings/GraphicsSettingsWindow.cs

38 lines
1.3 KiB
C#
Raw Normal View History

2025-08-11 14:04:06 -04:00
using System.Collections;
using System.Collections.Generic;
using Ichni.UI;
using UnityEngine;
namespace Ichni.Menu
{
public class GraphicsSettingsWindow : SettingsWindow
{
public ValueModifier resolutionLevelModifier;
public ValueModifier targetFrameModifier;
public override void Initialize()
{
2025-08-27 21:45:18 -04:00
resolutionLevelModifier.SetUp(gameSettings.resolutionLevel, 1, "Menu UI/Settings_Resolution_Level");
2025-08-11 14:04:06 -04:00
resolutionLevelModifier.SetMinMax(0, 5);
resolutionLevelModifier.updateValueAction = () =>
{
gameSettings.resolutionLevel = resolutionLevelModifier.GetValue();
gameSettings.ApplyGraphic();
};
2025-08-27 21:45:18 -04:00
targetFrameModifier.SetUp(gameSettings.targetFrame, 30, "Menu UI/Settings_Target_Frame");
2025-08-11 14:04:06 -04:00
targetFrameModifier.SetMinMax(30, 120);
targetFrameModifier.updateValueAction = () =>
{
gameSettings.targetFrame = targetFrameModifier.GetValue();
gameSettings.ApplyGraphic();
};
}
public override void SetValuesFromSettings()
{
resolutionLevelModifier.SetValue(gameSettings.resolutionLevel);
targetFrameModifier.SetValue(gameSettings.targetFrame);
}
}
}