From 9d1a09045fc91e31d3ac542a217873a0eeb7d4c0 Mon Sep 17 00:00:00 2001 From: "ALIENJACK\\alien" Date: Tue, 7 Jan 2025 16:43:54 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=BArom=E5=88=97=E8=A1=A8=E5=92=8Croom?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E9=80=89=E4=B8=AD=E6=97=B6,=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E4=B8=80=E4=B8=AA=E5=85=A8=E5=B1=8F=E6=A8=A1=E7=B3=8A?= =?UTF-8?q?=E8=83=8C=E6=99=AF=E6=95=88=E6=9E=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../UIEffect/Materials/UI-Effect.mat | 51 ++++- .../Resources/UIPrefabs/LaunchUI.prefab | 179 +++++++++++++++++- .../Script/AppMain/UI/GamesUI/RomItem.cs | 9 + .../Assets/Script/AppMain/UI/LaunchUI.cs | 43 ++++- .../Script/AppMain/UI/RoomUI/RoomItem.cs | 12 +- 5 files changed, 276 insertions(+), 18 deletions(-) diff --git a/AxibugEmuOnline.Client/Assets/Plugins/Coffee/UIExtensions/UIEffect/Materials/UI-Effect.mat b/AxibugEmuOnline.Client/Assets/Plugins/Coffee/UIExtensions/UIEffect/Materials/UI-Effect.mat index 75ab7d09..ea1b985d 100644 --- a/AxibugEmuOnline.Client/Assets/Plugins/Coffee/UIExtensions/UIEffect/Materials/UI-Effect.mat +++ b/AxibugEmuOnline.Client/Assets/Plugins/Coffee/UIExtensions/UIEffect/Materials/UI-Effect.mat @@ -275,7 +275,9 @@ Material: m_Shader: {fileID: 4800000, guid: b868e81d0156245e08c8646b4fb68d7a, type: 3} m_Parent: {fileID: 0} m_ModifiedSerializedProperties: 0 - m_ValidKeywords: [] + m_ValidKeywords: + - DETAILBLUR + - FILL m_InvalidKeywords: [] m_LightmapFlags: 5 m_EnableInstancingVariants: 0 @@ -616,7 +618,9 @@ Material: m_Shader: {fileID: 4800000, guid: b868e81d0156245e08c8646b4fb68d7a, type: 3} m_Parent: {fileID: 0} m_ModifiedSerializedProperties: 0 - m_ValidKeywords: [] + m_ValidKeywords: + - DETAILBLUR + - NEGA m_InvalidKeywords: [] m_LightmapFlags: 5 m_EnableInstancingVariants: 0 @@ -632,6 +636,10 @@ Material: m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} + - _ParamTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} m_Ints: [] m_Floats: - _ColorMask: 15 @@ -3572,7 +3580,9 @@ Material: m_Shader: {fileID: 4800000, guid: b868e81d0156245e08c8646b4fb68d7a, type: 3} m_Parent: {fileID: 0} m_ModifiedSerializedProperties: 0 - m_ValidKeywords: [] + m_ValidKeywords: + - DETAILBLUR + - SEPIA m_InvalidKeywords: [] m_LightmapFlags: 5 m_EnableInstancingVariants: 0 @@ -3588,6 +3598,10 @@ Material: m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} + - _ParamTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} m_Ints: [] m_Floats: - _ColorMask: 15 @@ -4062,7 +4076,9 @@ Material: m_Shader: {fileID: 4800000, guid: b868e81d0156245e08c8646b4fb68d7a, type: 3} m_Parent: {fileID: 0} m_ModifiedSerializedProperties: 0 - m_ValidKeywords: [] + m_ValidKeywords: + - DETAILBLUR + - SUBTRACT m_InvalidKeywords: [] m_LightmapFlags: 5 m_EnableInstancingVariants: 0 @@ -4078,6 +4094,10 @@ Material: m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} + - _ParamTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} m_Ints: [] m_Floats: - _ColorMask: 15 @@ -4182,7 +4202,9 @@ Material: m_Shader: {fileID: 4800000, guid: b868e81d0156245e08c8646b4fb68d7a, type: 3} m_Parent: {fileID: 0} m_ModifiedSerializedProperties: 0 - m_ValidKeywords: [] + m_ValidKeywords: + - ADD + - DETAILBLUR m_InvalidKeywords: [] m_LightmapFlags: 5 m_EnableInstancingVariants: 0 @@ -4270,7 +4292,9 @@ Material: m_Shader: {fileID: 4800000, guid: b868e81d0156245e08c8646b4fb68d7a, type: 3} m_Parent: {fileID: 0} m_ModifiedSerializedProperties: 0 - m_ValidKeywords: [] + m_ValidKeywords: + - DETAILBLUR + - GRAYSCALE m_InvalidKeywords: [] m_LightmapFlags: 5 m_EnableInstancingVariants: 0 @@ -4286,6 +4310,10 @@ Material: m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} + - _ParamTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} m_Ints: [] m_Floats: - _ColorMask: 15 @@ -4850,7 +4878,9 @@ Material: m_Shader: {fileID: 4800000, guid: b868e81d0156245e08c8646b4fb68d7a, type: 3} m_Parent: {fileID: 0} m_ModifiedSerializedProperties: 0 - m_ValidKeywords: [] + m_ValidKeywords: + - DETAILBLUR + - PIXEL m_InvalidKeywords: [] m_LightmapFlags: 5 m_EnableInstancingVariants: 0 @@ -4866,6 +4896,10 @@ Material: m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} + - _ParamTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} m_Ints: [] m_Floats: - _ColorMask: 15 @@ -5585,7 +5619,8 @@ Material: m_Shader: {fileID: 4800000, guid: b868e81d0156245e08c8646b4fb68d7a, type: 3} m_Parent: {fileID: 0} m_ModifiedSerializedProperties: 0 - m_ValidKeywords: [] + m_ValidKeywords: + - MEDIUMBLUR m_InvalidKeywords: [] m_LightmapFlags: 5 m_EnableInstancingVariants: 0 diff --git a/AxibugEmuOnline.Client/Assets/Resources/UIPrefabs/LaunchUI.prefab b/AxibugEmuOnline.Client/Assets/Resources/UIPrefabs/LaunchUI.prefab index 1c85858e..bf1e13f0 100644 --- a/AxibugEmuOnline.Client/Assets/Resources/UIPrefabs/LaunchUI.prefab +++ b/AxibugEmuOnline.Client/Assets/Resources/UIPrefabs/LaunchUI.prefab @@ -139,6 +139,123 @@ MonoBehaviour: SubMenus: [] HoriRollSpd: 1500 InitSelect: 1 +--- !u!1 &1551260616775499633 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 8030738230415871255} + - component: {fileID: 1749614979705703043} + - component: {fileID: 2831564238218273703} + - component: {fileID: 6913951815547872457} + - component: {fileID: 968819366492627815} + m_Layer: 5 + m_Name: RomPreview + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!224 &8030738230415871255 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1551260616775499633} + 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: 1639091784002085428} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0.00012207031, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &1749614979705703043 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1551260616775499633} + m_CullTransparentMesh: 1 +--- !u!114 &2831564238218273703 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1551260616775499633} + 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: 0} + 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!225 &6913951815547872457 +CanvasGroup: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1551260616775499633} + m_Enabled: 1 + m_Alpha: 1 + m_Interactable: 1 + m_BlocksRaycasts: 1 + m_IgnoreParentGroups: 0 +--- !u!114 &968819366492627815 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1551260616775499633} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f8b2ed11d675446c5a49da1ea296d490, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Version: 300 + m_EffectMaterial: {fileID: 21563344409783084, guid: aee96bc531e6eba468ec405e536f515f, type: 2} + m_EffectFactor: 1 + m_ColorFactor: 1 + m_BlurFactor: 1 + m_EffectMode: 0 + m_ColorMode: 0 + m_BlurMode: 1 + m_AdvancedBlur: 0 + m_ShadowBlur: 1 + m_ShadowStyle: 0 + m_ShadowColor: {r: 0, g: 0, b: 0, a: 1} + m_EffectDistance: {x: 1, y: -1} + m_UseGraphicAlpha: 1 + m_EffectColor: {r: 1, g: 1, b: 1, a: 1} + m_AdditionalShadows: [] --- !u!1 &1639091783724093882 GameObject: m_ObjectHideFlags: 0 @@ -153,7 +270,7 @@ GameObject: - component: {fileID: 3473513813641582791} - component: {fileID: 3025550092845034426} m_Layer: 5 - m_Name: bg + m_Name: XMBBackground m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 @@ -171,12 +288,12 @@ RectTransform: m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] - m_Father: {fileID: 1639091784002085428} + m_Father: {fileID: 3978167929173065121} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 1, y: 1} m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 0.00012207031, y: 0} + m_SizeDelta: {x: 0, y: 0} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &1639091783724093861 CanvasRenderer: @@ -270,7 +387,8 @@ RectTransform: m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: - - {fileID: 1639091783724093883} + - {fileID: 3978167929173065121} + - {fileID: 8030738230415871255} - {fileID: 1924338507} m_Father: {fileID: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} @@ -293,7 +411,9 @@ MonoBehaviour: m_EditorClassIdentifier: MainMenuRoot: {fileID: 1924338507} MainMenu: {fileID: 4533431376032812611} - BG: {fileID: 1639091783724093860} + XMBBackground: {fileID: 1639091783724093860} + RomPreviewBigPic: {fileID: 2831564238218273703} + XMBCG_For_RomPreviewBigPic: {fileID: 1747598380906379634} m_detailLayoutPosition_x: 55 m_LayoutChangeSpeed: 1000 --- !u!1 &3732356966700017678 @@ -376,6 +496,55 @@ MonoBehaviour: m_EditorClassIdentifier: m_HorizontalFit: 2 m_VerticalFit: 2 +--- !u!1 &5147744065509886959 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 3978167929173065121} + - component: {fileID: 1747598380906379634} + m_Layer: 5 + m_Name: romPreviewOpp + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &3978167929173065121 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5147744065509886959} + 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: + - {fileID: 1639091783724093883} + m_Father: {fileID: 1639091784002085428} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!225 &1747598380906379634 +CanvasGroup: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5147744065509886959} + m_Enabled: 1 + m_Alpha: 1 + m_Interactable: 1 + m_BlocksRaycasts: 1 + m_IgnoreParentGroups: 0 --- !u!1001 &799626603263598074 PrefabInstance: m_ObjectHideFlags: 0 diff --git a/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/GamesUI/RomItem.cs b/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/GamesUI/RomItem.cs index df913641..9cba870d 100644 --- a/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/GamesUI/RomItem.cs +++ b/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/GamesUI/RomItem.cs @@ -45,6 +45,14 @@ namespace AxibugEmuOnline.Client SetSelectState(data is ThirdMenuRoot && ((ThirdMenuRoot)data).SelectIndex == Index); } + protected override void OnSelected(float progress) + { + base.OnSelected(progress); + + if (m_romImage.sprite == null) LaunchUI.Instance.HideRomPreview(); + else LaunchUI.Instance.SetRomPreview(m_romImage.sprite); + } + public void Release() { m_romfile.OnInfoFilled -= OnRomInfoFilled; @@ -69,6 +77,7 @@ namespace AxibugEmuOnline.Client if (!m_romfile.InfoReady || url != m_romfile.ImageURL) return; m_romImage.sprite = img; + if (m_select) LaunchUI.Instance.SetRomPreview(img); }); } } diff --git a/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/LaunchUI.cs b/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/LaunchUI.cs index ec562ffb..d279cd91 100644 --- a/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/LaunchUI.cs +++ b/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/LaunchUI.cs @@ -1,4 +1,4 @@ -using AxibugEmuOnline.Client.ClientCore; +using AxibugEmuOnline.Client.ClientCore; using AxibugEmuOnline.Client.UI; using DG.Tweening; using DG.Tweening.Core; @@ -14,7 +14,12 @@ namespace AxibugEmuOnline.Client RectTransform MainMenuRoot; [SerializeField] MainMenuController MainMenu; - public Image BG; + [SerializeField] + Image XMBBackground; + [SerializeField] + Image RomPreviewBigPic; + [SerializeField] + CanvasGroup XMBCG_For_RomPreviewBigPic; Vector2 m_mainLayoutPosition; [SerializeField] @@ -25,12 +30,14 @@ namespace AxibugEmuOnline.Client public static LaunchUI Instance { get; private set; } TweenerCore m_layoutTween; + AlphaWraper romPreviewWraper; private void Awake() { Instance = this; m_mainLayoutPosition = MainMenuRoot.anchoredPosition; MainMenu.ListenControlAction = true; + romPreviewWraper = new AlphaWraper(XMBCG_For_RomPreviewBigPic, RomPreviewBigPic.GetComponent(), false); } private void Start() @@ -46,14 +53,40 @@ namespace AxibugEmuOnline.Client public void HideMainMenu() { - BG.gameObject.SetActiveEx(false); + XMBBackground.gameObject.SetActiveEx(false); MainMenuRoot.gameObject.SetActiveEx(false); + RomPreviewBigPic.gameObject.SetActiveEx(false); } public void ShowMainMenu() { - BG.gameObject.SetActiveEx(true); + XMBBackground.gameObject.SetActiveEx(true); MainMenuRoot.gameObject.SetActiveEx(true); + + if (romPreviewWraper.On) + { + XMBCG_For_RomPreviewBigPic.gameObject.SetActive(false); + RomPreviewBigPic.gameObject.SetActive(true); + } + else if (!romPreviewWraper.On) + { + XMBCG_For_RomPreviewBigPic.gameObject.SetActive(true); + XMBCG_For_RomPreviewBigPic.alpha = 1; + RomPreviewBigPic.gameObject.SetActive(false); + } + } + + public void HideRomPreview() + { + romPreviewWraper.On = false; + } + + public void SetRomPreview(Sprite sp) + { + if (MainMenu.ListenControlAction) return; + + RomPreviewBigPic.sprite = sp; + romPreviewWraper.On = true; } public void ToDetailMenuLayout() @@ -89,6 +122,8 @@ namespace AxibugEmuOnline.Client .SetSpeedBased(); MainMenu.ListenControlAction = true; MainMenu.ExitDetailState(); + + HideRomPreview(); } } } diff --git a/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/RoomUI/RoomItem.cs b/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/RoomUI/RoomItem.cs index aeb938f0..08ed2334 100644 --- a/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/RoomUI/RoomItem.cs +++ b/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/RoomUI/RoomItem.cs @@ -3,6 +3,7 @@ using AxibugEmuOnline.Client.Event; using AxibugEmuOnline.Client.Manager; using AxibugEmuOnline.Client.UI; using AxibugProtobuf; +using Sony.Vita.Dialog; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; @@ -48,6 +49,14 @@ namespace AxibugEmuOnline.Client UpdateUI(roomInfo); } + protected override void OnSelected(float progress) + { + base.OnSelected(progress); + + if (Icon.sprite == null) LaunchUI.Instance.HideRomPreview(); + else LaunchUI.Instance.SetRomPreview(Icon.sprite); + } + public override bool OnEnterItem() { if (m_romFile == null) return false; @@ -128,8 +137,9 @@ namespace AxibugEmuOnline.Client { if (m_romFile == null) return; if (m_romFile.ImageURL != url) return; - SetIcon(sprite); + + if (m_select) LaunchUI.Instance.SetRomPreview(sprite); } public void SetDependencyProperty(object data)