技能主要更新,修复卡顿并加入动画,以及各种其他更新。
This commit is contained in:
@@ -66,7 +66,7 @@ public class graphicSettings : MonoBehaviour
|
||||
{
|
||||
if (resolution_Dropdown == null) return;
|
||||
if (tempFreeResOptionIndex >= 0) return;
|
||||
var opt = new Dropdown.OptionData("自由分辨率");
|
||||
var opt = new Dropdown.OptionData("���ɷֱ���");
|
||||
resolution_Dropdown.options.Add(opt);
|
||||
tempFreeResOptionIndex = resolution_Dropdown.options.Count - 1;
|
||||
}
|
||||
@@ -84,7 +84,7 @@ public class graphicSettings : MonoBehaviour
|
||||
{
|
||||
if (screenMode_Dropdown == null) return;
|
||||
|
||||
var options = new List<string>() { "窗口(自由窗口)", "全屏(自适应)", "无边框窗口" };
|
||||
var options = new List<string>() { "����(���ɴ���)", "ȫ��(����Ӧ)", "�ޱ߿�" };
|
||||
screenMode_Dropdown.ClearOptions();
|
||||
screenMode_Dropdown.AddOptions(options);
|
||||
|
||||
@@ -141,21 +141,21 @@ public class graphicSettings : MonoBehaviour
|
||||
Screen.fullScreen = false;
|
||||
StopAllCoroutines();
|
||||
StartCoroutine(ApplyWindowStyleNextFrame(true));
|
||||
Screen.SetResolution(Screen.width, Screen.height, FullScreenMode.Windowed);
|
||||
Screen.SetResolution(Screen.width, Screen.height, FullScreenMode.Windowed, Screen.currentResolution.refreshRateRatio);
|
||||
}
|
||||
else if (index == 1)
|
||||
{
|
||||
Screen.fullScreenMode = FullScreenMode.ExclusiveFullScreen;
|
||||
Screen.fullScreen = true;
|
||||
Resolution res = Screen.currentResolution;
|
||||
Screen.SetResolution(res.width, res.height, FullScreenMode.ExclusiveFullScreen, res.refreshRate);
|
||||
Screen.SetResolution(res.width, res.height, FullScreenMode.ExclusiveFullScreen, res.refreshRateRatio);
|
||||
}
|
||||
else if (index == 2)
|
||||
{
|
||||
Screen.fullScreenMode = FullScreenMode.FullScreenWindow;
|
||||
Screen.fullScreen = true;
|
||||
Resolution res = Screen.currentResolution;
|
||||
Screen.SetResolution(res.width, res.height, FullScreenMode.FullScreenWindow, res.refreshRate);
|
||||
Screen.SetResolution(res.width, res.height, FullScreenMode.FullScreenWindow, res.refreshRateRatio);
|
||||
StopAllCoroutines();
|
||||
StartCoroutine(ApplyWindowStyleNextFrame(false));
|
||||
}
|
||||
@@ -271,7 +271,7 @@ public class graphicSettings : MonoBehaviour
|
||||
|
||||
foreach (var r in availableResolutions)
|
||||
{
|
||||
options.Add($"{r.x} × {r.y}");
|
||||
options.Add($"{r.x} �� {r.y}");
|
||||
}
|
||||
|
||||
resolution_Dropdown.ClearOptions();
|
||||
@@ -292,7 +292,7 @@ public class graphicSettings : MonoBehaviour
|
||||
{
|
||||
resolution_Dropdown.SetValueWithoutNotify(savedResIndex);
|
||||
var sav = availableResolutions[savedResIndex];
|
||||
Screen.SetResolution(sav.x, sav.y, Screen.fullScreenMode, Screen.currentResolution.refreshRate);
|
||||
Screen.SetResolution(sav.x, sav.y, Screen.fullScreenMode, Screen.currentResolution.refreshRateRatio);
|
||||
RemoveTempFreeOptionIfExists();
|
||||
}
|
||||
else if (savedResIndex == -1)
|
||||
@@ -301,9 +301,9 @@ public class graphicSettings : MonoBehaviour
|
||||
int ch = PlayerPrefs.GetInt("customResH", -1);
|
||||
if (cw > 0 && ch > 0)
|
||||
{
|
||||
Screen.SetResolution(cw, ch, Screen.fullScreenMode, Screen.currentResolution.refreshRate);
|
||||
Screen.SetResolution(cw, ch, Screen.fullScreenMode, Screen.currentResolution.refreshRateRatio);
|
||||
EnsureTempFreeOptionExists();
|
||||
resolution_Dropdown.options[tempFreeResOptionIndex].text = $"{cw} × {ch}";
|
||||
resolution_Dropdown.options[tempFreeResOptionIndex].text = $"{cw} �� {ch}";
|
||||
resolution_Dropdown.SetValueWithoutNotify(tempFreeResOptionIndex);
|
||||
}
|
||||
else
|
||||
@@ -336,7 +336,7 @@ public class graphicSettings : MonoBehaviour
|
||||
else
|
||||
{
|
||||
EnsureTempFreeOptionExists();
|
||||
resolution_Dropdown.options[tempFreeResOptionIndex].text = $"{Screen.width} × {Screen.height}";
|
||||
resolution_Dropdown.options[tempFreeResOptionIndex].text = $"{Screen.width} �� {Screen.height}";
|
||||
resolution_Dropdown.SetValueWithoutNotify(tempFreeResOptionIndex);
|
||||
}
|
||||
}
|
||||
@@ -355,8 +355,7 @@ public class graphicSettings : MonoBehaviour
|
||||
if (index >= availableResolutions.Count) return;
|
||||
var r = availableResolutions[index];
|
||||
FullScreenMode mode = Screen.fullScreenMode;
|
||||
int refresh = Screen.currentResolution.refreshRate;
|
||||
Screen.SetResolution(r.x, r.y, mode, refresh);
|
||||
Screen.SetResolution(r.x, r.y, mode, Screen.currentResolution.refreshRateRatio);
|
||||
PlayerPrefs.SetInt("resolutionIndex", index);
|
||||
PlayerPrefs.Save();
|
||||
|
||||
@@ -373,7 +372,7 @@ public class graphicSettings : MonoBehaviour
|
||||
{
|
||||
if (frameRate_Dropdown == null) return;
|
||||
|
||||
var fpsOptions = new List<string>() { "24", "30", "60", "90", "120", "144", "165", "210", "240", "300", "无限制", "垂直同步" };
|
||||
var fpsOptions = new List<string>() { "24", "30", "60", "90", "120", "144", "165", "210", "240", "300", "������", "��ֱͬ��" };
|
||||
frameRate_Dropdown.ClearOptions();
|
||||
frameRate_Dropdown.AddOptions(fpsOptions);
|
||||
|
||||
@@ -433,13 +432,13 @@ public class graphicSettings : MonoBehaviour
|
||||
}
|
||||
else if (index == fpsValues.Length)
|
||||
{
|
||||
// 无限制
|
||||
// ������
|
||||
QualitySettings.vSyncCount = 0;
|
||||
Application.targetFrameRate = -1; // unlimited / platform default
|
||||
}
|
||||
else if (index == fpsValues.Length + 1)
|
||||
{
|
||||
// 垂直同步
|
||||
// ��ֱͬ��
|
||||
QualitySettings.vSyncCount = 1; // enable vsync
|
||||
Application.targetFrameRate = -1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user