游戏内UI(InGameUI)侧边栏增加缩放比例设置,可以单独以模拟器平台为单位设置缩放模式

This commit is contained in:
ALIENJACK\alien 2025-01-07 13:52:14 +08:00
parent 25aea138e1
commit 7acb2883e9
4 changed files with 15 additions and 9 deletions

View File

@ -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);
}
/// <summary>
/// 根据缩放模式设置UI的缩放
/// </summary>

View File

@ -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);
}
}

View File

@ -1,6 +1,5 @@
using AxibugEmuOnline.Client.ClientCore;
using AxibugProtobuf;
using System;
using System.Collections.Generic;
using UnityEngine;

View File

@ -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));