From 355042fc8464da0990925e4569b9ff7f3c841eb7 Mon Sep 17 00:00:00 2001 From: "ALIENJACK\\alien" Date: Tue, 7 Jan 2025 11:23:10 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E4=B8=89=E7=BA=A7=E8=99=9A=E6=8B=9F?= =?UTF-8?q?=E8=8F=9C=E5=8D=95=E9=87=8D=E8=BD=BD=E6=8E=A5=E5=8F=A3=E8=B0=83?= =?UTF-8?q?=E6=95=B4,=E7=8E=B0=E5=9C=A8=E5=8F=AF=E4=BB=A5=E5=9C=A8?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E4=B8=89=E7=BA=A7=E8=8F=9C=E5=8D=95=E6=97=B6?= =?UTF-8?q?,=E6=8C=87=E5=AE=9A=E9=BB=98=E8=AE=A4=E9=80=89=E4=B8=AD?= =?UTF-8?q?=E7=9A=84=E9=A1=B9=E7=9B=AE=20=E4=B8=BB=E8=8F=9C=E5=8D=95?= =?UTF-8?q?=E4=B8=AD=E7=9A=84=E7=94=BB=E9=9D=A2=E6=AF=94=E4=BE=8B=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE,=E5=9C=A8=E5=BC=B9=E5=87=BA=E6=97=B6=E4=BC=9A?= =?UTF-8?q?=E8=87=AA=E5=8A=A8=E9=80=89=E4=B8=AD=E5=BD=93=E5=89=8D=E5=B7=B2?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E7=9A=84=E9=80=89=E9=A1=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Assets/Resources/IMPORTENT.prefab | 228 ++++++++++++++++++ .../GlobalFilter_Template.prefab | 2 +- .../ScreenScaler_Template.prefab | 2 +- .../Manager/AppSettings/ScreenScaler.cs | 3 +- .../UI/BgSettingsUI/BackgroundListMenuItem.cs | 6 +- .../BgSettingsUI/GlobalFilterListMenuItem.cs | 4 +- .../BgSettingsUI/ScreenScalerListMenuItem.cs | 8 +- .../AppMain/UI/GamesUI/RomListMenuItem.cs | 4 +- .../AppMain/UI/ItemPresent/ItemPresent.cs | 6 +- .../AppMain/UI/ItemPresent/ItemProxy.cs | 3 +- .../Script/AppMain/UI/MenuItemController.cs | 4 +- .../AppMain/UI/RoomUI/RoomListMenuItem.cs | 6 +- .../Assets/Script/AppMain/UI/ThirdMenuRoot.cs | 6 +- .../Script/AppMain/UI/VirtualSubMenuItem.cs | 12 +- 14 files changed, 265 insertions(+), 29 deletions(-) diff --git a/AxibugEmuOnline.Client/Assets/Resources/IMPORTENT.prefab b/AxibugEmuOnline.Client/Assets/Resources/IMPORTENT.prefab index daddb18a..89847668 100644 --- a/AxibugEmuOnline.Client/Assets/Resources/IMPORTENT.prefab +++ b/AxibugEmuOnline.Client/Assets/Resources/IMPORTENT.prefab @@ -1388,6 +1388,10 @@ PrefabInstance: propertyPath: m_SizeDelta.y value: 0 objectReference: {fileID: 0} + - target: {fileID: 193475523204617150, guid: 450328d5a907c8249a60bc3980ba66f6, type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} - target: {fileID: 193475523204617150, guid: 450328d5a907c8249a60bc3980ba66f6, type: 3} propertyPath: m_AnchoredPosition.x value: 0 @@ -1436,6 +1440,10 @@ PrefabInstance: propertyPath: m_SizeDelta.x value: 0 objectReference: {fileID: 0} + - target: {fileID: 449160040343683211, guid: 450328d5a907c8249a60bc3980ba66f6, type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} - target: {fileID: 449160040343683211, guid: 450328d5a907c8249a60bc3980ba66f6, type: 3} propertyPath: m_AnchoredPosition.x value: 0 @@ -1508,6 +1516,14 @@ PrefabInstance: propertyPath: m_SizeDelta.x value: 0 objectReference: {fileID: 0} + - target: {fileID: 833899971404383597, guid: 450328d5a907c8249a60bc3980ba66f6, type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 833899971404383597, guid: 450328d5a907c8249a60bc3980ba66f6, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} - target: {fileID: 833899971404383597, guid: 450328d5a907c8249a60bc3980ba66f6, type: 3} propertyPath: m_AnchoredPosition.x value: 0 @@ -1532,6 +1548,10 @@ PrefabInstance: propertyPath: m_SizeDelta.y value: 0 objectReference: {fileID: 0} + - target: {fileID: 1029475975899771591, guid: 450328d5a907c8249a60bc3980ba66f6, type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} - target: {fileID: 1029475975899771591, guid: 450328d5a907c8249a60bc3980ba66f6, type: 3} propertyPath: m_AnchoredPosition.x value: 0 @@ -1552,6 +1572,14 @@ PrefabInstance: propertyPath: m_SizeDelta.x value: 0 objectReference: {fileID: 0} + - target: {fileID: 1055836741060224427, guid: 450328d5a907c8249a60bc3980ba66f6, type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1055836741060224427, guid: 450328d5a907c8249a60bc3980ba66f6, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} - target: {fileID: 1055836741060224427, guid: 450328d5a907c8249a60bc3980ba66f6, type: 3} propertyPath: m_AnchoredPosition.x value: 0 @@ -1588,6 +1616,14 @@ PrefabInstance: propertyPath: m_SizeDelta.x value: 0 objectReference: {fileID: 0} + - target: {fileID: 1258174585615042852, guid: 450328d5a907c8249a60bc3980ba66f6, type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1258174585615042852, guid: 450328d5a907c8249a60bc3980ba66f6, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} - target: {fileID: 1258174585615042852, guid: 450328d5a907c8249a60bc3980ba66f6, type: 3} propertyPath: m_AnchoredPosition.x value: 0 @@ -1608,6 +1644,14 @@ PrefabInstance: propertyPath: m_SizeDelta.x value: 0 objectReference: {fileID: 0} + - target: {fileID: 1579312852857843245, guid: 450328d5a907c8249a60bc3980ba66f6, type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1579312852857843245, guid: 450328d5a907c8249a60bc3980ba66f6, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} - target: {fileID: 1579312852857843245, guid: 450328d5a907c8249a60bc3980ba66f6, type: 3} propertyPath: m_AnchoredPosition.x value: 0 @@ -1792,6 +1836,10 @@ PrefabInstance: propertyPath: m_SizeDelta.x value: 0 objectReference: {fileID: 0} + - target: {fileID: 1748522118614936523, guid: 450328d5a907c8249a60bc3980ba66f6, type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} - target: {fileID: 1748522118614936523, guid: 450328d5a907c8249a60bc3980ba66f6, type: 3} propertyPath: m_AnchoredPosition.x value: 0 @@ -1816,6 +1864,10 @@ PrefabInstance: propertyPath: m_SizeDelta.y value: 0 objectReference: {fileID: 0} + - target: {fileID: 1749692929982472183, guid: 450328d5a907c8249a60bc3980ba66f6, type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} - target: {fileID: 1749692929982472183, guid: 450328d5a907c8249a60bc3980ba66f6, type: 3} propertyPath: m_AnchoredPosition.x value: 0 @@ -1848,6 +1900,10 @@ PrefabInstance: propertyPath: m_SizeDelta.y value: 0 objectReference: {fileID: 0} + - target: {fileID: 2078164669047027966, guid: 450328d5a907c8249a60bc3980ba66f6, type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} - target: {fileID: 2078164669047027966, guid: 450328d5a907c8249a60bc3980ba66f6, type: 3} propertyPath: m_AnchoredPosition.x value: 0 @@ -1976,6 +2032,10 @@ PrefabInstance: propertyPath: m_SizeDelta.y value: 0 objectReference: {fileID: 0} + - target: {fileID: 2511120698149964204, guid: 450328d5a907c8249a60bc3980ba66f6, type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} - target: {fileID: 2511120698149964204, guid: 450328d5a907c8249a60bc3980ba66f6, type: 3} propertyPath: m_AnchoredPosition.x value: 0 @@ -2032,6 +2092,10 @@ PrefabInstance: propertyPath: m_SizeDelta.y value: 0 objectReference: {fileID: 0} + - target: {fileID: 2579334080811426254, guid: 450328d5a907c8249a60bc3980ba66f6, type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} - target: {fileID: 2579334080811426254, guid: 450328d5a907c8249a60bc3980ba66f6, type: 3} propertyPath: m_AnchoredPosition.x value: 0 @@ -2084,6 +2148,14 @@ PrefabInstance: propertyPath: m_SizeDelta.x value: 0 objectReference: {fileID: 0} + - target: {fileID: 3095773685132211997, guid: 450328d5a907c8249a60bc3980ba66f6, type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3095773685132211997, guid: 450328d5a907c8249a60bc3980ba66f6, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} - target: {fileID: 3095773685132211997, guid: 450328d5a907c8249a60bc3980ba66f6, type: 3} propertyPath: m_AnchoredPosition.x value: 0 @@ -2108,6 +2180,10 @@ PrefabInstance: propertyPath: m_SizeDelta.y value: 0 objectReference: {fileID: 0} + - target: {fileID: 3399532356687036599, guid: 450328d5a907c8249a60bc3980ba66f6, type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} - target: {fileID: 3399532356687036599, guid: 450328d5a907c8249a60bc3980ba66f6, type: 3} propertyPath: m_AnchoredPosition.x value: 0 @@ -2128,6 +2204,14 @@ PrefabInstance: propertyPath: m_SizeDelta.x value: 0 objectReference: {fileID: 0} + - target: {fileID: 3441853701272737755, guid: 450328d5a907c8249a60bc3980ba66f6, type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3441853701272737755, guid: 450328d5a907c8249a60bc3980ba66f6, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} - target: {fileID: 3441853701272737755, guid: 450328d5a907c8249a60bc3980ba66f6, type: 3} propertyPath: m_AnchoredPosition.x value: 0 @@ -2148,6 +2232,10 @@ PrefabInstance: propertyPath: m_SizeDelta.y value: 0 objectReference: {fileID: 0} + - target: {fileID: 3554980154840165367, guid: 450328d5a907c8249a60bc3980ba66f6, type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} - target: {fileID: 3554980154840165367, guid: 450328d5a907c8249a60bc3980ba66f6, type: 3} propertyPath: m_AnchoredPosition.x value: 0 @@ -2168,6 +2256,14 @@ PrefabInstance: propertyPath: m_SizeDelta.x value: 0 objectReference: {fileID: 0} + - target: {fileID: 3583643212238109851, guid: 450328d5a907c8249a60bc3980ba66f6, type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3583643212238109851, guid: 450328d5a907c8249a60bc3980ba66f6, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} - target: {fileID: 3583643212238109851, guid: 450328d5a907c8249a60bc3980ba66f6, type: 3} propertyPath: m_AnchoredPosition.x value: 0 @@ -2296,6 +2392,14 @@ PrefabInstance: propertyPath: m_SizeDelta.x value: 0 objectReference: {fileID: 0} + - target: {fileID: 3829360616745704338, guid: 450328d5a907c8249a60bc3980ba66f6, type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3829360616745704338, guid: 450328d5a907c8249a60bc3980ba66f6, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} - target: {fileID: 3829360616745704338, guid: 450328d5a907c8249a60bc3980ba66f6, type: 3} propertyPath: m_AnchoredPosition.x value: 0 @@ -2316,6 +2420,10 @@ PrefabInstance: propertyPath: m_SizeDelta.y value: 0 objectReference: {fileID: 0} + - target: {fileID: 3876161320726367486, guid: 450328d5a907c8249a60bc3980ba66f6, type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} - target: {fileID: 3876161320726367486, guid: 450328d5a907c8249a60bc3980ba66f6, type: 3} propertyPath: m_AnchoredPosition.x value: 0 @@ -2472,6 +2580,10 @@ PrefabInstance: propertyPath: m_SizeDelta.y value: 0 objectReference: {fileID: 0} + - target: {fileID: 5928623329274860706, guid: 450328d5a907c8249a60bc3980ba66f6, type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} - target: {fileID: 5928623329274860706, guid: 450328d5a907c8249a60bc3980ba66f6, type: 3} propertyPath: m_AnchoredPosition.x value: 0 @@ -2496,6 +2608,10 @@ PrefabInstance: propertyPath: m_SizeDelta.x value: 0 objectReference: {fileID: 0} + - target: {fileID: 6256155029986723735, guid: 450328d5a907c8249a60bc3980ba66f6, type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} - target: {fileID: 6256155029986723735, guid: 450328d5a907c8249a60bc3980ba66f6, type: 3} propertyPath: m_AnchoredPosition.x value: 0 @@ -2516,6 +2632,14 @@ PrefabInstance: propertyPath: m_SizeDelta.x value: 0 objectReference: {fileID: 0} + - target: {fileID: 6487249402547224379, guid: 450328d5a907c8249a60bc3980ba66f6, type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6487249402547224379, guid: 450328d5a907c8249a60bc3980ba66f6, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} - target: {fileID: 6487249402547224379, guid: 450328d5a907c8249a60bc3980ba66f6, type: 3} propertyPath: m_AnchoredPosition.x value: 0 @@ -2536,6 +2660,14 @@ PrefabInstance: propertyPath: m_SizeDelta.x value: 0 objectReference: {fileID: 0} + - target: {fileID: 6591991037354951281, guid: 450328d5a907c8249a60bc3980ba66f6, type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6591991037354951281, guid: 450328d5a907c8249a60bc3980ba66f6, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} - target: {fileID: 6591991037354951281, guid: 450328d5a907c8249a60bc3980ba66f6, type: 3} propertyPath: m_AnchoredPosition.x value: 0 @@ -2620,6 +2752,10 @@ PrefabInstance: propertyPath: m_SizeDelta.x value: 0 objectReference: {fileID: 0} + - target: {fileID: 8365089343948286075, guid: 450328d5a907c8249a60bc3980ba66f6, type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} - target: {fileID: 8365089343948286075, guid: 450328d5a907c8249a60bc3980ba66f6, type: 3} propertyPath: m_AnchoredPosition.x value: 0 @@ -2644,6 +2780,10 @@ PrefabInstance: propertyPath: m_SizeDelta.y value: 0 objectReference: {fileID: 0} + - target: {fileID: 9003803253190325092, guid: 450328d5a907c8249a60bc3980ba66f6, type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} - target: {fileID: 9003803253190325092, guid: 450328d5a907c8249a60bc3980ba66f6, type: 3} propertyPath: m_AnchoredPosition.x value: 0 @@ -2664,6 +2804,14 @@ PrefabInstance: propertyPath: m_SizeDelta.x value: 0 objectReference: {fileID: 0} + - target: {fileID: 9163141629633368263, guid: 450328d5a907c8249a60bc3980ba66f6, type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 9163141629633368263, guid: 450328d5a907c8249a60bc3980ba66f6, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} - target: {fileID: 9163141629633368263, guid: 450328d5a907c8249a60bc3980ba66f6, type: 3} propertyPath: m_AnchoredPosition.x value: 0 @@ -2684,6 +2832,10 @@ PrefabInstance: propertyPath: m_SizeDelta.y value: 0 objectReference: {fileID: 0} + - target: {fileID: 9206624128085952427, guid: 450328d5a907c8249a60bc3980ba66f6, type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} - target: {fileID: 9206624128085952427, guid: 450328d5a907c8249a60bc3980ba66f6, type: 3} propertyPath: m_AnchoredPosition.x value: 0 @@ -2743,6 +2895,10 @@ PrefabInstance: propertyPath: m_SizeDelta.y value: 0 objectReference: {fileID: 0} + - target: {fileID: 1108503213262670097, guid: 3b211f31b55a35e44a8fa38666f63383, type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} - target: {fileID: 1108503213262670097, guid: 3b211f31b55a35e44a8fa38666f63383, type: 3} propertyPath: m_AnchoredPosition.x value: 0 @@ -2783,6 +2939,10 @@ PrefabInstance: propertyPath: m_SizeDelta.y value: 0 objectReference: {fileID: 0} + - target: {fileID: 1710183501897154830, guid: 3b211f31b55a35e44a8fa38666f63383, type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} - target: {fileID: 1710183501897154830, guid: 3b211f31b55a35e44a8fa38666f63383, type: 3} propertyPath: m_AnchoredPosition.x value: 0 @@ -2803,6 +2963,14 @@ PrefabInstance: propertyPath: m_SizeDelta.x value: 0 objectReference: {fileID: 0} + - target: {fileID: 1746243318642131728, guid: 3b211f31b55a35e44a8fa38666f63383, type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1746243318642131728, guid: 3b211f31b55a35e44a8fa38666f63383, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} - target: {fileID: 1746243318642131728, guid: 3b211f31b55a35e44a8fa38666f63383, type: 3} propertyPath: m_AnchoredPosition.x value: 0 @@ -2827,6 +2995,10 @@ PrefabInstance: propertyPath: m_SizeDelta.y value: 0 objectReference: {fileID: 0} + - target: {fileID: 1777012203952456443, guid: 3b211f31b55a35e44a8fa38666f63383, type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} - target: {fileID: 1777012203952456443, guid: 3b211f31b55a35e44a8fa38666f63383, type: 3} propertyPath: m_AnchoredPosition.x value: 0 @@ -2847,6 +3019,14 @@ PrefabInstance: propertyPath: m_SizeDelta.x value: 0 objectReference: {fileID: 0} + - target: {fileID: 2005113594707322973, guid: 3b211f31b55a35e44a8fa38666f63383, type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2005113594707322973, guid: 3b211f31b55a35e44a8fa38666f63383, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} - target: {fileID: 2005113594707322973, guid: 3b211f31b55a35e44a8fa38666f63383, type: 3} propertyPath: m_AnchoredPosition.x value: 0 @@ -2939,6 +3119,14 @@ PrefabInstance: propertyPath: m_AnchorMin.y value: 0 objectReference: {fileID: 0} + - target: {fileID: 2921874279820016524, guid: 3b211f31b55a35e44a8fa38666f63383, type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2921874279820016524, guid: 3b211f31b55a35e44a8fa38666f63383, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} - target: {fileID: 2940710093054777883, guid: 3b211f31b55a35e44a8fa38666f63383, type: 3} propertyPath: m_AnchorMax.y value: 0 @@ -2995,6 +3183,10 @@ PrefabInstance: propertyPath: m_AnchorMin.y value: 0 objectReference: {fileID: 0} + - target: {fileID: 3201409976408832832, guid: 3b211f31b55a35e44a8fa38666f63383, type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} - target: {fileID: 3201409976408832832, guid: 3b211f31b55a35e44a8fa38666f63383, type: 3} propertyPath: m_LocalPosition.y value: 0 @@ -3079,6 +3271,14 @@ PrefabInstance: propertyPath: m_SizeDelta.x value: 0 objectReference: {fileID: 0} + - target: {fileID: 4195056312044822544, guid: 3b211f31b55a35e44a8fa38666f63383, type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4195056312044822544, guid: 3b211f31b55a35e44a8fa38666f63383, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} - target: {fileID: 4195056312044822544, guid: 3b211f31b55a35e44a8fa38666f63383, type: 3} propertyPath: m_AnchoredPosition.x value: 0 @@ -3099,6 +3299,14 @@ PrefabInstance: propertyPath: m_SizeDelta.x value: 0 objectReference: {fileID: 0} + - target: {fileID: 4541943946029862829, guid: 3b211f31b55a35e44a8fa38666f63383, type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4541943946029862829, guid: 3b211f31b55a35e44a8fa38666f63383, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} - target: {fileID: 4541943946029862829, guid: 3b211f31b55a35e44a8fa38666f63383, type: 3} propertyPath: m_AnchoredPosition.x value: 0 @@ -3159,6 +3367,14 @@ PrefabInstance: propertyPath: m_SizeDelta.x value: 0 objectReference: {fileID: 0} + - target: {fileID: 4894793418161725275, guid: 3b211f31b55a35e44a8fa38666f63383, type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4894793418161725275, guid: 3b211f31b55a35e44a8fa38666f63383, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} - target: {fileID: 4894793418161725275, guid: 3b211f31b55a35e44a8fa38666f63383, type: 3} propertyPath: m_AnchoredPosition.x value: 0 @@ -3303,6 +3519,14 @@ PrefabInstance: propertyPath: m_SizeDelta.y value: 0 objectReference: {fileID: 0} + - target: {fileID: 5681144522345305637, guid: 3b211f31b55a35e44a8fa38666f63383, type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5681144522345305637, guid: 3b211f31b55a35e44a8fa38666f63383, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} - target: {fileID: 6064974212694732928, guid: 3b211f31b55a35e44a8fa38666f63383, type: 3} propertyPath: m_AnchorMax.y value: 0 @@ -3523,6 +3747,10 @@ PrefabInstance: propertyPath: m_SizeDelta.y value: 0 objectReference: {fileID: 0} + - target: {fileID: 7158194035478552859, guid: 3b211f31b55a35e44a8fa38666f63383, type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} - target: {fileID: 7158194035478552859, guid: 3b211f31b55a35e44a8fa38666f63383, type: 3} propertyPath: m_AnchoredPosition.x value: 0 diff --git a/AxibugEmuOnline.Client/Assets/Resources/UIPrefabs/SubMenuItemTemplates/GlobalFilter_Template.prefab b/AxibugEmuOnline.Client/Assets/Resources/UIPrefabs/SubMenuItemTemplates/GlobalFilter_Template.prefab index b2050b38..70a047f5 100644 --- a/AxibugEmuOnline.Client/Assets/Resources/UIPrefabs/SubMenuItemTemplates/GlobalFilter_Template.prefab +++ b/AxibugEmuOnline.Client/Assets/Resources/UIPrefabs/SubMenuItemTemplates/GlobalFilter_Template.prefab @@ -681,7 +681,7 @@ GameObject: - component: {fileID: 4672405243908051711} - component: {fileID: 3086674949377227884} m_Layer: 5 - m_Name: RomGroupScroll + m_Name: SubGroupScroll m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 diff --git a/AxibugEmuOnline.Client/Assets/Resources/UIPrefabs/SubMenuItemTemplates/ScreenScaler_Template.prefab b/AxibugEmuOnline.Client/Assets/Resources/UIPrefabs/SubMenuItemTemplates/ScreenScaler_Template.prefab index edf93daa..f308d4a1 100644 --- a/AxibugEmuOnline.Client/Assets/Resources/UIPrefabs/SubMenuItemTemplates/ScreenScaler_Template.prefab +++ b/AxibugEmuOnline.Client/Assets/Resources/UIPrefabs/SubMenuItemTemplates/ScreenScaler_Template.prefab @@ -681,7 +681,7 @@ GameObject: - component: {fileID: 4672405243908051711} - component: {fileID: 3086674949377227884} m_Layer: 5 - m_Name: RomGroupScroll + m_Name: SubItemScroll m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 diff --git a/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/AppSettings/ScreenScaler.cs b/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/AppSettings/ScreenScaler.cs index 065712f1..0c04834a 100644 --- a/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/AppSettings/ScreenScaler.cs +++ b/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/AppSettings/ScreenScaler.cs @@ -1,5 +1,4 @@ -using System; -using UnityEngine; +using UnityEngine; using UnityEngine.UI; namespace AxibugEmuOnline.Client diff --git a/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/BgSettingsUI/BackgroundListMenuItem.cs b/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/BgSettingsUI/BackgroundListMenuItem.cs index a5e9422d..b0a55925 100644 --- a/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/BgSettingsUI/BackgroundListMenuItem.cs +++ b/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/BgSettingsUI/BackgroundListMenuItem.cs @@ -1,4 +1,4 @@ -using AxibugEmuOnline.Client.ClientCore; +using AxibugEmuOnline.Client.ClientCore; using System; using System.Collections.Generic; @@ -6,13 +6,13 @@ namespace AxibugEmuOnline.Client { public class BackgroundListMenuItem : VirtualSubMenuItem { - protected override void GetVirtualListDatas(Action datas) + protected override void GetVirtualListDatas(VirtualListDataHandle callback) { List list = new List() { App.settings.BgColor, }; - datas.Invoke(list); + callback.Invoke(list, 0); } } } diff --git a/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/BgSettingsUI/GlobalFilterListMenuItem.cs b/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/BgSettingsUI/GlobalFilterListMenuItem.cs index 9b50a0e6..2205ef6b 100644 --- a/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/BgSettingsUI/GlobalFilterListMenuItem.cs +++ b/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/BgSettingsUI/GlobalFilterListMenuItem.cs @@ -22,12 +22,12 @@ namespace AxibugEmuOnline.Client return base.OnExitItem(); } - protected override void GetVirtualListDatas(Action datas) + protected override void GetVirtualListDatas(VirtualListDataHandle callback) { List list = new List(); list.Add(null); list.AddRange(App.settings.Filter.Filters.Select(f => (object)f)); - datas.Invoke(list); + callback.Invoke(list, 0); } } } diff --git a/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/BgSettingsUI/ScreenScalerListMenuItem.cs b/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/BgSettingsUI/ScreenScalerListMenuItem.cs index 8c706642..b57268a4 100644 --- a/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/BgSettingsUI/ScreenScalerListMenuItem.cs +++ b/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/BgSettingsUI/ScreenScalerListMenuItem.cs @@ -20,11 +20,15 @@ namespace AxibugEmuOnline.Client return base.OnExitItem(); } - protected override void GetVirtualListDatas(Action datas) + protected override void GetVirtualListDatas(VirtualListDataHandle callback) { List list = new List(); foreach (var enumValue in Enum.GetValues(typeof(ScreenScaler.EnumScalerMode))) list.Add(enumValue); - datas.Invoke(list); + + var select = list.IndexOf(App.settings.ScreenScaler.GlobalMode); + if (select == -1) select = 0; + + callback.Invoke(list, select); } } } diff --git a/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/GamesUI/RomListMenuItem.cs b/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/GamesUI/RomListMenuItem.cs index e9c91f5a..37c54e10 100644 --- a/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/GamesUI/RomListMenuItem.cs +++ b/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/GamesUI/RomListMenuItem.cs @@ -38,9 +38,9 @@ namespace AxibugEmuOnline.Client } public string SearchKey; - protected override void GetVirtualListDatas(Action datas) + protected override void GetVirtualListDatas(VirtualListDataHandle callback) { - RomLib.FetchRomCount((roms) => datas.Invoke(roms), SearchKey); + RomLib.FetchRomCount((roms) => callback.Invoke(roms, 0), SearchKey); } public override bool OnEnterItem() diff --git a/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/ItemPresent/ItemPresent.cs b/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/ItemPresent/ItemPresent.cs index e270899d..a4b4cb53 100644 --- a/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/ItemPresent/ItemPresent.cs +++ b/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/ItemPresent/ItemPresent.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections; using System.Collections.Generic; using UnityEngine; @@ -470,7 +470,7 @@ public class ItemPresent : GridLayoutGroup, IVirtualLayout } - public void SetData(object dataList) + public void SetData(IEnumerable dataList) { Clear(); @@ -493,7 +493,7 @@ public class ItemPresent : GridLayoutGroup, IVirtualLayout } else { - Debug.LogException(new Exception("ItemPresent SetData ݵIJͲ֧"), gameObject); + Debug.LogException(new Exception("ItemPresent SetData 传递的参数类型不受支持"), gameObject); return; } diff --git a/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/ItemPresent/ItemProxy.cs b/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/ItemPresent/ItemProxy.cs index 1a43d62e..36416433 100644 --- a/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/ItemPresent/ItemProxy.cs +++ b/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/ItemPresent/ItemProxy.cs @@ -1,3 +1,4 @@ +using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; @@ -16,7 +17,7 @@ public interface IVirtualLayout void UpdateProxyVisualState(); void UpdateDependencyProperty(object dp); - void SetData(object dataList); + void SetData(IEnumerable dataList); void MoveToScrollViewCenter(ScrollRect scrollRect, int dataIndex); } diff --git a/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/MenuItemController.cs b/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/MenuItemController.cs index c64e4b18..841bad89 100644 --- a/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/MenuItemController.cs +++ b/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/MenuItemController.cs @@ -1,4 +1,4 @@ -using AxibugEmuOnline.Client.UI; +using AxibugEmuOnline.Client.UI; using System.Collections.Generic; using UnityEngine; @@ -39,7 +39,7 @@ namespace AxibugEmuOnline.Client } Canvas.ForceUpdateCanvases(); - SelectIndex = 0; + if (m_selectIndex == -1) SelectIndex = 0; } protected virtual MenuItem GetItemUIByIndex(int index) diff --git a/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/RoomUI/RoomListMenuItem.cs b/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/RoomUI/RoomListMenuItem.cs index 2c0a8739..3d506775 100644 --- a/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/RoomUI/RoomListMenuItem.cs +++ b/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/RoomUI/RoomListMenuItem.cs @@ -1,4 +1,4 @@ -using AxibugEmuOnline.Client.ClientCore; +using AxibugEmuOnline.Client.ClientCore; using AxibugEmuOnline.Client.Event; using System; @@ -61,10 +61,10 @@ namespace AxibugEmuOnline.Client } } - protected override void GetVirtualListDatas(Action datas) + protected override void GetVirtualListDatas(VirtualListDataHandle callback) { var roomList = App.roomMgr.GetRoomList(); - datas.Invoke(roomList); + callback.Invoke(roomList, 0); } } diff --git a/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/ThirdMenuRoot.cs b/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/ThirdMenuRoot.cs index de6a8d6d..0a615d61 100644 --- a/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/ThirdMenuRoot.cs +++ b/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/ThirdMenuRoot.cs @@ -1,4 +1,4 @@ -using AxibugEmuOnline.Client.UI; +using AxibugEmuOnline.Client.UI; using DG.Tweening; using System.Collections.Generic; using UnityEngine; @@ -39,10 +39,10 @@ namespace AxibugEmuOnline.Client } } - public void ResetToFirst() + public void ResetToIndex(int selectIndex) { m_selectIndex = -1; - SelectIndex = 0; + SelectIndex = selectIndex; } protected override MenuItem GetItemUIByIndex(int index) diff --git a/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/VirtualSubMenuItem.cs b/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/VirtualSubMenuItem.cs index 32831a44..c16ecccf 100644 --- a/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/VirtualSubMenuItem.cs +++ b/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/VirtualSubMenuItem.cs @@ -1,8 +1,9 @@ -using AxibugEmuOnline.Client.UI; +using AxibugEmuOnline.Client.UI; using DG.Tweening; using DG.Tweening.Core; using DG.Tweening.Plugins.Options; using System; +using System.Collections; using UnityEngine; namespace AxibugEmuOnline.Client @@ -64,19 +65,22 @@ namespace AxibugEmuOnline.Client return true; } + public delegate void VirtualListDataHandle(IEnumerable data, int initialIndex); + + protected void RefreshUI() { - GetVirtualListDatas((datas) => + GetVirtualListDatas((datas, initialIndex) => { var thirdMenuGroup = SubMenuItemGroup as ThirdMenuRoot; thirdMenuGroup.itemGroup.UpdateDependencyProperty(thirdMenuGroup); thirdMenuGroup.itemGroup.SetData(datas); thirdMenuGroup.itemGroup.UpdateProxyVisualState(); - thirdMenuGroup.ResetToFirst(); + thirdMenuGroup.ResetToIndex(initialIndex); }); } - protected abstract void GetVirtualListDatas(Action datas); + protected abstract void GetVirtualListDatas(VirtualListDataHandle callback); public override bool OnExitItem() { From 572dc81ca467cc4fbe7937167b2daa74186719f3 Mon Sep 17 00:00:00 2001 From: "ALIENJACK\\alien" Date: Tue, 7 Jan 2025 11:56:52 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E4=BE=A7=E8=BE=B9=E6=A0=8F(OptionUI)?= =?UTF-8?q?=E7=9A=84=E5=8F=AF=E6=89=A7=E8=A1=8C=E7=B1=BB=E5=9E=8B=E8=8F=9C?= =?UTF-8?q?=E5=8D=95=E7=8E=B0=E5=9C=A8=E6=94=AF=E6=8C=81Applied=E6=A0=87?= =?UTF-8?q?=E8=AE=B0=20=E6=B8=B8=E6=88=8F=E4=B8=AD,=E6=BB=A4=E9=95=9C?= =?UTF-8?q?=E9=A2=84=E8=AE=BE=E8=8F=9C=E5=8D=95=E7=8E=B0=E5=9C=A8=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E4=B8=80=E4=B8=AAApplied=E6=A0=87=E8=AE=B0,=E7=94=A8?= =?UTF-8?q?=E4=BA=8E=E8=A1=A8=E7=A4=BA=E8=AF=A5=E6=BB=A4=E9=95=9C=E6=98=AF?= =?UTF-8?q?=E5=90=A6=E5=B7=B2=E8=A2=AB=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Assets/Resources/IMPORTENT.prefab | 28 +++++ .../Assets/Resources/NES/NesEmulator.prefab | 6 +- .../Resources/UIPrefabs/OptionUI.prefab | 100 +++++++++++++++++- .../AppSettings/Filter/FilterManager.cs | 3 +- .../UI/InGameUI/InGameUI_FilterSetting.cs | 29 ++++- .../Script/AppMain/UI/OptionUI/OptionUI.cs | 39 +++---- .../UI/OptionUI/OptionUI_ExecuteItem.cs | 9 +- .../AppMain/UI/OptionUI/OptionUI_MenuItem.cs | 4 +- .../ProjectSettings/ProjectSettings.asset | 2 +- 9 files changed, 192 insertions(+), 28 deletions(-) diff --git a/AxibugEmuOnline.Client/Assets/Resources/IMPORTENT.prefab b/AxibugEmuOnline.Client/Assets/Resources/IMPORTENT.prefab index 89847668..e5815a63 100644 --- a/AxibugEmuOnline.Client/Assets/Resources/IMPORTENT.prefab +++ b/AxibugEmuOnline.Client/Assets/Resources/IMPORTENT.prefab @@ -736,6 +736,34 @@ PrefabInstance: propertyPath: m_AnchoredPosition.x value: -5 objectReference: {fileID: 0} + - target: {fileID: 734174642832146072, guid: 1de15a80c8c1aa94486563740a15d91c, type: 3} + propertyPath: m_AnchorMax.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 734174642832146072, guid: 1de15a80c8c1aa94486563740a15d91c, type: 3} + propertyPath: m_AnchorMin.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 734174642832146072, guid: 1de15a80c8c1aa94486563740a15d91c, type: 3} + propertyPath: m_SizeDelta.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 734174642832146072, guid: 1de15a80c8c1aa94486563740a15d91c, type: 3} + propertyPath: m_SizeDelta.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 734174642832146072, guid: 1de15a80c8c1aa94486563740a15d91c, type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 734174642832146072, guid: 1de15a80c8c1aa94486563740a15d91c, type: 3} + propertyPath: m_AnchoredPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 734174642832146072, guid: 1de15a80c8c1aa94486563740a15d91c, type: 3} + propertyPath: m_AnchoredPosition.y + value: 0 + objectReference: {fileID: 0} - target: {fileID: 736530578155193984, guid: 1de15a80c8c1aa94486563740a15d91c, type: 3} propertyPath: m_AnchorMax.y value: 0 diff --git a/AxibugEmuOnline.Client/Assets/Resources/NES/NesEmulator.prefab b/AxibugEmuOnline.Client/Assets/Resources/NES/NesEmulator.prefab index 11326206..d539bc20 100644 --- a/AxibugEmuOnline.Client/Assets/Resources/NES/NesEmulator.prefab +++ b/AxibugEmuOnline.Client/Assets/Resources/NES/NesEmulator.prefab @@ -175,10 +175,10 @@ RectTransform: m_Children: [] m_Father: {fileID: 4232056520494431727} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0.5, y: 0.5} - m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 100, y: 100} + m_SizeDelta: {x: 0, y: 0} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &377334483991090399 CanvasRenderer: diff --git a/AxibugEmuOnline.Client/Assets/Resources/UIPrefabs/OptionUI.prefab b/AxibugEmuOnline.Client/Assets/Resources/UIPrefabs/OptionUI.prefab index 30f2e593..87e53efb 100644 --- a/AxibugEmuOnline.Client/Assets/Resources/UIPrefabs/OptionUI.prefab +++ b/AxibugEmuOnline.Client/Assets/Resources/UIPrefabs/OptionUI.prefab @@ -826,6 +826,7 @@ RectTransform: m_Children: - {fileID: 6503369113137645357} - {fileID: 1714682891259844147} + - {fileID: 366056510674839125} - {fileID: 4264754383554125665} m_Father: {fileID: 4478785627166277610} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} @@ -875,6 +876,103 @@ MonoBehaviour: m_MenuNameTxt: {fileID: 1824253632728291860} m_Icon: {fileID: 394891843266770919} ExpandFlag: {fileID: 1501213187178026014} + ApplyFlag: {fileID: 3335801350916860509} +--- !u!1 &3335801350916860509 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 366056510674839125} + - component: {fileID: 8134207541370216537} + - component: {fileID: 9115911462236684960} + - component: {fileID: 630275888015180765} + m_Layer: 5 + m_Name: ApplyFlag + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &366056510674839125 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3335801350916860509} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 2780569438310375802} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &8134207541370216537 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3335801350916860509} + m_CullTransparentMesh: 1 +--- !u!114 &9115911462236684960 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3335801350916860509} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: eba3f71cfd582184cb08d7a56e6428d2, type: 3} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!114 &630275888015180765 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3335801350916860509} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 306cc8c2b49d7114eaa3623786fc2126, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: -1 + m_MinHeight: -1 + m_PreferredWidth: 30 + m_PreferredHeight: 30 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 --- !u!1 &4124172888520656882 GameObject: m_ObjectHideFlags: 0 @@ -1126,7 +1224,7 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0.25} m_AnchorMax: {x: 1, y: 0.75} - m_AnchoredPosition: {x: -5.0000153, y: 0} + m_AnchoredPosition: {x: -5, y: 0} m_SizeDelta: {x: -20, y: 0} m_Pivot: {x: 0.5, y: 0.5} --- !u!1 &5174902406667317058 diff --git a/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/AppSettings/Filter/FilterManager.cs b/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/AppSettings/Filter/FilterManager.cs index d02cca7a..47c23e13 100644 --- a/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/AppSettings/Filter/FilterManager.cs +++ b/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/AppSettings/Filter/FilterManager.cs @@ -176,7 +176,8 @@ namespace AxibugEmuOnline.Client if (filter != null) { string presetName = value.Item2; - preset = filter.Presets.FirstOrDefault(p => p.Name == presetName); + if (presetName == filter.DefaultPreset.Name) preset = filter.DefaultPreset; + else preset = filter.Presets.FirstOrDefault(p => p.Name == presetName); } return new GetFilterSetting_result() diff --git a/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/InGameUI/InGameUI_FilterSetting.cs b/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/InGameUI/InGameUI_FilterSetting.cs index 90347fb0..31bd1d14 100644 --- a/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/InGameUI/InGameUI_FilterSetting.cs +++ b/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/InGameUI/InGameUI_FilterSetting.cs @@ -5,7 +5,7 @@ using static AxibugEmuOnline.Client.FilterManager; namespace AxibugEmuOnline.Client { - public class InGameUI_FilterSetting : ExpandMenu + public class InGameUI_FilterSetting : ExpandMenu { private InGameUI m_gameUI; @@ -26,15 +26,17 @@ namespace AxibugEmuOnline.Client { private RomFile m_rom; + public override bool IsApplied => App.settings.Filter.GetFilterSetting(m_rom).filter == null; public FilterNone(RomFile rom) : base("取消滤镜", null) { m_rom = rom; + + var currentFilterSetting = App.settings.Filter.GetFilterSetting(m_rom); } public override void OnExcute(OptionUI optionUI, ref bool cancelHide) { App.settings.Filter.ShutDownFilter(); - App.settings.Filter.SetupFilter(m_rom, null, null); } } @@ -44,6 +46,19 @@ namespace AxibugEmuOnline.Client private Filter m_filter; private List m_presetsMenuItems; + public override bool IsApplied + { + get + { + foreach (FilterPresetMenu preset in m_presetsMenuItems) + { + if (preset.IsApplied) return true; + } + + return false; + } + } + public FilterMenu(RomFile rom, Filter filter) : base(filter.Name, null) { m_filter = filter; @@ -63,6 +78,16 @@ namespace AxibugEmuOnline.Client private RomFile m_rom; private Filter m_filter; + public override bool IsApplied + { + get + { + var setting = App.settings.Filter.GetFilterSetting(m_rom); + return setting.filter == m_filter && setting.preset == m_preset; + } + } + + public FilterPresetMenu(RomFile rom, Filter filter, FilterPreset preset) : base(preset.Name, null) { m_preset = preset; diff --git a/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/OptionUI/OptionUI.cs b/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/OptionUI/OptionUI.cs index b4399722..4de0cb41 100644 --- a/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/OptionUI/OptionUI.cs +++ b/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/OptionUI/OptionUI.cs @@ -270,17 +270,17 @@ namespace AxibugEmuOnline.Client private void CreateRuntimeMenuItem(OptionMenu menuData) { if (menuData is ExecuteMenu) - { - ExecuteMenu executeMenu = (ExecuteMenu)menuData; - var menuUI = Instantiate(TEMPLATE_EXECUTEITEM.gameObject, TEMPLATE_EXECUTEITEM.transform.parent).GetComponent(); + { + ExecuteMenu executeMenu = (ExecuteMenu)menuData; + var menuUI = Instantiate(TEMPLATE_EXECUTEITEM.gameObject, TEMPLATE_EXECUTEITEM.transform.parent).GetComponent(); menuUI.gameObject.SetActive(true); menuUI.SetData(this, executeMenu); m_runtimeMenuItems.Add(menuUI); } else if (menuData is ValueSetMenu) { - var valueSetMenu = (ValueSetMenu)menuData; - var menuUI = Instantiate(TEMPLATE_VALUEEDITITEM.gameObject, TEMPLATE_VALUEEDITITEM.transform.parent).GetComponent(); + var valueSetMenu = (ValueSetMenu)menuData; + var menuUI = Instantiate(TEMPLATE_VALUEEDITITEM.gameObject, TEMPLATE_VALUEEDITITEM.transform.parent).GetComponent(); menuUI.gameObject.SetActive(true); menuUI.SetData(this, valueSetMenu); m_runtimeMenuItems.Add(menuUI); @@ -384,13 +384,15 @@ namespace AxibugEmuOnline.Client /// public abstract class ExecuteMenu : OptionMenu { + /// 设置这个值以控制菜单中显示"已应用"标记 + public virtual bool IsApplied { get; } protected ExecuteMenu(string name, Sprite icon = null) : base(name, icon) { } public abstract void OnExcute(OptionUI optionUI, ref bool cancelHide); } /// - /// 带有展开行为的菜单 + /// 带有展开行为的可执行菜单 /// public abstract class ExpandMenu : ExecuteMenu { @@ -403,6 +405,19 @@ namespace AxibugEmuOnline.Client } protected abstract List GetOptionMenus(); + } + /// + /// 带有值类型显示和编辑的菜单 + /// + public abstract class ValueSetMenu : OptionMenu + { + protected ValueSetMenu(string name) : base(name) { } + + public abstract Type ValueType { get; } + public abstract object ValueRaw { get; } + public abstract void OnValueChanged(object newValue); + public abstract object Min { get; } + public abstract object Max { get; } } /// 不要直接继承这个类 @@ -423,17 +438,5 @@ namespace AxibugEmuOnline.Client public virtual void OnShow(OptionUI_MenuItem ui) { } public virtual void OnHide() { } } - /// - /// 带有值类型显示和编辑的菜单 - /// - public abstract class ValueSetMenu : OptionMenu - { - protected ValueSetMenu(string name) : base(name) { } - public abstract Type ValueType { get; } - public abstract object ValueRaw { get; } - public abstract void OnValueChanged(object newValue); - public abstract object Min { get; } - public abstract object Max { get; } - } } diff --git a/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/OptionUI/OptionUI_ExecuteItem.cs b/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/OptionUI/OptionUI_ExecuteItem.cs index bc92bb61..8228f985 100644 --- a/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/OptionUI/OptionUI_ExecuteItem.cs +++ b/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/OptionUI/OptionUI_ExecuteItem.cs @@ -1,21 +1,28 @@ -using UnityEngine; +using UnityEngine; namespace AxibugEmuOnline.Client { public class OptionUI_ExecuteItem : OptionUI_MenuItem { public GameObject ExpandFlag; + public GameObject ApplyFlag; protected override void OnSetData(OptionMenu menuData) { base.OnSetData(menuData); ExpandFlag.SetActiveEx(IsExpandMenu); + ApplyFlag.SetActiveEx(IsApplied); } public override void OnExecute(OptionUI optionUI, ref bool cancelHide) { MenuData.OnExcute(optionUI, ref cancelHide); } + + protected override void Update() + { + ApplyFlag.SetActiveEx(IsApplied); + } } } diff --git a/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/OptionUI/OptionUI_MenuItem.cs b/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/OptionUI/OptionUI_MenuItem.cs index 09256466..b492a171 100644 --- a/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/OptionUI/OptionUI_MenuItem.cs +++ b/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/OptionUI/OptionUI_MenuItem.cs @@ -1,4 +1,4 @@ -using UnityEngine; +using UnityEngine; using UnityEngine.UI; namespace AxibugEmuOnline.Client @@ -31,6 +31,7 @@ namespace AxibugEmuOnline.Client } public bool IsExpandMenu => m_Menu is ExpandMenu; + public bool IsApplied => m_Menu is ExecuteMenu om && om.IsApplied; protected abstract void OnSetData(OptionMenu menuData); @@ -39,6 +40,7 @@ namespace AxibugEmuOnline.Client public virtual void OnRight() { } public abstract void OnFocus(); public virtual void OnHide() { } + protected virtual void Update() { } } public abstract class OptionUI_MenuItem : OptionUI_MenuItem diff --git a/AxibugEmuOnline.Client/ProjectSettings/ProjectSettings.asset b/AxibugEmuOnline.Client/ProjectSettings/ProjectSettings.asset index 1a1165fd..799f3ae3 100644 --- a/AxibugEmuOnline.Client/ProjectSettings/ProjectSettings.asset +++ b/AxibugEmuOnline.Client/ProjectSettings/ProjectSettings.asset @@ -47,7 +47,7 @@ PlayerSettings: defaultScreenWidthWeb: 960 defaultScreenHeightWeb: 600 m_StereoRenderingPath: 0 - m_ActiveColorSpace: 1 + m_ActiveColorSpace: 0 unsupportedMSAAFallback: 0 m_SpriteBatchMaxVertexCount: 65535 m_SpriteBatchVertexThreshold: 300 From 14d2ae167e2ac7ba35a12678bf828427225b16ad Mon Sep 17 00:00:00 2001 From: "ALIENJACK\\alien" Date: Tue, 7 Jan 2025 13:15:53 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E7=A7=BB=E9=99=A4EnumPlatform=E6=96=87?= =?UTF-8?q?=E4=BB=B6,=E7=BB=9F=E4=B8=80=E4=BD=BF=E7=94=A8RomPlatformType?= =?UTF-8?q?=E6=9E=9A=E4=B8=BE=E6=9D=A5=E5=AE=9A=E4=B9=89=E6=A8=A1=E6=8B=9F?= =?UTF-8?q?=E5=99=A8=E5=B9=B3=E5=8F=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Assets/Script/AppMain/App.cs | 3 +- .../Assets/Script/AppMain/IEmuCore.cs | 5 ++-- .../Assets/Script/AppMain/Manager/AppEmu.cs | 5 ++-- .../AppSettings/Filter/FilterManager.cs | 3 +- .../Manager/AppSettings/ScreenScaler.cs | 13 ++++---- .../AppMain/Manager/RomLib/EnumPlatform.cs | 7 ----- .../Manager/RomLib/EnumPlatform.cs.meta | 11 ------- .../Script/AppMain/Manager/RomLib/RomFile.cs | 22 ++++---------- .../Script/AppMain/Manager/RomLib/RomLib.cs | 30 +++++-------------- .../Script/AppMain/NesEmulator/NesEmulator.cs | 3 +- .../AppMain/NesEmulator/VideoProvider.cs | 3 +- .../Protobuf/ProtobufAxibugEmuOnline.cs | 21 ++++++------- .../AppMain/UI/GamesUI/RomListMenuItem.cs | 5 ++-- .../Script/AppMain/UI/RoomUI/RoomItem.cs | 2 +- .../Assets/Script/AppMain/Utility.cs | 6 ++-- .../Protobuf/ProtobufAxibugEmuOnline.cs | 21 ++++++------- .../out/CS/ProtobufAxibugEmuOnline.cs | 21 ++++++------- .../proto/protobuf_AxibugEmuOnline.proto | 3 +- 18 files changed, 76 insertions(+), 108 deletions(-) delete mode 100644 AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/RomLib/EnumPlatform.cs delete mode 100644 AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/RomLib/EnumPlatform.cs.meta diff --git a/AxibugEmuOnline.Client/Assets/Script/AppMain/App.cs b/AxibugEmuOnline.Client/Assets/Script/AppMain/App.cs index 1b103618..5365fa68 100644 --- a/AxibugEmuOnline.Client/Assets/Script/AppMain/App.cs +++ b/AxibugEmuOnline.Client/Assets/Script/AppMain/App.cs @@ -1,5 +1,6 @@ using AxibugEmuOnline.Client.Manager; using AxibugEmuOnline.Client.Network; +using AxibugProtobuf; using System; using System.Collections; using System.IO; @@ -64,7 +65,7 @@ namespace AxibugEmuOnline.Client.ClientCore emu = new AppEmu(); //netgame = new AppNetGame(); httpAPI = new HttpAPI(); - nesRomLib = new RomLib(EnumSupportEmuPlatform.NES); + nesRomLib = new RomLib(RomPlatformType.Nes); CacheMgr = new CacheManager(); roomMgr = new AppRoom(); share = new AppShare(); diff --git a/AxibugEmuOnline.Client/Assets/Script/AppMain/IEmuCore.cs b/AxibugEmuOnline.Client/Assets/Script/AppMain/IEmuCore.cs index 4ca46464..1583993d 100644 --- a/AxibugEmuOnline.Client/Assets/Script/AppMain/IEmuCore.cs +++ b/AxibugEmuOnline.Client/Assets/Script/AppMain/IEmuCore.cs @@ -1,4 +1,5 @@ -using UnityEngine; +using AxibugProtobuf; +using UnityEngine; namespace AxibugEmuOnline.Client { @@ -17,7 +18,7 @@ namespace AxibugEmuOnline.Client void DoReset(); IControllerSetuper GetControllerSetuper(); - EnumSupportEmuPlatform Platform { get; } + RomPlatformType Platform { get; } uint Frame { get; } } diff --git a/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/AppEmu.cs b/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/AppEmu.cs index 9012dbe9..d994bb40 100644 --- a/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/AppEmu.cs +++ b/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/AppEmu.cs @@ -1,5 +1,6 @@ using AxibugEmuOnline.Client.ClientCore; using AxibugEmuOnline.Client.Event; +using AxibugProtobuf; using UnityEngine; namespace AxibugEmuOnline.Client.Manager @@ -31,7 +32,7 @@ namespace AxibugEmuOnline.Client.Manager if (!m_emuCore.IsNull()) StopGame(); var roomInfo = App.roomMgr.mineRoomMiniInfo; - roomInfo.FetchRomFileInRoomInfo(EnumSupportEmuPlatform.NES, (_, romFile) => + roomInfo.FetchRomFileInRoomInfo(RomPlatformType.Nes, (_, romFile) => { if (!romFile.RomReady) //这个rom并没有下载,所以取消进入房间 { @@ -51,7 +52,7 @@ namespace AxibugEmuOnline.Client.Manager switch (romFile.Platform) { - case EnumSupportEmuPlatform.NES: + case RomPlatformType.Nes: m_emuCore = GameObject.Instantiate(Resources.Load("NES/NesEmulator")).GetComponent(); break; } diff --git a/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/AppSettings/Filter/FilterManager.cs b/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/AppSettings/Filter/FilterManager.cs index 47c23e13..869df7b4 100644 --- a/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/AppSettings/Filter/FilterManager.cs +++ b/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/AppSettings/Filter/FilterManager.cs @@ -1,4 +1,5 @@ using AxibugEmuOnline.Client.ClientCore; +using AxibugProtobuf; using System; using System.Collections.Generic; using System.Linq; @@ -12,7 +13,7 @@ namespace AxibugEmuOnline.Client public class FilterManager { private List m_filters; - private Dictionary m_filterPlatforms = new Dictionary(); + private Dictionary m_filterPlatforms = new Dictionary(); private AlphaWraper m_previewFilterWraper; FilterRomSetting m_filterRomSetting; diff --git a/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/AppSettings/ScreenScaler.cs b/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/AppSettings/ScreenScaler.cs index 0c04834a..afabf2e2 100644 --- a/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/AppSettings/ScreenScaler.cs +++ b/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/AppSettings/ScreenScaler.cs @@ -1,4 +1,5 @@ -using UnityEngine; +using AxibugProtobuf; +using UnityEngine; using UnityEngine.UI; namespace AxibugEmuOnline.Client @@ -22,7 +23,7 @@ namespace AxibugEmuOnline.Client /// /// /// - public EnumScalerMode GetMode(EnumSupportEmuPlatform platform) + public EnumScalerMode GetMode(RomPlatformType platform) { int setVal = PlayerPrefs.GetInt($"{nameof(ScreenScaler)}.PlatMode.{platform}", -1); if (setVal == -1) @@ -36,10 +37,10 @@ namespace AxibugEmuOnline.Client /// /// /// 不指定模拟器平台时,使用全局设置的缩放模式 - public void CalcScale(RawImage rawImg, EnumSupportEmuPlatform? platform = null) + public void CalcScale(RawImage rawImg, RomPlatformType? platform = null) { var targetMode = platform == null ? GlobalMode : GetMode(platform.Value); - var resolution = GetRawResolution(platform == null ? EnumSupportEmuPlatform.NES : platform.Value); + var resolution = GetRawResolution(platform == null ? RomPlatformType.Nes : platform.Value); var canvasRect = (rawImg.canvas.transform as RectTransform).rect; switch (targetMode) { @@ -88,11 +89,11 @@ namespace AxibugEmuOnline.Client } } - public Vector2Int GetRawResolution(EnumSupportEmuPlatform platform) + public Vector2Int GetRawResolution(RomPlatformType platform) { switch (platform) { - case EnumSupportEmuPlatform.NES: return new Vector2Int(256, 240); + case RomPlatformType.Nes: return new Vector2Int(256, 240); default: return new Vector2Int(256, 240); } } diff --git a/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/RomLib/EnumPlatform.cs b/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/RomLib/EnumPlatform.cs deleted file mode 100644 index a588b658..00000000 --- a/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/RomLib/EnumPlatform.cs +++ /dev/null @@ -1,7 +0,0 @@ -namespace AxibugEmuOnline.Client -{ - public enum EnumSupportEmuPlatform - { - NES - } -} diff --git a/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/RomLib/EnumPlatform.cs.meta b/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/RomLib/EnumPlatform.cs.meta deleted file mode 100644 index 89840290..00000000 --- a/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/RomLib/EnumPlatform.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 355fa00c125158f4ba90003b0fd5d788 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/RomLib/RomFile.cs b/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/RomLib/RomFile.cs index 6cd9e04d..425828bd 100644 --- a/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/RomLib/RomFile.cs +++ b/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/RomLib/RomFile.cs @@ -1,11 +1,10 @@ using AxibugEmuOnline.Client.ClientCore; +using AxibugProtobuf; using ICSharpCode.SharpZipLib.Zip; using System; using System.Collections; using System.IO; using UnityEngine; -using UnityEngine.Networking; -using static UnityEngine.EventSystems.EventTrigger; namespace AxibugEmuOnline.Client { @@ -13,7 +12,6 @@ namespace AxibugEmuOnline.Client { private HttpAPI.Resp_RomInfo webData; private bool hasLocalFile; - private EnumSupportEmuPlatform platform; //private UnityWebRequest downloadRequest; private AxiHttpProxy.SendDownLoadProxy downloadRequest; @@ -22,8 +20,8 @@ namespace AxibugEmuOnline.Client /// 指示该Rom文件的存放路径 public string LocalFilePath => IsUserRom ? - $"{App.PersistentDataPath}/UserRoms/{platform}/{FileName}" : - $"{App.PersistentDataPath}/RemoteRoms/{platform}/{FileName}"; + $"{App.PersistentDataPath}/UserRoms/{Platform}/{FileName}" : + $"{App.PersistentDataPath}/RemoteRoms/{Platform}/{FileName}"; /// 指示该Rom文件是否已下载完毕 public bool RomReady => hasLocalFile; @@ -36,7 +34,7 @@ namespace AxibugEmuOnline.Client public float Progress => IsDownloading ? downloadRequest.downloadHandler.DownLoadPr : 0; - public EnumSupportEmuPlatform Platform => platform; + public RomPlatformType Platform => webData != null ? (RomPlatformType)webData.ptype : RomPlatformType.Invalid; /// 指示该Rom信息是否已填充 public bool InfoReady => webData != null; /// 唯一标识 @@ -61,9 +59,8 @@ namespace AxibugEmuOnline.Client public event Action OnDownloadOver; public event Action OnInfoFilled; - public RomFile(EnumSupportEmuPlatform platform, int index, int insidePage) + public RomFile(int index, int insidePage) { - this.platform = platform; Index = index; Page = insidePage; } @@ -181,14 +178,5 @@ namespace AxibugEmuOnline.Client OnInfoFilled?.Invoke(); } - private RomFile() { } - public static RomFile CreateExistRom(EnumSupportEmuPlatform platform, string fileName) - { - var res = new RomFile(); - res.IsUserRom = true; - res.FileName = fileName; - res.hasLocalFile = File.Exists(res.LocalFilePath); - return res; - } } } diff --git a/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/RomLib/RomLib.cs b/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/RomLib/RomLib.cs index 0abab9f5..3df00135 100644 --- a/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/RomLib/RomLib.cs +++ b/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/RomLib/RomLib.cs @@ -1,5 +1,6 @@ using AxibugEmuOnline.Client.ClientCore; using AxibugEmuOnline.Client.Common; +using AxibugProtobuf; using System; using System.Collections.Generic; using System.IO; @@ -19,30 +20,21 @@ namespace AxibugEmuOnline.Client private Dictionary nesRomFileNameMapper = new Dictionary(); private HttpAPI.GetRomListAPI m_romGetFunc; private HttpAPI.SearchRomListAPI m_romSearchFunc; - private EnumSupportEmuPlatform m_platform; + private RomPlatformType m_platform; private string lastSearchKey; - public RomLib(EnumSupportEmuPlatform platform) + public RomLib(RomPlatformType platform) { m_platform = platform; switch (platform) { - case EnumSupportEmuPlatform.NES: + case RomPlatformType.Nes: m_romGetFunc = App.httpAPI.GetNesRomList; m_romSearchFunc = App.httpAPI.SearchNesRomList; break; } } - public RomFile GetExistRom(string fileName) - { - var res = RomFile.CreateExistRom(m_platform, fileName); - - nesRomFileNameMapper[res.FileName] = res; - - return res; - } - public RomFile GetRomFile(string romFileName) { RomFile romFile; @@ -89,15 +81,12 @@ namespace AxibugEmuOnline.Client for (int i = 0; i < nesRomFetchList.Length; i++) { //以后考虑用对象池实例化RomFile - nesRomFetchList[i] = new RomFile(m_platform, i, i / PAGE_SIZE); + nesRomFetchList[i] = new RomFile(i, i / PAGE_SIZE); } SaveRomInfoFromWeb(romList); callback.Invoke(nesRomFetchList); - }, - //TODO 平台参数 - AxibugProtobuf.RomPlatformType.Nes - , 0, PAGE_SIZE); + }, m_platform, 0, PAGE_SIZE); } else { @@ -115,15 +104,12 @@ namespace AxibugEmuOnline.Client for (int i = 0; i < nesRomFetchList.Length; i++) { //以后考虑用对象池实例化RomFile - nesRomFetchList[i] = new RomFile(m_platform, i, i / PAGE_SIZE); + nesRomFetchList[i] = new RomFile(i, i / PAGE_SIZE); } SaveRomInfoFromWeb(romList); callback.Invoke(nesRomFetchList); - }, - //TODO 平台参数 - AxibugProtobuf.RomPlatformType.Nes - , searchKey, 0, PAGE_SIZE); + }, m_platform, searchKey, 0, PAGE_SIZE); } } diff --git a/AxibugEmuOnline.Client/Assets/Script/AppMain/NesEmulator/NesEmulator.cs b/AxibugEmuOnline.Client/Assets/Script/AppMain/NesEmulator/NesEmulator.cs index 3ecf771b..b6977b31 100644 --- a/AxibugEmuOnline.Client/Assets/Script/AppMain/NesEmulator/NesEmulator.cs +++ b/AxibugEmuOnline.Client/Assets/Script/AppMain/NesEmulator/NesEmulator.cs @@ -4,6 +4,7 @@ using System.Globalization; using System.IO; using System.Xml.Linq; using AxibugEmuOnline.Client.ClientCore; +using AxibugProtobuf; using UnityEditor; using UnityEngine; using VirtualNes.Core; @@ -58,7 +59,7 @@ namespace AxibugEmuOnline.Client VideoProvider.ApplyFilterEffect(); } - public EnumSupportEmuPlatform Platform => EnumSupportEmuPlatform.NES; + public RomPlatformType Platform => RomPlatformType.Nes; private CoreSupporter m_coreSupporter; /// /// 指定ROM开始游戏 diff --git a/AxibugEmuOnline.Client/Assets/Script/AppMain/NesEmulator/VideoProvider.cs b/AxibugEmuOnline.Client/Assets/Script/AppMain/NesEmulator/VideoProvider.cs index c4faca6f..f75af24d 100644 --- a/AxibugEmuOnline.Client/Assets/Script/AppMain/NesEmulator/VideoProvider.cs +++ b/AxibugEmuOnline.Client/Assets/Script/AppMain/NesEmulator/VideoProvider.cs @@ -1,4 +1,5 @@ using AxibugEmuOnline.Client.ClientCore; +using AxibugProtobuf; using System; using System.Runtime.InteropServices; using UnityEngine; @@ -84,7 +85,7 @@ namespace AxibugEmuOnline.Client public void ApplyScreenScaler() { - App.settings.ScreenScaler.CalcScale(Image, EnumSupportEmuPlatform.NES); + App.settings.ScreenScaler.CalcScale(Image, RomPlatformType.Nes); } private unsafe void PrepareUI(uint* screenData) diff --git a/AxibugEmuOnline.Client/Assets/Script/AppMain/Protobuf/ProtobufAxibugEmuOnline.cs b/AxibugEmuOnline.Client/Assets/Script/AppMain/Protobuf/ProtobufAxibugEmuOnline.cs index df483bad..188c6399 100644 --- a/AxibugEmuOnline.Client/Assets/Script/AppMain/Protobuf/ProtobufAxibugEmuOnline.cs +++ b/AxibugEmuOnline.Client/Assets/Script/AppMain/Protobuf/ProtobufAxibugEmuOnline.cs @@ -133,15 +133,15 @@ namespace AxibugProtobuf { "U3dpdGNoSm95Q29uEAcSEgoOWEJPWDM2MENvbnRyb2wQCBISCg5YQk9YT05F", "Q29udHJvbBAJEhEKDVBTVml0YUNvbnRyb2wQChISCg5XaWlVUGFkQ29udHJv", "bBALEhQKEFdpaVJlbW90ZUNvbnRyb2wQDBIWChJOaW50ZW5kbzNEU0NvbnRy", - "b2wQDSqUAQoPUm9tUGxhdGZvcm1UeXBlEgcKA0FsbBAAEgcKA05lcxABEhEK", - "DU1hc3Rlcl9TeXN0ZW0QAhINCglHYW1lX0dlYXIQAxIMCghHYW1lX0JveRAE", - "EhIKDkdhbWVfQm95X0NvbG9yEAUSEQoNQ29sZWNvX1Zpc2lvbhAGEgsKB1ND", - "XzMwMDAQBxILCgdTR18xMDAwEAgqcAoNUm9vbUdhbWVTdGF0ZRISCg5Ob25l", - "X0dhbWVTdGF0ZRAAEgwKCE9ubHlIb3N0EAESEQoNV2FpdFJhd1VwZGF0ZRAC", - "Eg0KCVdhaXRSZWFkeRADEgkKBVBhdXNlEAQSEAoMSW5PbmxpbmVHYW1lEAUq", - "TgoRTG9naW5SZXN1bHRTdGF0dXMSIQodTG9naW5SZXN1bHRTdGF0dXNfQmFz", - "ZURlZmF1bHQQABIGCgJPSxABEg4KCkFjY291bnRFcnIQAkICSAFiBnByb3Rv", - "Mw==")); + "b2wQDSqiAQoPUm9tUGxhdGZvcm1UeXBlEgsKB0ludmFsaWQQABIHCgNOZXMQ", + "ARIRCg1NYXN0ZXJfU3lzdGVtEAISDQoJR2FtZV9HZWFyEAMSDAoIR2FtZV9C", + "b3kQBBISCg5HYW1lX0JveV9Db2xvchAFEhEKDUNvbGVjb19WaXNpb24QBhIL", + "CgdTQ18zMDAwEAcSCwoHU0dfMTAwMBAIEggKA0FsbBDnBypwCg1Sb29tR2Ft", + "ZVN0YXRlEhIKDk5vbmVfR2FtZVN0YXRlEAASDAoIT25seUhvc3QQARIRCg1X", + "YWl0UmF3VXBkYXRlEAISDQoJV2FpdFJlYWR5EAMSCQoFUGF1c2UQBBIQCgxJ", + "bk9ubGluZUdhbWUQBSpOChFMb2dpblJlc3VsdFN0YXR1cxIhCh1Mb2dpblJl", + "c3VsdFN0YXR1c19CYXNlRGVmYXVsdBAAEgYKAk9LEAESDgoKQWNjb3VudEVy", + "chACQgJIAWIGcHJvdG8z")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, new pbr::FileDescriptor[] { }, new pbr::GeneratedClrTypeInfo(new[] {typeof(global::AxibugProtobuf.CommandID), typeof(global::AxibugProtobuf.ErrorCode), typeof(global::AxibugProtobuf.LoginType), typeof(global::AxibugProtobuf.DeviceType), typeof(global::AxibugProtobuf.GamePadType), typeof(global::AxibugProtobuf.RomPlatformType), typeof(global::AxibugProtobuf.RoomGameState), typeof(global::AxibugProtobuf.LoginResultStatus), }, null, new pbr::GeneratedClrTypeInfo[] { @@ -416,7 +416,7 @@ namespace AxibugProtobuf { } public enum RomPlatformType { - [pbr::OriginalName("All")] All = 0, + [pbr::OriginalName("Invalid")] Invalid = 0, [pbr::OriginalName("Nes")] Nes = 1, [pbr::OriginalName("Master_System")] MasterSystem = 2, [pbr::OriginalName("Game_Gear")] GameGear = 3, @@ -425,6 +425,7 @@ namespace AxibugProtobuf { [pbr::OriginalName("Coleco_Vision")] ColecoVision = 6, [pbr::OriginalName("SC_3000")] Sc3000 = 7, [pbr::OriginalName("SG_1000")] Sg1000 = 8, + [pbr::OriginalName("All")] All = 999, } public enum RoomGameState { diff --git a/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/GamesUI/RomListMenuItem.cs b/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/GamesUI/RomListMenuItem.cs index 37c54e10..8da6736a 100644 --- a/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/GamesUI/RomListMenuItem.cs +++ b/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/GamesUI/RomListMenuItem.cs @@ -1,4 +1,5 @@ using AxibugEmuOnline.Client.ClientCore; +using AxibugProtobuf; using System; using System.Collections.Generic; using UnityEngine; @@ -8,7 +9,7 @@ namespace AxibugEmuOnline.Client public class RomListMenuItem : VirtualSubMenuItem { [SerializeField] - protected EnumSupportEmuPlatform Platform; + protected RomPlatformType Platform; private RomLib RomLib { @@ -16,7 +17,7 @@ namespace AxibugEmuOnline.Client { switch (Platform) { - case EnumSupportEmuPlatform.NES: + case RomPlatformType.Nes: return App.nesRomLib; default: throw new System.NotImplementedException($"未实现的平台 {Platform}"); diff --git a/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/RoomUI/RoomItem.cs b/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/RoomUI/RoomItem.cs index 6842aed6..b926f668 100644 --- a/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/RoomUI/RoomItem.cs +++ b/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/RoomUI/RoomItem.cs @@ -86,7 +86,7 @@ namespace AxibugEmuOnline.Client SetBaseInfo("--", $"{hostNick}的房间", $"{cur}/{max}"); SetIcon(null); - roomInfo.FetchRomFileInRoomInfo(EnumSupportEmuPlatform.NES, (room, romFile) => + roomInfo.FetchRomFileInRoomInfo(RomPlatformType.Nes, (room, romFile) => { if (room.RoomID != RoomID) return; diff --git a/AxibugEmuOnline.Client/Assets/Script/AppMain/Utility.cs b/AxibugEmuOnline.Client/Assets/Script/AppMain/Utility.cs index 2689c5ef..6754ee49 100644 --- a/AxibugEmuOnline.Client/Assets/Script/AppMain/Utility.cs +++ b/AxibugEmuOnline.Client/Assets/Script/AppMain/Utility.cs @@ -34,7 +34,7 @@ namespace AxibugEmuOnline.Client } private static Dictionary s_RomFileCahcesInRoomInfo = new Dictionary(); - public static void FetchRomFileInRoomInfo(this Protobuf_Room_MiniInfo roomInfo, EnumSupportEmuPlatform platform, Action callback) + public static void FetchRomFileInRoomInfo(this Protobuf_Room_MiniInfo roomInfo, RomPlatformType platform, Action callback) { RomFile romFile; @@ -45,10 +45,10 @@ namespace AxibugEmuOnline.Client } switch (platform) { - case EnumSupportEmuPlatform.NES: + case RomPlatformType.Nes: App.StartCoroutine(App.httpAPI.GetRomInfo(roomInfo.GameRomID, (romWebData) => { - RomFile _romFile = new RomFile(EnumSupportEmuPlatform.NES, 0, 0); + RomFile _romFile = new RomFile(0, 0); _romFile.SetWebData(romWebData); s_RomFileCahcesInRoomInfo[roomInfo.GameRomID] = _romFile; diff --git a/AxibugEmuOnline.Server/Protobuf/ProtobufAxibugEmuOnline.cs b/AxibugEmuOnline.Server/Protobuf/ProtobufAxibugEmuOnline.cs index df483bad..188c6399 100644 --- a/AxibugEmuOnline.Server/Protobuf/ProtobufAxibugEmuOnline.cs +++ b/AxibugEmuOnline.Server/Protobuf/ProtobufAxibugEmuOnline.cs @@ -133,15 +133,15 @@ namespace AxibugProtobuf { "U3dpdGNoSm95Q29uEAcSEgoOWEJPWDM2MENvbnRyb2wQCBISCg5YQk9YT05F", "Q29udHJvbBAJEhEKDVBTVml0YUNvbnRyb2wQChISCg5XaWlVUGFkQ29udHJv", "bBALEhQKEFdpaVJlbW90ZUNvbnRyb2wQDBIWChJOaW50ZW5kbzNEU0NvbnRy", - "b2wQDSqUAQoPUm9tUGxhdGZvcm1UeXBlEgcKA0FsbBAAEgcKA05lcxABEhEK", - "DU1hc3Rlcl9TeXN0ZW0QAhINCglHYW1lX0dlYXIQAxIMCghHYW1lX0JveRAE", - "EhIKDkdhbWVfQm95X0NvbG9yEAUSEQoNQ29sZWNvX1Zpc2lvbhAGEgsKB1ND", - "XzMwMDAQBxILCgdTR18xMDAwEAgqcAoNUm9vbUdhbWVTdGF0ZRISCg5Ob25l", - "X0dhbWVTdGF0ZRAAEgwKCE9ubHlIb3N0EAESEQoNV2FpdFJhd1VwZGF0ZRAC", - "Eg0KCVdhaXRSZWFkeRADEgkKBVBhdXNlEAQSEAoMSW5PbmxpbmVHYW1lEAUq", - "TgoRTG9naW5SZXN1bHRTdGF0dXMSIQodTG9naW5SZXN1bHRTdGF0dXNfQmFz", - "ZURlZmF1bHQQABIGCgJPSxABEg4KCkFjY291bnRFcnIQAkICSAFiBnByb3Rv", - "Mw==")); + "b2wQDSqiAQoPUm9tUGxhdGZvcm1UeXBlEgsKB0ludmFsaWQQABIHCgNOZXMQ", + "ARIRCg1NYXN0ZXJfU3lzdGVtEAISDQoJR2FtZV9HZWFyEAMSDAoIR2FtZV9C", + "b3kQBBISCg5HYW1lX0JveV9Db2xvchAFEhEKDUNvbGVjb19WaXNpb24QBhIL", + "CgdTQ18zMDAwEAcSCwoHU0dfMTAwMBAIEggKA0FsbBDnBypwCg1Sb29tR2Ft", + "ZVN0YXRlEhIKDk5vbmVfR2FtZVN0YXRlEAASDAoIT25seUhvc3QQARIRCg1X", + "YWl0UmF3VXBkYXRlEAISDQoJV2FpdFJlYWR5EAMSCQoFUGF1c2UQBBIQCgxJ", + "bk9ubGluZUdhbWUQBSpOChFMb2dpblJlc3VsdFN0YXR1cxIhCh1Mb2dpblJl", + "c3VsdFN0YXR1c19CYXNlRGVmYXVsdBAAEgYKAk9LEAESDgoKQWNjb3VudEVy", + "chACQgJIAWIGcHJvdG8z")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, new pbr::FileDescriptor[] { }, new pbr::GeneratedClrTypeInfo(new[] {typeof(global::AxibugProtobuf.CommandID), typeof(global::AxibugProtobuf.ErrorCode), typeof(global::AxibugProtobuf.LoginType), typeof(global::AxibugProtobuf.DeviceType), typeof(global::AxibugProtobuf.GamePadType), typeof(global::AxibugProtobuf.RomPlatformType), typeof(global::AxibugProtobuf.RoomGameState), typeof(global::AxibugProtobuf.LoginResultStatus), }, null, new pbr::GeneratedClrTypeInfo[] { @@ -416,7 +416,7 @@ namespace AxibugProtobuf { } public enum RomPlatformType { - [pbr::OriginalName("All")] All = 0, + [pbr::OriginalName("Invalid")] Invalid = 0, [pbr::OriginalName("Nes")] Nes = 1, [pbr::OriginalName("Master_System")] MasterSystem = 2, [pbr::OriginalName("Game_Gear")] GameGear = 3, @@ -425,6 +425,7 @@ namespace AxibugProtobuf { [pbr::OriginalName("Coleco_Vision")] ColecoVision = 6, [pbr::OriginalName("SC_3000")] Sc3000 = 7, [pbr::OriginalName("SG_1000")] Sg1000 = 8, + [pbr::OriginalName("All")] All = 999, } public enum RoomGameState { diff --git a/ProtobufCore/out/CS/ProtobufAxibugEmuOnline.cs b/ProtobufCore/out/CS/ProtobufAxibugEmuOnline.cs index df483bad..188c6399 100644 --- a/ProtobufCore/out/CS/ProtobufAxibugEmuOnline.cs +++ b/ProtobufCore/out/CS/ProtobufAxibugEmuOnline.cs @@ -133,15 +133,15 @@ namespace AxibugProtobuf { "U3dpdGNoSm95Q29uEAcSEgoOWEJPWDM2MENvbnRyb2wQCBISCg5YQk9YT05F", "Q29udHJvbBAJEhEKDVBTVml0YUNvbnRyb2wQChISCg5XaWlVUGFkQ29udHJv", "bBALEhQKEFdpaVJlbW90ZUNvbnRyb2wQDBIWChJOaW50ZW5kbzNEU0NvbnRy", - "b2wQDSqUAQoPUm9tUGxhdGZvcm1UeXBlEgcKA0FsbBAAEgcKA05lcxABEhEK", - "DU1hc3Rlcl9TeXN0ZW0QAhINCglHYW1lX0dlYXIQAxIMCghHYW1lX0JveRAE", - "EhIKDkdhbWVfQm95X0NvbG9yEAUSEQoNQ29sZWNvX1Zpc2lvbhAGEgsKB1ND", - "XzMwMDAQBxILCgdTR18xMDAwEAgqcAoNUm9vbUdhbWVTdGF0ZRISCg5Ob25l", - "X0dhbWVTdGF0ZRAAEgwKCE9ubHlIb3N0EAESEQoNV2FpdFJhd1VwZGF0ZRAC", - "Eg0KCVdhaXRSZWFkeRADEgkKBVBhdXNlEAQSEAoMSW5PbmxpbmVHYW1lEAUq", - "TgoRTG9naW5SZXN1bHRTdGF0dXMSIQodTG9naW5SZXN1bHRTdGF0dXNfQmFz", - "ZURlZmF1bHQQABIGCgJPSxABEg4KCkFjY291bnRFcnIQAkICSAFiBnByb3Rv", - "Mw==")); + "b2wQDSqiAQoPUm9tUGxhdGZvcm1UeXBlEgsKB0ludmFsaWQQABIHCgNOZXMQ", + "ARIRCg1NYXN0ZXJfU3lzdGVtEAISDQoJR2FtZV9HZWFyEAMSDAoIR2FtZV9C", + "b3kQBBISCg5HYW1lX0JveV9Db2xvchAFEhEKDUNvbGVjb19WaXNpb24QBhIL", + "CgdTQ18zMDAwEAcSCwoHU0dfMTAwMBAIEggKA0FsbBDnBypwCg1Sb29tR2Ft", + "ZVN0YXRlEhIKDk5vbmVfR2FtZVN0YXRlEAASDAoIT25seUhvc3QQARIRCg1X", + "YWl0UmF3VXBkYXRlEAISDQoJV2FpdFJlYWR5EAMSCQoFUGF1c2UQBBIQCgxJ", + "bk9ubGluZUdhbWUQBSpOChFMb2dpblJlc3VsdFN0YXR1cxIhCh1Mb2dpblJl", + "c3VsdFN0YXR1c19CYXNlRGVmYXVsdBAAEgYKAk9LEAESDgoKQWNjb3VudEVy", + "chACQgJIAWIGcHJvdG8z")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, new pbr::FileDescriptor[] { }, new pbr::GeneratedClrTypeInfo(new[] {typeof(global::AxibugProtobuf.CommandID), typeof(global::AxibugProtobuf.ErrorCode), typeof(global::AxibugProtobuf.LoginType), typeof(global::AxibugProtobuf.DeviceType), typeof(global::AxibugProtobuf.GamePadType), typeof(global::AxibugProtobuf.RomPlatformType), typeof(global::AxibugProtobuf.RoomGameState), typeof(global::AxibugProtobuf.LoginResultStatus), }, null, new pbr::GeneratedClrTypeInfo[] { @@ -416,7 +416,7 @@ namespace AxibugProtobuf { } public enum RomPlatformType { - [pbr::OriginalName("All")] All = 0, + [pbr::OriginalName("Invalid")] Invalid = 0, [pbr::OriginalName("Nes")] Nes = 1, [pbr::OriginalName("Master_System")] MasterSystem = 2, [pbr::OriginalName("Game_Gear")] GameGear = 3, @@ -425,6 +425,7 @@ namespace AxibugProtobuf { [pbr::OriginalName("Coleco_Vision")] ColecoVision = 6, [pbr::OriginalName("SC_3000")] Sc3000 = 7, [pbr::OriginalName("SG_1000")] Sg1000 = 8, + [pbr::OriginalName("All")] All = 999, } public enum RoomGameState { diff --git a/ProtobufCore/proto/protobuf_AxibugEmuOnline.proto b/ProtobufCore/proto/protobuf_AxibugEmuOnline.proto index 7150bcec..f2aaa5e0 100644 --- a/ProtobufCore/proto/protobuf_AxibugEmuOnline.proto +++ b/ProtobufCore/proto/protobuf_AxibugEmuOnline.proto @@ -126,7 +126,7 @@ enum GamePadType //手柄类型 enum RomPlatformType { - All = 0; + Invalid = 0; Nes = 1; Master_System = 2; Game_Gear = 3; @@ -135,6 +135,7 @@ enum RomPlatformType Coleco_Vision = 6; SC_3000 = 7; SG_1000 = 8; + All = 999; } //enum RoomPlayerState