Skip to content

Commit

Permalink
Merge pull request #6597 from planetarium/feature/synthesis-ui-2
Browse files Browse the repository at this point in the history
합성 UI 이슈 해결
  • Loading branch information
eugene-doobu authored Dec 16, 2024
2 parents 1c67313 + b380a39 commit d6e0613
Show file tree
Hide file tree
Showing 9 changed files with 104 additions and 45 deletions.
66 changes: 33 additions & 33 deletions nekoyume/Assets/Resources/UI/Prefabs/UI_Synthesis.prefab
Original file line number Diff line number Diff line change
Expand Up @@ -22762,7 +22762,7 @@ MonoBehaviour:
fixedSpacingOption: 0
fixedMarginOption: 0
fontMaterialType: 0
l10nKey:
l10nKey: UI_SYNTHESISING
fontMaterialIndexInitialized: 0
fontMaterialIndex: 0
defaultFontStylesInitialized: 0
Expand Down Expand Up @@ -25055,7 +25055,7 @@ PrefabInstance:
- target: {fileID: 5072508713039898984, guid: fa91790c2b4fd0f40bff1e37747826b1,
type: 3}
propertyPath: m_AnchorMax.y
value: 0
value: 1
objectReference: {fileID: 0}
- target: {fileID: 5072508713039898984, guid: fa91790c2b4fd0f40bff1e37747826b1,
type: 3}
Expand All @@ -25065,7 +25065,7 @@ PrefabInstance:
- target: {fileID: 5072508713039898984, guid: fa91790c2b4fd0f40bff1e37747826b1,
type: 3}
propertyPath: m_AnchorMin.y
value: 0
value: 1
objectReference: {fileID: 0}
- target: {fileID: 5072508713039898984, guid: fa91790c2b4fd0f40bff1e37747826b1,
type: 3}
Expand Down Expand Up @@ -25115,12 +25115,12 @@ PrefabInstance:
- target: {fileID: 5072508713039898984, guid: fa91790c2b4fd0f40bff1e37747826b1,
type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
value: 190
objectReference: {fileID: 0}
- target: {fileID: 5072508713039898984, guid: fa91790c2b4fd0f40bff1e37747826b1,
type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
value: -45
objectReference: {fileID: 0}
- target: {fileID: 5072508713039898984, guid: fa91790c2b4fd0f40bff1e37747826b1,
type: 3}
Expand Down Expand Up @@ -25325,7 +25325,7 @@ PrefabInstance:
- target: {fileID: 5072508713039898984, guid: fa91790c2b4fd0f40bff1e37747826b1,
type: 3}
propertyPath: m_AnchorMax.y
value: 0
value: 1
objectReference: {fileID: 0}
- target: {fileID: 5072508713039898984, guid: fa91790c2b4fd0f40bff1e37747826b1,
type: 3}
Expand All @@ -25335,7 +25335,7 @@ PrefabInstance:
- target: {fileID: 5072508713039898984, guid: fa91790c2b4fd0f40bff1e37747826b1,
type: 3}
propertyPath: m_AnchorMin.y
value: 0
value: 1
objectReference: {fileID: 0}
- target: {fileID: 5072508713039898984, guid: fa91790c2b4fd0f40bff1e37747826b1,
type: 3}
Expand Down Expand Up @@ -25385,12 +25385,12 @@ PrefabInstance:
- target: {fileID: 5072508713039898984, guid: fa91790c2b4fd0f40bff1e37747826b1,
type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
value: 190
objectReference: {fileID: 0}
- target: {fileID: 5072508713039898984, guid: fa91790c2b4fd0f40bff1e37747826b1,
type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
value: -405
objectReference: {fileID: 0}
- target: {fileID: 5072508713039898984, guid: fa91790c2b4fd0f40bff1e37747826b1,
type: 3}
Expand Down Expand Up @@ -27770,7 +27770,7 @@ PrefabInstance:
- target: {fileID: 5072508713039898984, guid: fa91790c2b4fd0f40bff1e37747826b1,
type: 3}
propertyPath: m_AnchorMax.y
value: 0
value: 1
objectReference: {fileID: 0}
- target: {fileID: 5072508713039898984, guid: fa91790c2b4fd0f40bff1e37747826b1,
type: 3}
Expand All @@ -27780,7 +27780,7 @@ PrefabInstance:
- target: {fileID: 5072508713039898984, guid: fa91790c2b4fd0f40bff1e37747826b1,
type: 3}
propertyPath: m_AnchorMin.y
value: 0
value: 1
objectReference: {fileID: 0}
- target: {fileID: 5072508713039898984, guid: fa91790c2b4fd0f40bff1e37747826b1,
type: 3}
Expand Down Expand Up @@ -27830,12 +27830,12 @@ PrefabInstance:
- target: {fileID: 5072508713039898984, guid: fa91790c2b4fd0f40bff1e37747826b1,
type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
value: 190
objectReference: {fileID: 0}
- target: {fileID: 5072508713039898984, guid: fa91790c2b4fd0f40bff1e37747826b1,
type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
value: -225
objectReference: {fileID: 0}
- target: {fileID: 5072508713039898984, guid: fa91790c2b4fd0f40bff1e37747826b1,
type: 3}
Expand Down Expand Up @@ -28205,7 +28205,7 @@ PrefabInstance:
- target: {fileID: 5072508713039898984, guid: fa91790c2b4fd0f40bff1e37747826b1,
type: 3}
propertyPath: m_AnchorMax.y
value: 0
value: 1
objectReference: {fileID: 0}
- target: {fileID: 5072508713039898984, guid: fa91790c2b4fd0f40bff1e37747826b1,
type: 3}
Expand All @@ -28215,7 +28215,7 @@ PrefabInstance:
- target: {fileID: 5072508713039898984, guid: fa91790c2b4fd0f40bff1e37747826b1,
type: 3}
propertyPath: m_AnchorMin.y
value: 0
value: 1
objectReference: {fileID: 0}
- target: {fileID: 5072508713039898984, guid: fa91790c2b4fd0f40bff1e37747826b1,
type: 3}
Expand Down Expand Up @@ -28265,12 +28265,12 @@ PrefabInstance:
- target: {fileID: 5072508713039898984, guid: fa91790c2b4fd0f40bff1e37747826b1,
type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
value: 190
objectReference: {fileID: 0}
- target: {fileID: 5072508713039898984, guid: fa91790c2b4fd0f40bff1e37747826b1,
type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
value: -495
objectReference: {fileID: 0}
- target: {fileID: 5072508713039898984, guid: fa91790c2b4fd0f40bff1e37747826b1,
type: 3}
Expand Down Expand Up @@ -28475,7 +28475,7 @@ PrefabInstance:
- target: {fileID: 5072508713039898984, guid: fa91790c2b4fd0f40bff1e37747826b1,
type: 3}
propertyPath: m_AnchorMax.y
value: 0
value: 1
objectReference: {fileID: 0}
- target: {fileID: 5072508713039898984, guid: fa91790c2b4fd0f40bff1e37747826b1,
type: 3}
Expand All @@ -28485,7 +28485,7 @@ PrefabInstance:
- target: {fileID: 5072508713039898984, guid: fa91790c2b4fd0f40bff1e37747826b1,
type: 3}
propertyPath: m_AnchorMin.y
value: 0
value: 1
objectReference: {fileID: 0}
- target: {fileID: 5072508713039898984, guid: fa91790c2b4fd0f40bff1e37747826b1,
type: 3}
Expand Down Expand Up @@ -28535,12 +28535,12 @@ PrefabInstance:
- target: {fileID: 5072508713039898984, guid: fa91790c2b4fd0f40bff1e37747826b1,
type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
value: 190
objectReference: {fileID: 0}
- target: {fileID: 5072508713039898984, guid: fa91790c2b4fd0f40bff1e37747826b1,
type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
value: -585
objectReference: {fileID: 0}
- target: {fileID: 5072508713039898984, guid: fa91790c2b4fd0f40bff1e37747826b1,
type: 3}
Expand Down Expand Up @@ -28750,7 +28750,7 @@ PrefabInstance:
- target: {fileID: 5072508713039898984, guid: fa91790c2b4fd0f40bff1e37747826b1,
type: 3}
propertyPath: m_AnchorMax.y
value: 0
value: 1
objectReference: {fileID: 0}
- target: {fileID: 5072508713039898984, guid: fa91790c2b4fd0f40bff1e37747826b1,
type: 3}
Expand All @@ -28760,7 +28760,7 @@ PrefabInstance:
- target: {fileID: 5072508713039898984, guid: fa91790c2b4fd0f40bff1e37747826b1,
type: 3}
propertyPath: m_AnchorMin.y
value: 0
value: 1
objectReference: {fileID: 0}
- target: {fileID: 5072508713039898984, guid: fa91790c2b4fd0f40bff1e37747826b1,
type: 3}
Expand Down Expand Up @@ -28810,12 +28810,12 @@ PrefabInstance:
- target: {fileID: 5072508713039898984, guid: fa91790c2b4fd0f40bff1e37747826b1,
type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
value: 190
objectReference: {fileID: 0}
- target: {fileID: 5072508713039898984, guid: fa91790c2b4fd0f40bff1e37747826b1,
type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
value: -135
objectReference: {fileID: 0}
- target: {fileID: 5072508713039898984, guid: fa91790c2b4fd0f40bff1e37747826b1,
type: 3}
Expand Down Expand Up @@ -29180,7 +29180,7 @@ PrefabInstance:
- target: {fileID: 5072508713039898984, guid: fa91790c2b4fd0f40bff1e37747826b1,
type: 3}
propertyPath: m_AnchorMax.y
value: 0
value: 1
objectReference: {fileID: 0}
- target: {fileID: 5072508713039898984, guid: fa91790c2b4fd0f40bff1e37747826b1,
type: 3}
Expand All @@ -29190,7 +29190,7 @@ PrefabInstance:
- target: {fileID: 5072508713039898984, guid: fa91790c2b4fd0f40bff1e37747826b1,
type: 3}
propertyPath: m_AnchorMin.y
value: 0
value: 1
objectReference: {fileID: 0}
- target: {fileID: 5072508713039898984, guid: fa91790c2b4fd0f40bff1e37747826b1,
type: 3}
Expand Down Expand Up @@ -29240,12 +29240,12 @@ PrefabInstance:
- target: {fileID: 5072508713039898984, guid: fa91790c2b4fd0f40bff1e37747826b1,
type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
value: 190
objectReference: {fileID: 0}
- target: {fileID: 5072508713039898984, guid: fa91790c2b4fd0f40bff1e37747826b1,
type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
value: -675
objectReference: {fileID: 0}
- target: {fileID: 5072508713039898984, guid: fa91790c2b4fd0f40bff1e37747826b1,
type: 3}
Expand Down Expand Up @@ -30849,7 +30849,7 @@ PrefabInstance:
- target: {fileID: 5072508713039898984, guid: fa91790c2b4fd0f40bff1e37747826b1,
type: 3}
propertyPath: m_AnchorMax.y
value: 0
value: 1
objectReference: {fileID: 0}
- target: {fileID: 5072508713039898984, guid: fa91790c2b4fd0f40bff1e37747826b1,
type: 3}
Expand All @@ -30859,7 +30859,7 @@ PrefabInstance:
- target: {fileID: 5072508713039898984, guid: fa91790c2b4fd0f40bff1e37747826b1,
type: 3}
propertyPath: m_AnchorMin.y
value: 0
value: 1
objectReference: {fileID: 0}
- target: {fileID: 5072508713039898984, guid: fa91790c2b4fd0f40bff1e37747826b1,
type: 3}
Expand Down Expand Up @@ -30909,12 +30909,12 @@ PrefabInstance:
- target: {fileID: 5072508713039898984, guid: fa91790c2b4fd0f40bff1e37747826b1,
type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
value: 190
objectReference: {fileID: 0}
- target: {fileID: 5072508713039898984, guid: fa91790c2b4fd0f40bff1e37747826b1,
type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
value: -315
objectReference: {fileID: 0}
- target: {fileID: 5072508713039898984, guid: fa91790c2b4fd0f40bff1e37747826b1,
type: 3}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1755,7 +1755,7 @@ MonoBehaviour:
m_Interactable: 1
m_TargetGraphic: {fileID: 7900780793682223256}
m_HandleRect: {fileID: 5104890251133216867}
m_Direction: 2
m_Direction: 3
m_Value: 0
m_Size: 1
m_NumberOfSteps: 0
Expand Down
3 changes: 3 additions & 0 deletions nekoyume/Assets/StreamingAssets/Localization/common.csv
Original file line number Diff line number Diff line change
Expand Up @@ -2044,6 +2044,9 @@ SYNTHESIS_UI_BUTTON,SYNTHESIS,합성,SÍNTESE,合成,SÍNTESIS,สังเค
UI_SYNTHESIZE_MAX_COUNT_CHECK,Cannot select more than {0} materials in the maximum number of synthesize({1}).,{0}개 이상의 재료를 선택할 수 없습니다. 최대 합성 개수({1})를 확인하세요.,Não é possível selecionar mais de {0} materiais no número máximo de síntese({1}).,最大合成数({1})で{0}以上の素材を選択できません。,No se pueden seleccionar más de {0} materiales en el número máximo de síntesis({1}).,ไม่สามารถเลือกได้มากกว่า {0} วัสดุในจำนวนการสังเคราะห์สูงสุด({1}),Tidak dapat memilih lebih dari {0} bahan dalam jumlah maksimum untuk disintesis({1}).,Нельзя выбрать более {0} материалов в максимальном количестве синтеза({1}).,不能选择超过 {0} 材料的最大合成数({1})。,不能选择超过 {0} 材料的最大合成数({1})。,Hindi maaaring pumili ng higit sa {0} materyal sa maximum na bilang ng sintesis({1}).,Không thể chọn nhiều hơn {0} vật liệu trong số tổng hợp tối đa({1}).
UI_SYNTHESIZE_RESULT,SYNTHESIS RESULT,합성 결과,RESULTADO DA SÍNTESE,合成結果,RESULTADO DE LA SÍNTESIS,ผลลัพธ์การสังเคราะห,Hasil Sintesis,РЕЗУЛЬТАТ СИНТЕЗА,合成结果,合成結果,RESULTA NG SINTESIS,Kết quả Tổng hợp
UI_SYNTHESIZE_REGISTRATION_INFO,Select the item you want to synthesize.,합성할 아이템을 선택하세요.,Selecione o item que deseja sintetizar.,合成したいアイテムを選択してください。,Selecciona el objeto que deseas sintetizar.,เลือกไอเทมที่คุณต้องการสังเคราะห์,Pilih item yang ingin Anda sintesis.,Выберите предмет, который вы хотите синтезировать.,选择要合成的物品。,选择要合成的物品。,Pumili ng item na nais mong isintesis.,Chọn vật phẩm bạn muốn tổng hợp.
UI_SYNTHESIZE_LACK_MATERIAL,you are running out of materials for synthesis.,해당 희귀도의 재료가 부족합니다,Está faltando materiais para a síntese.,合成に必要な素材が不足しています。,Te faltan materiales para la síntesis.,คุณกำลังใช้วัสดุสำหรับการสังเคราะห์หมดแล้ว,Anda kehabisan bahan untuk disintesis.,у вас заканчиваются материалы для синтеза.,您的合成材料不足。,您的合成材料不足。,Nagmamadali ka ng mga materyales para sa sintesis.,Bạn đang hết vật liệu cho tổng hợp.
UI_SYNTHESISING,Synthesising...,합성중...,Sintetizando...,合成中...,Sintetizando...,กำลังสังเคราะห์...,Sedang Menyintesis...,Синтезирование...,合成中...,合成中...,Nag-sisintesis...,Đang Tổng hợp...
UI_SYNTHESIZE_MATERIAL_CHANGE,Synthesis can only be done for one grade and one subtype at a action. Do you want to reset the existing selected material?,합성은 한번에 한등급에 대해서만 진행 가능합니다. 기존 선택된 재료를 리셋하고 새로 집어넣으시겠습니까?,A síntese só pode ser feita para uma classificação e um subtipo de uma vez. Você deseja redefinir o material selecionado existente?,合成は一度に1つのグレードと1つのサブタイプのみ行うことができます。既存の選択された素材をリセットして新しいものを入れますか?,La síntesis solo se puede hacer para una clasificación y un subtipo a la vez. ¿Quieres restablecer el material seleccionado existente?,การสังเคราะห์สามารถทำได้เพียงหนึ่งเกรดและหนึ่งประเภทในแต่ละครั้ง คุณต้องการรีเซ็ตวัสดุที่เลือกอยู่หรือไม่?,Sintesis hanya dapat dilakukan untuk satu kelas dan satu subjenis sekaligus. Apakah Anda ingin mereset bahan yang sudah dipilih?,Синтез можно делать только для одного класса и одного подтипа за раз. Хотите сбросить выбранный материал?,合成只能一次进行一个等级和一个子类型。您要重置现有的选定材料吗?,合成只能一次進行一個等級和一個子類型。您要重置現有的選定材料嗎?,Ang Sintesis ay maaaring gawin lamang para sa isang grado at isang subtype sa isang aksyon. Nais mo bang i-reset ang kasalukuyang piniling materyal?,Tổng hợp chỉ có thể thực hiện cho một cấp độ và một loại con tại một hành động. Bạn có muốn đặt lại vật liệu đã chọn không?
UI_KEY_BACKUP,Key backup,키 백업,,,,,,,,,,
UI_RUNE_LEVEL_BONUS,Rune Level Bonus,룬 레벨 보너스,,,,,,,,,,
UI_RUNE_STAT_REWARD,Rune Stat Reward,룬 스텟 보상,,,,,,,,,,
Expand Down
5 changes: 5 additions & 0 deletions nekoyume/Assets/_Scripts/Blockchain/ActionRenderHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2726,6 +2726,11 @@ private void ResponseSynthesize((ActionEvaluation<Synthesize> eval, List<INonFun

var synthesis = Widget.Find<Synthesis>();
synthesis.SynthesisModule.SetOnActionState(false);

// TODO: Use ReactiveProperty?
var headerMenu = Widget.Find<HeaderMenuStatic>();
var apPortionUi = headerMenu.ApPotion;
apPortionUi.UpdateApPotion();
}

private void ExceptionSynthesize(ActionEvaluation<Synthesize> eval)
Expand Down
4 changes: 2 additions & 2 deletions nekoyume/Assets/_Scripts/UI/Module/Currency/ApPotion.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ protected override void OnEnable()
UpdateApPotion();
}

// TODO: Use ReactiveProperty?
public void UpdateApPotion()
{
if (Game.Game.instance.States.CurrentAvatarState == null)
Expand Down Expand Up @@ -61,8 +62,7 @@ public void SetActiveLoading(bool value)

private void ShowMaterialNavigationPopup()
{
//todo: implement this
//Widget.Find<MaterialNavigationPopup>().ShowCurrency((int)CurrencyType.ApPotion);
Widget.Find<MaterialNavigationPopup>().ShowCurrency(CostType.ApPotion);
}
}
}
4 changes: 3 additions & 1 deletion nekoyume/Assets/_Scripts/UI/Module/SynthesisModule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,9 @@ public class SynthesisModule : MonoBehaviour
private ItemSubType _itemSubType;
private CancellationTokenSource? _expectationsItemIconCts;

#region MonoBehavioir
public bool PossibleSynthesis => _selectedItemsForSynthesize.Count > 0;

#region MonoBehavioir

private void Awake()
{
Expand Down
17 changes: 17 additions & 0 deletions nekoyume/Assets/_Scripts/UI/Scroller/SynthesisCell.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
using System;
using Nekoyume.L10n;
using Nekoyume.Model.EnumType;
using Nekoyume.Model.Mail;
using Nekoyume.UI.Model;
using Nekoyume.UI.Module;
using TMPro;
Expand Down Expand Up @@ -30,12 +31,28 @@ public class SynthesisCell : MonoBehaviour
private void Awake()
{
CheckNull();

selectButton.OnClickSubject
.Subscribe(_ =>
{
if (selectButton.IsSubmittable)
{
return;
}

NotificationSystem.Push(
MailType.System,
L10nManager.Localize("UI_SYNTHESIZE_LACK_MATERIAL"),
NotificationCell.NotificationType.Alert);
})
.AddTo(gameObject);
}

public void Initialize(Grade grade)
{
_grade = grade;
SetTitleText();

selectButton.OnSubmitSubject
.Subscribe(_ =>
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ public void Show(List<SynthesizeResult> resultList, bool ignoreShowAnimation = f
}
}

// 성공했으면 뒤쪽으로 정렬
resultList.Sort((a, b) => a.IsSuccess.CompareTo(b.IsSuccess));
// 성공했으면 앞쪽으로 정렬
resultList.Sort((a, b) => b.IsSuccess.CompareTo(a.IsSuccess));

for (var i = 0; i < _cachedItemViews.Count; i++)
{
Expand Down Expand Up @@ -114,7 +114,6 @@ private async UniTask PlayResultAnimation()
await UniTask.Delay(TimeSpan.FromSeconds(activeItemCount != 1 ?
DefaultAnimInterval/_cachedItemViews.Count :
ItemViewAnimInterval));
// TODO: Success
}

await UniTask.Delay(TimeSpan.FromSeconds(DefaultAnimInterval));
Expand Down
Loading

0 comments on commit d6e0613

Please sign in to comment.