- 完善设置面板的具体功能,全局性的设置项已经可以发挥作用了

- 调整部分项目结构和AB包设置,打包测试设置面板的功能
This commit is contained in:
SepComet
2026-02-11 14:58:05 +08:00
parent 13583354f9
commit deb2c01d01
64 changed files with 536 additions and 1536 deletions
@@ -25,6 +25,7 @@ namespace UI
return null;
}
context.Controller = this;
_context = context;
if (_settingForm != null)
+3 -18
View File
@@ -1,13 +1,6 @@
//------------------------------------------------------------
// Game Framework
// Copyright © 2013-2021 Jiang Yin. All rights reserved.
// Homepage: https://gameframework.cn/
// Feedback: mailto:ellan@gameframework.cn
//------------------------------------------------------------
using System.Collections;
using System.Collections;
using System.Collections.Generic;
using StarForce;
using Sound;
using TMPro;
using UnityEngine;
using UnityEngine.UI;
@@ -51,7 +44,7 @@ namespace UI
public void PlayUISound(int uiSoundId)
{
GameEntry.Sound.PlayUISound(uiSoundId);
GameEntry.Sound.PlaySE(uiSoundId);
}
public static void SetMainFont(Font mainFont)
@@ -108,10 +101,6 @@ namespace UI
foreach (var text in tmp_texts)
{
text.font = _mainTMPFont;
if (!string.IsNullOrEmpty(text.text))
{
text.text = GameEntry.Localization.GetString(text.text);
}
}
}
@@ -125,10 +114,6 @@ namespace UI
foreach (var text in texts)
{
text.font = _mainFont;
if (!string.IsNullOrEmpty(text.text))
{
text.text = GameEntry.Localization.GetString(text.text);
}
}
}
}
@@ -46,15 +46,15 @@ namespace UI
var setting = context.Setting;
_bgmVolumeSlider.value = setting.BGMVolume;
_seVolumeSlider.value = setting.SEVolume;
_bgmVolumeSlider.value = setting.BGMVolume * 4;
_seVolumeSlider.value = setting.SEVolume * 4;
_allowBlinkGroup.SetValue(setting.AllowBlink);
_allowShakeGroup.SetValue(setting.AllowShake);
_dialogWindowAlpha.SetValue((int)setting.DialogWindowAlpha);
_playingSpeed.SetValue((int)setting.PlayingSpeed);
_playingSpeed.SetValue((int)setting.DialogPlayingSpeed);
_screenSolution.SetValue((int)setting.ScreenSolution);
_screenSolution.SetValue((int)setting.ScreenResolution);
_screenWindow.SetValue((int)setting.ScreenWindow);
_vSyncGroup.SetValue(setting.VSync);
_antiAliasingGroup.SetValue(setting.AntiAliasing);
@@ -77,15 +77,15 @@ namespace UI
{
var setting = new GameSetting
{
BGMVolume = _bgmVolumeSlider.value,
SEVolume = _seVolumeSlider.value,
BGMVolume = _bgmVolumeSlider.value / 4,
SEVolume = _seVolumeSlider.value / 4,
AllowShake = _allowShakeGroup.GetBoolValue(),
AllowBlink = _allowBlinkGroup.GetBoolValue(),
DialogWindowAlpha = (DialogWindowAlpha)_dialogWindowAlpha.GetIntValue(),
PlayingSpeed = (DialogPlayingSpeed)_playingSpeed.GetIntValue(),
DialogPlayingSpeed = (DialogPlayingSpeed)_playingSpeed.GetIntValue(),
ScreenSolution = (ScreenSolutionType)_screenSolution.GetIntValue(),
ScreenResolution = (ScreenResolutionType)_screenSolution.GetIntValue(),
ScreenWindow = (ScreenWindowType)_screenWindow.GetIntValue(),
VSync = _vSyncGroup.GetBoolValue(),
AntiAliasing = _antiAliasingGroup.GetBoolValue()
@@ -129,6 +129,7 @@ namespace UI
{
var setting = CollectSetting();
GameEntry.Event.Fire(this, SettingSaveEventArgs.Create(setting));
_controller.CloseUI();
}
}
}