成就系统 巨大修改 新的ui 黑白效果 等一堆

This commit is contained in:
FloatGaming
2026-01-23 18:43:23 +08:00
parent f3ece026ca
commit 0e47864569
256 changed files with 134131 additions and 31192 deletions
+5 -4
View File
@@ -211,8 +211,8 @@ public class graphicSettings : MonoBehaviour
}
else
{
style &= ~WS_OVERLAPPEDWINDOW;
style |= WS_POPUP;
style &= ~((int)WS_OVERLAPPEDWINDOW);
style |= (int)WS_POPUP;
}
SetWindowLong32(hWnd, GWL_STYLE, style);
SetWindowPos(hWnd, IntPtr.Zero, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER | SWP_FRAMECHANGED);
@@ -379,7 +379,8 @@ public class graphicSettings : MonoBehaviour
// Determine current setting
int saved = PlayerPrefs.GetInt("frameRateIndex", -999);
int selectIndex = 2; // default to 60
// default to 90hz instead of unlimited
int selectIndex = 3; // index for 90
if (saved != -999 && saved >= 0 && saved < fpsOptions.Count)
{
selectIndex = saved;
@@ -392,7 +393,7 @@ public class graphicSettings : MonoBehaviour
{
int current = Application.targetFrameRate;
if (current <= 0)
selectIndex = fpsOptions.Count - 2; // unlimited
selectIndex = 3; // default to 90 when targetFrameRate is unset/unlimited
else
{
// find nearest match
@@ -6,6 +6,10 @@ using System.Collections.Generic;
public class selectSettingsOptions : MonoBehaviour
{
[Header("esc")]
public Button escButton;
public GameObject selfGO;
[Header("用户")]
public Button userSettingsButton;
public GameObject userSettingsGameObject;
@@ -76,6 +80,12 @@ public class selectSettingsOptions : MonoBehaviour
// default select userSettings
if (userSettingsButton != null)
SelectOptionByButton(userSettingsButton);
// listen for esc to close this panel if active
if (escButton != null && selfGO != null)
{
escButton.onClick.AddListener(OnEscButtonClicked);
}
}
void OnDestroy()
@@ -86,6 +96,19 @@ public class selectSettingsOptions : MonoBehaviour
opt.button.onClick.RemoveAllListeners();
RemoveEventTrigger(opt.button);
}
if (escButton != null && selfGO != null)
{
escButton.onClick.RemoveListener(OnEscButtonClicked);
}
}
private void OnEscButtonClicked()
{
if (selfGO != null && selfGO.activeSelf)
{
selfGO.SetActive(false);
}
}
void AddOption(Button btn, GameObject panel, Image mark)