From 7acb2883e9e8f56cf5f8f4366792af891b663389 Mon Sep 17 00:00:00 2001 From: "ALIENJACK\\alien" Date: Tue, 7 Jan 2025 13:52:14 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B8=B8=E6=88=8F=E5=86=85UI(InGameUI)?= =?UTF-8?q?=E4=BE=A7=E8=BE=B9=E6=A0=8F=E5=A2=9E=E5=8A=A0=E7=BC=A9=E6=94=BE?= =?UTF-8?q?=E6=AF=94=E4=BE=8B=E8=AE=BE=E7=BD=AE,=E5=8F=AF=E4=BB=A5?= =?UTF-8?q?=E5=8D=95=E7=8B=AC=E4=BB=A5=E6=A8=A1=E6=8B=9F=E5=99=A8=E5=B9=B3?= =?UTF-8?q?=E5=8F=B0=E4=B8=BA=E5=8D=95=E4=BD=8D=E8=AE=BE=E7=BD=AE=E7=BC=A9?= =?UTF-8?q?=E6=94=BE=E6=A8=A1=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AppMain/Manager/AppSettings/ScreenScaler.cs | 12 ++++++++++++ .../Assets/Script/AppMain/Manager/RomLib/RomLib.cs | 10 ++-------- .../Script/AppMain/UI/GamesUI/RomListMenuItem.cs | 1 - .../Assets/Script/AppMain/UI/InGameUI/InGameUI.cs | 1 + 4 files changed, 15 insertions(+), 9 deletions(-) diff --git a/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/AppSettings/ScreenScaler.cs b/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/AppSettings/ScreenScaler.cs index afabf2e2..228542ab 100644 --- a/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/AppSettings/ScreenScaler.cs +++ b/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/AppSettings/ScreenScaler.cs @@ -32,6 +32,18 @@ namespace AxibugEmuOnline.Client return (EnumScalerMode)setVal; } + public bool IsSetMode(RomPlatformType platform) + { + int setVal = PlayerPrefs.GetInt($"{nameof(ScreenScaler)}.PlatMode.{platform}", -1); + return setVal != -1; + } + + public void SetMode(RomPlatformType platform, EnumScalerMode? mode) + { + int setVal = mode == null ? -1 : (int)mode; + PlayerPrefs.SetInt($"{nameof(ScreenScaler)}.PlatMode.{platform}", setVal); + } + /// /// 根据缩放模式设置UI的缩放 /// diff --git a/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/RomLib/RomLib.cs b/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/RomLib/RomLib.cs index 3df00135..fef19578 100644 --- a/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/RomLib/RomLib.cs +++ b/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/RomLib/RomLib.cs @@ -135,10 +135,7 @@ namespace AxibugEmuOnline.Client { FetchPageCmd.Remove(page); SaveRomInfoFromWeb(resp); - }, - //TODO 平台参数 - AxibugProtobuf.RomPlatformType.Nes, - lastSearchKey, pageNo, PAGE_SIZE); + }, m_platform, lastSearchKey, pageNo, PAGE_SIZE); } else { @@ -146,10 +143,7 @@ namespace AxibugEmuOnline.Client { FetchPageCmd.Remove(page); SaveRomInfoFromWeb(resp); - }, - //TODO 平台参数 - AxibugProtobuf.RomPlatformType.Nes, - pageNo, PAGE_SIZE); + }, m_platform, pageNo, PAGE_SIZE); } } diff --git a/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/GamesUI/RomListMenuItem.cs b/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/GamesUI/RomListMenuItem.cs index 8da6736a..5a7241fa 100644 --- a/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/GamesUI/RomListMenuItem.cs +++ b/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/GamesUI/RomListMenuItem.cs @@ -1,6 +1,5 @@ using AxibugEmuOnline.Client.ClientCore; using AxibugProtobuf; -using System; using System.Collections.Generic; using UnityEngine; diff --git a/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/InGameUI/InGameUI.cs b/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/InGameUI/InGameUI.cs index 99c5c089..e650c4e8 100644 --- a/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/InGameUI/InGameUI.cs +++ b/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/InGameUI/InGameUI.cs @@ -42,6 +42,7 @@ namespace AxibugEmuOnline.Client m_stepPerformer = new StepPerformer(this); menus.Add(new InGameUI_FilterSetting(this)); + menus.Add(new InGameUI_Scaler(this)); menus.Add(new InGameUI_Reset(this)); menus.Add(new InGameUI_SaveState(this)); menus.Add(new InGameUI_LoadState(this));