팝업 UI 수정 중

This commit is contained in:
NTG_Lenovo 2025-08-04 20:01:43 +09:00
parent bd3311193e
commit 669ddf3305
41 changed files with 3982 additions and 845 deletions

View File

@ -95,6 +95,11 @@ MonoBehaviour:
m_SerializedLabels:
- Atlas
FlaggedDuringContentUpdateRestriction: 0
- m_GUID: 8073fcaf56fc7c34e996d0d47044f146
m_Address: RestaurantManagementUi_RestaurantUiActions_InputBindingSo
m_ReadOnly: 0
m_SerializedLabels: []
FlaggedDuringContentUpdateRestriction: 0
- m_GUID: 83afdd7c8e0232443a83b09a90d0d3b1
m_Address: InventorySlotUi
m_ReadOnly: 0
@ -113,7 +118,7 @@ MonoBehaviour:
- Atlas
FlaggedDuringContentUpdateRestriction: 0
- m_GUID: 99d3d87bd43df65488e757c43a308f36
m_Address: RestaurantManagementUi_RestaurantUiActions_InputBindingSo
m_Address: ConfirmUi_RestaurantUiActions_InputBindingSo
m_ReadOnly: 0
m_SerializedLabels: []
FlaggedDuringContentUpdateRestriction: 0
@ -123,12 +128,6 @@ MonoBehaviour:
m_SerializedLabels:
- Scene
FlaggedDuringContentUpdateRestriction: 0
- m_GUID: a6e29c94b45be18498c195333e651353
m_Address: RestaurantManagementUi
m_ReadOnly: 0
m_SerializedLabels:
- Atlas
FlaggedDuringContentUpdateRestriction: 0
- m_GUID: be3e2271305612d4ab3277c241ffe629
m_Address: Restaurant2
m_ReadOnly: 0

File diff suppressed because one or more lines are too long

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 10bc22a2465285644b6e1729a56e8231
guid: e764d6b594d087b4086f0da8ed158f38
folderAsset: yes
DefaultImporter:
externalObjects: {}

File diff suppressed because it is too large Load Diff

View File

@ -1,8 +1,8 @@
fileFormatVersion: 2
guid: a94c7e9699c81d346abc4f0ad9edad30
folderAsset: yes
DefaultImporter:
guid: 662dee01fb75baf4a8b0706a2a8997d1
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 9100000
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: cbafa398b3947574b824d35897f49ccf
guid: 06a0a9d47bd44694697540b19cdd87c3
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
@ -49,7 +49,7 @@ TextureImporter:
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 24, y: 24, z: 24, w: 24}
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
@ -127,7 +127,7 @@ TextureImporter:
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 1537655665
internalID: 0
vertices: []
indices:
edges: []

Binary file not shown.

View File

@ -1,168 +0,0 @@
fileFormatVersion: 2
guid: 3939e20d1f2d4ad4089c9ed7f9ebae9e
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 13
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
flipGreenChannel: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMipmapLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 1
wrapV: 1
wrapW: 0
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 2
spriteExtrude: 2
spriteMeshType: 0
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
swizzle: 50462976
cookieLightType: 0
platformSettings:
- serializedVersion: 4
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: Android
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: WindowsStoreApps
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites:
- serializedVersion: 2
name: GuideBox_0
rect:
serializedVersion: 2
x: 0
y: 54
width: 1920
height: 70
alignment: 0
pivot: {x: 0, y: 0}
border: {x: 0, y: 0, z: 0, w: 0}
customData:
outline: []
physicsShape: []
tessellationDetail: 0
bones: []
spriteID: 60b18e609b8129d4b81eb05417bcf9d6
internalID: 1729853425
vertices: []
indices:
edges: []
weights: []
outline: []
customData:
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spriteCustomMetadata:
entries:
- key: SpriteEditor.SliceSettings
value: '{"sliceOnImport":false,"gridCellCount":{"x":1.0,"y":1.0},"gridSpriteSize":{"x":64.0,"y":64.0},"gridSpriteOffset":{"x":0.0,"y":0.0},"gridSpritePadding":{"x":0.0,"y":0.0},"pivot":{"x":0.0,"y":0.0},"autoSlicingMethod":0,"spriteAlignment":0,"slicingType":0,"keepEmptyRects":false,"isAlternate":false}'
nameFileIdTable:
GuideBox_0: 1729853425
mipmapLimitGroupName:
pSDRemoveMatte: 0
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,143 +0,0 @@
fileFormatVersion: 2
guid: ec2d45105df048045a66465ba06a9c71
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 13
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
flipGreenChannel: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMipmapLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 1
wrapV: 1
wrapW: 0
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 2
spriteMeshType: 0
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 24, y: 24, z: 24, w: 24}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
swizzle: 50462976
cookieLightType: 0
platformSettings:
- serializedVersion: 4
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: Android
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: WindowsStoreApps
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
customData:
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 1537655665
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spriteCustomMetadata:
entries: []
nameFileIdTable: {}
mipmapLimitGroupName:
pSDRemoveMatte: 0
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,143 +0,0 @@
fileFormatVersion: 2
guid: adb24dd737033a1479943438b97402fa
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 13
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
flipGreenChannel: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMipmapLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 1
wrapV: 1
wrapW: 0
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 2
spriteMeshType: 0
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 36, y: 36, z: 36, w: 36}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
swizzle: 50462976
cookieLightType: 0
platformSettings:
- serializedVersion: 4
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: Android
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: WindowsStoreApps
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
customData:
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 1537655665
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spriteCustomMetadata:
entries: []
nameFileIdTable: {}
mipmapLimitGroupName:
pSDRemoveMatte: 0
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,143 +0,0 @@
fileFormatVersion: 2
guid: e735e8282b3d77a479f2b8a877ad2bc2
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 13
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
flipGreenChannel: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMipmapLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 1
wrapV: 1
wrapW: 0
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 2
spriteMeshType: 0
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 36, y: 36, z: 36, w: 36}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
swizzle: 50462976
cookieLightType: 0
platformSettings:
- serializedVersion: 4
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: Android
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: WindowsStoreApps
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
customData:
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 1537655665
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spriteCustomMetadata:
entries: []
nameFileIdTable: {}
mipmapLimitGroupName:
pSDRemoveMatte: 0
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,16 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 826fdca033cc8c141b0f7e39161c2880, type: 3}
m_Name: ConfirmUi_RestaurantUiActions_InputBindingSo
m_EditorClassIdentifier:
InputActionMaps: 3
BindingActions: 18

View File

@ -1,8 +1,8 @@
fileFormatVersion: 2
guid: d49b22a0c9b782343b8967596b590276
folderAsset: yes
DefaultImporter:
guid: 99d3d87bd43df65488e757c43a308f36
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 99d3d87bd43df65488e757c43a308f36
guid: 8073fcaf56fc7c34e996d0d47044f146
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000

View File

@ -47,7 +47,7 @@ TextureImporter:
spriteExtrude: 2
spriteMeshType: 0
alignment: 0
spritePivot: {x: 0.5, y: 0.072265625}
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
@ -140,7 +140,7 @@ TextureImporter:
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
internalID: 1537655665
vertices: []
indices:
edges: []

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,5 @@
using System;
using System.Threading.Tasks;
using UnityEngine;
namespace DDD
{
@ -11,7 +10,8 @@ public static class GameEvents
public static FadeOutEvent FadeOutEvent = new();
public static OpenPopupUiEvent OpenPopupUiEvent = new();
public static ClosePopupUiEvent ClosePopupUiEvent = new();
public static ShowGlobalMessageEvent RequestShowGlobalMessageEvent = new();
public static ShowGlobalMessageEvent ShowGlobalMessageEvent = new();
public static ShowConfirmPopupUiEvent ShowConfirmPopupUiEvent = new();
public static InventoryChangedEvent InventoryChangedEvent = new();
}
@ -57,6 +57,14 @@ public class ShowGlobalMessageEvent : IEvent
public float FadeDuration;
}
public class ShowConfirmPopupUiEvent : IEvent
{
public string NewMessageKey;
public Action OnConfirm;
public Action OnCancel;
public bool IsCancelButtonVisible;
}
public class OpenPopupUiEvent : IEvent
{
public Type UiType;

View File

@ -0,0 +1,98 @@
using System;
using TMPro;
using UnityEngine;
using UnityEngine.EventSystems;
using UnityEngine.InputSystem;
using UnityEngine.Localization.Components;
using UnityEngine.UI;
namespace DDD
{
public class ConfirmUi : PopupUi<RestaurantUiActions>, IEventHandler<ShowConfirmPopupUiEvent>
{
[SerializeField] private TextMeshProUGUI _messageLabel;
[SerializeField] private LocalizeStringEvent _messageLabelLocalizeStringEvent;
[SerializeField] private Button _cancelButton;
[SerializeField] private Button _confirmButton;
private Action _onCancel;
private Action _onConfirm;
// TODO : 마지막 팝업에서만 NAVIGATION
protected override GameObject GetInitialSelected()
{
return _confirmButton.gameObject;
}
protected override void Start()
{
base.Start();
_messageLabel.text = string.Empty;
EventBus.Register<ShowConfirmPopupUiEvent>(this);
Close();
}
protected override void OnDestroy()
{
base.OnDestroy();
EventBus.Unregister<ShowConfirmPopupUiEvent>(this);
}
public void Invoke(ShowConfirmPopupUiEvent evt)
{
_messageLabelLocalizeStringEvent.StringReference = LocalizationManager.Instance.GetLocalizedString(evt.NewMessageKey);
_cancelButton.onClick.RemoveAllListeners();
_confirmButton.onClick.RemoveAllListeners();
_onCancel = () =>
{
evt.OnCancel?.Invoke();
Close();
};
_onConfirm = () =>
{
evt.OnConfirm?.Invoke();
Close();
};
_cancelButton.onClick.AddListener(() => _onCancel?.Invoke());
_confirmButton.onClick.AddListener(() => _onConfirm?.Invoke());
_cancelButton.gameObject.SetActive(evt.IsCancelButtonVisible);
Open();
}
// TODO : 두 팝업 사이의 문제 해결
protected override void OnInputPerformed(RestaurantUiActions actionEnum, InputAction.CallbackContext context)
{
base.OnInputPerformed(actionEnum, context);
switch (actionEnum)
{
case RestaurantUiActions.Cancel:
HandleCancelPerformed();
break;
case RestaurantUiActions.Interact1:
HandleInteract1Performed();
break;
}
}
private void HandleCancelPerformed()
{
_onCancel?.Invoke();
}
private void HandleInteract1Performed()
{
EventSystem.current.currentSelectedGameObject?.GetComponent<Button>()?.onClick?.Invoke();
}
}
}

View File

@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 7b3eb65dc42aeb84eba2397a9603e94d

View File

@ -37,7 +37,7 @@ protected override async void TryRegister()
string addressableKey = $"{GetType().Name}_{typeof(T).Name}_{InputBindingSo}";
_baseUiActionsInputBindingSo = await AssetManager.LoadAsset<BaseUiActionsInputBindingSo<T>>(addressableKey);
Debug.Assert(_baseUiActionsInputBindingSo != null, $"InputBindingSo not found: {addressableKey}");
Debug.Assert(_baseUiActionsInputBindingSo != null, $"{GetType().Name} class InputBindingSo not found: {addressableKey}");
foreach (var actionEnum in _baseUiActionsInputBindingSo.BindingActions.GetFlags())
{
@ -46,15 +46,30 @@ protected override async void TryRegister()
var inputAction = InputManager.Instance.GetAction(_baseUiActionsInputBindingSo.InputActionMaps, actionEnum.ToString());
if (inputAction == null) continue;
var handler = new Action<InputAction.CallbackContext>(context =>
var startedHandler = new Action<InputAction.CallbackContext>(context =>
{
if (!_isTopPopup) return;
//if (!UiManager.Instance.IsTopPopup(this)) return;
OnInputStarted(actionEnum, context);
});
inputAction.started += startedHandler;
var performedHandler = new Action<InputAction.CallbackContext>(context =>
{
//if (!UiManager.Instance.IsTopPopup(this)) return;
OnInputPerformed(actionEnum, context);
});
inputAction.performed += performedHandler;
inputAction.performed += handler;
_registeredHandlers.Add((inputAction, handler));
var canceledHandler = new Action<InputAction.CallbackContext>(context =>
{
//if (!UiManager.Instance.IsTopPopup(this)) return;
OnInputCanceled(actionEnum, context);
});
inputAction.canceled += canceledHandler;
_registeredHandlers.Add((inputAction, startedHandler));
_registeredHandlers.Add((inputAction, performedHandler));
_registeredHandlers.Add((inputAction, canceledHandler));
}
}
@ -67,8 +82,9 @@ protected override void TryUnregister()
{
if (action != null)
{
action.started -= handler;
action.performed -= handler;
action.Disable();
action.canceled -= handler;
}
}
@ -87,6 +103,19 @@ public override void Open()
}
}
protected abstract void OnInputPerformed(T actionEnum, InputAction.CallbackContext ctx);
protected virtual void OnInputStarted(T actionEnum, InputAction.CallbackContext context)
{
if (!_isTopPopup) return;
}
protected virtual void OnInputPerformed(T actionEnum, InputAction.CallbackContext context)
{
if (!_isTopPopup) return;
}
protected virtual void OnInputCanceled(T actionEnum, InputAction.CallbackContext context)
{
if (!_isTopPopup) return;
}
}
}

View File

@ -2,6 +2,7 @@
using UnityEngine;
using UnityEngine.EventSystems;
using UnityEngine.InputSystem;
using UnityEngine.UI;
namespace DDD
{
@ -12,6 +13,36 @@ public class RestaurantManagementUi : PopupUi<RestaurantUiActions>, IEventHandle
[SerializeField] private TabGroupUi<RestaurantManagementSectionType> _sectionTabs;
[SerializeField] private TabGroupUi<InventoryCategoryType> _menuCategoryTabs;
[SerializeField] private TabGroupUi<InventoryCategoryType> _cookwareCategoryTabs;
[SerializeField] private Image _completeBatchFilledImage;
[SerializeField] private float _holdCompleteTime = 1f;
private float _elapsedTime;
private bool _isHolding;
protected override void Update()
{
base.Update();
if (_isHolding)
{
_completeBatchFilledImage.fillAmount = _elapsedTime;
var multiply = _holdCompleteTime / 1f;
if (_elapsedTime >= 1f)
{
HandleInteract2Canceled(); // TODO : 추후에 팝업 연결
var evt = GameEvents.ShowConfirmPopupUiEvent;
evt.IsCancelButtonVisible = true;
evt.NewMessageKey = "Global_Message_001";
evt.OnConfirm = Close;
EventBus.Broadcast(evt);
//HandleCancelPerformed();
return;
}
_elapsedTime += Time.deltaTime * multiply;
}
}
protected override GameObject GetInitialSelected()
{
@ -49,50 +80,70 @@ public override void Close()
protected override void OnInputPerformed(RestaurantUiActions actionEnum, InputAction.CallbackContext context)
{
base.OnInputPerformed(actionEnum, context);
switch (actionEnum)
{
case RestaurantUiActions.Cancel:
HandleCancel();
HandleCancelPerformed();
break;
case RestaurantUiActions.PreviousTab:
HandleMoveTab(-1);
HandleMoveTabPerformed(-1);
break;
case RestaurantUiActions.NextTab:
HandleMoveTab(1);
HandleMoveTabPerformed(1);
break;
case RestaurantUiActions.Interact1:
HandleInteract1();
HandleInteract1Performed();
break;
case RestaurantUiActions.Interact2:
HandleInteract2();
HandleInteract2Performed();
break;
}
}
protected override void OnInputCanceled(RestaurantUiActions actionEnum, InputAction.CallbackContext context)
{
base.OnInputCanceled(actionEnum, context);
switch (actionEnum)
{
case RestaurantUiActions.Interact2:
HandleInteract2Canceled();
break;
default:
throw new ArgumentOutOfRangeException(nameof(actionEnum), actionEnum, null);
}
}
private void HandleCancel()
private void HandleCancelPerformed()
{
var evt = GameEvents.ClosePopupUiEvent;
evt.UiType = GetType();
EventBus.Broadcast(evt);
}
private void HandleMoveTab(int direction)
private void HandleMoveTabPerformed(int direction)
{
_sectionTabs.Move(direction);
}
private void HandleInteract1()
private void HandleInteract1Performed()
{
var selected = EventSystem.current.currentSelectedGameObject;
var interactable = selected?.GetComponent<IInteractableUi>();
interactable?.OnInteract();
}
private void HandleInteract2()
// TODO : 버튼과 연동
private void HandleInteract2Performed()
{
HandleCancel();
_isHolding = true;
}
private void HandleInteract2Canceled()
{
_isHolding = false;
_elapsedTime = 0f;
_completeBatchFilledImage.fillAmount = 0f;
}
private void OnSectionTabSelected(RestaurantManagementSectionType section)

View File

@ -12,7 +12,7 @@ public void OnAdded(ItemSlotUi itemSlotUi, RestaurantManagementSo restaurantMana
}
else
{
var evt = GameEvents.RequestShowGlobalMessageEvent;
var evt = GameEvents.ShowGlobalMessageEvent;
// TODO : 테스트용 메세지 추후 삭제 및 변경
evt.NewMessageKey = "today_menu_added_error_message_001";
evt.FadeDuration = 0.5f;

View File

@ -12,7 +12,7 @@ public void OnAdded(ItemSlotUi itemSlotUi, RestaurantManagementSo restaurantMana
}
else
{
var evt = GameEvents.RequestShowGlobalMessageEvent;
var evt = GameEvents.ShowGlobalMessageEvent;
// TODO : 테스트용 메세지 추후 삭제 및 변경
evt.NewMessageKey = "today_menu_added_error_message_001";
evt.FadeDuration = 0.5f;

View File

@ -13,7 +13,7 @@ public void Setup(ItemSlotUi ui, ItemViewModel model)
{
if (model == null)
{
ui.SetIcon(DataManager.Instance.GetSprite(SpriteConstants.EmptyFoodSpriteKey)); // TODO : 점원 빈칸 이미지로 변경
ui.SetIcon(DataManager.Instance.GetSprite(SpriteConstants.EmptyWorker));
ui.HideCountText();
ui.HideMark();
ui.SetButtonInteractable(false);

View File

@ -57,5 +57,6 @@ public static class SpriteConstants
public const string CheckYesSpriteKey = "CheckYes";
public const string EmptyDrinkSpriteKey = "EmptyDrink";
public const string EmptyFoodSpriteKey = "EmptyFood";
public const string EmptyWorker = "EmptyWorker";
}
}