Skip to content

Commit

Permalink
Merge pull request #6072 from planetarium/hotfix/230.1.0
Browse files Browse the repository at this point in the history
Hotfix/230.1.0
  • Loading branch information
sonohoshi authored Sep 30, 2024
2 parents cdc4091 + 129b0b2 commit 7b3ec33
Show file tree
Hide file tree
Showing 6 changed files with 82 additions and 65 deletions.
98 changes: 49 additions & 49 deletions nekoyume/Assets/Resources/UI/Prefabs/UI_CustomCraft.prefab
Original file line number Diff line number Diff line change
Expand Up @@ -922,7 +922,7 @@ MonoBehaviour:
m_ChildForceExpandHeight: 0
m_ChildControlWidth: 0
m_ChildControlHeight: 0
m_ChildScaleWidth: 1
m_ChildScaleWidth: 0
m_ChildScaleHeight: 0
m_ReverseArrangement: 0
--- !u!1 &189586909011894337
Expand Down Expand Up @@ -7125,9 +7125,9 @@ RectTransform:
m_Father: {fileID: 8322691553621300232}
m_RootOrder: 0
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_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 45, y: -13}
m_SizeDelta: {x: 90, y: 26}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &2539981713029782429
Expand Down Expand Up @@ -7724,19 +7724,19 @@ RectTransform:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1024168368925372565}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalRotation: {x: 0.008726558, y: 0, z: 0, w: 0.999962}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 1256070705216901740}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_LocalEulerAnglesHint: {x: 1, 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: 120, y: 40}
m_Pivot: {x: 0, y: 0.5}
m_SizeDelta: {x: 65.11, y: 40}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &5651810998431530206
CanvasRenderer:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -7792,12 +7792,12 @@ MonoBehaviour:
m_faceColor:
serializedVersion: 2
rgba: 4294967295
m_fontSize: 26
m_fontSize: 23
m_fontSizeBase: 32
m_fontWeight: 400
m_enableAutoSizing: 1
m_fontSizeMin: 8
m_fontSizeMax: 26
m_fontSizeMax: 23
m_fontStyle: 17
m_HorizontalAlignment: 2
m_VerticalAlignment: 512
Expand Down Expand Up @@ -20973,7 +20973,7 @@ GameObject:
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
m_IsActive: 0
--- !u!224 &4400158266835109448
RectTransform:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -21271,11 +21271,11 @@ RectTransform:
m_Father: {fileID: 4257590591991717886}
m_RootOrder: 1
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: 120, y: 40}
m_Pivot: {x: 0, y: 0.5}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 197, y: -30.5}
m_SizeDelta: {x: 65, y: 40}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &8964170073529804299
CanvasRenderer:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -21331,12 +21331,12 @@ MonoBehaviour:
m_faceColor:
serializedVersion: 2
rgba: 4294967295
m_fontSize: 26
m_fontSize: 22.95
m_fontSizeBase: 32
m_fontWeight: 400
m_enableAutoSizing: 1
m_fontSizeMin: 8
m_fontSizeMax: 26
m_fontSizeMax: 23
m_fontStyle: 17
m_HorizontalAlignment: 2
m_VerticalAlignment: 512
Expand Down Expand Up @@ -21423,7 +21423,7 @@ GameObject:
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
m_IsActive: 0
--- !u!224 &8322691553621300232
RectTransform:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -21451,9 +21451,9 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 229.5, y: -30.5}
m_SizeDelta: {x: 0, y: 26}
m_Pivot: {x: 1, y: 0.5}
m_AnchoredPosition: {x: 158.47253, y: -30.5}
m_SizeDelta: {x: 280, y: 26}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &3608364749563383036
CanvasRenderer:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -21510,7 +21510,7 @@ MonoBehaviour:
m_Top: 0
m_Bottom: 0
m_ChildAlignment: 4
m_Spacing: 10
m_Spacing: 5
m_ChildForceExpandWidth: 1
m_ChildForceExpandHeight: 1
m_ChildControlWidth: 0
Expand Down Expand Up @@ -28537,11 +28537,11 @@ MonoBehaviour:
m_Bottom: 3
m_ChildAlignment: 4
m_Spacing: 5
m_ChildForceExpandWidth: 0
m_ChildForceExpandWidth: 1
m_ChildForceExpandHeight: 0
m_ChildControlWidth: 0
m_ChildControlHeight: 0
m_ChildScaleWidth: 1
m_ChildScaleWidth: 0
m_ChildScaleHeight: 0
m_ReverseArrangement: 0
--- !u!1 &4286856852852506951
Expand Down Expand Up @@ -29659,7 +29659,7 @@ MonoBehaviour:
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_text: 1234567890
m_text: 30
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 8a682b7747d4a664089b7b1065aa0035, type: 2}
m_sharedMaterial: {fileID: 2100000, guid: 7a651b26cd62dc0479659cbcab053405, type: 2}
Expand All @@ -29686,7 +29686,7 @@ MonoBehaviour:
m_faceColor:
serializedVersion: 2
rgba: 4294967295
m_fontSize: 10
m_fontSize: 17.55
m_fontSizeBase: 22
m_fontWeight: 400
m_enableAutoSizing: 1
Expand Down Expand Up @@ -31002,7 +31002,7 @@ GameObject:
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
m_IsActive: 0
--- !u!224 &3446193074598826224
RectTransform:
m_ObjectHideFlags: 0
Expand All @@ -31018,9 +31018,9 @@ RectTransform:
m_Father: {fileID: 6419981371055444834}
m_RootOrder: 10
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_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 285, y: -13}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &8460983351133168918
Expand Down Expand Up @@ -32202,7 +32202,7 @@ GameObject:
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 0
m_IsActive: 1
--- !u!224 &4087676653481186221
RectTransform:
m_ObjectHideFlags: 0
Expand All @@ -32221,7 +32221,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 145, y: -13}
m_AnchoredPosition: {x: 140, y: -13}
m_SizeDelta: {x: 90, y: 26}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &3350674530141350776
Expand Down Expand Up @@ -33923,9 +33923,9 @@ RectTransform:
m_Father: {fileID: 8322691553621300232}
m_RootOrder: 2
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_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 235, y: -13}
m_SizeDelta: {x: 90, y: 26}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &5084079429399210266
Expand Down Expand Up @@ -35810,7 +35810,7 @@ GameObject:
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
m_IsActive: 0
--- !u!224 &6419981371055444834
RectTransform:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -35839,9 +35839,9 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 24.75, y: -30.5}
m_SizeDelta: {x: 0, y: 26}
m_Pivot: {x: 0, y: 0.5}
m_AnchoredPosition: {x: 158.5, y: -30.5}
m_SizeDelta: {x: 280, y: 26}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &3460906418828552700
CanvasRenderer:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -35898,7 +35898,7 @@ MonoBehaviour:
m_Top: 0
m_Bottom: 0
m_ChildAlignment: 4
m_Spacing: 10
m_Spacing: 5
m_ChildForceExpandWidth: 1
m_ChildForceExpandHeight: 1
m_ChildControlWidth: 0
Expand Down Expand Up @@ -38775,9 +38775,9 @@ RectTransform:
m_Father: {fileID: 6419981371055444834}
m_RootOrder: 9
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_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 235, y: -13}
m_SizeDelta: {x: 90, y: 26}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &2585313172887896150
Expand Down Expand Up @@ -49098,9 +49098,9 @@ RectTransform:
m_Father: {fileID: 6419981371055444834}
m_RootOrder: 0
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_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 45, y: -13}
m_SizeDelta: {x: 90, y: 26}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &8105076944259484652
Expand Down Expand Up @@ -49169,7 +49169,7 @@ GameObject:
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 0
m_IsActive: 1
--- !u!224 &7881307477045232976
RectTransform:
m_ObjectHideFlags: 0
Expand All @@ -49188,7 +49188,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 145, y: -13}
m_AnchoredPosition: {x: 140, y: -13}
m_SizeDelta: {x: 90, y: 26}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &5099321020903879509
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,19 +29,19 @@ public enum State
private GameObject normalObject = null;

[SerializeField]
private TextMeshProUGUI normalText = null;
protected TextMeshProUGUI normalText = null;

[SerializeField]
private GameObject conditionalObject = null;

[SerializeField]
private TextMeshProUGUI conditionalText = null;
protected TextMeshProUGUI conditionalText = null;

[SerializeField]
protected GameObject disabledObject = null;

[SerializeField]
private TextMeshProUGUI disabledText = null;
protected TextMeshProUGUI disabledText = null;

[SerializeField]
private GameObject effectOverlay = null;
Expand Down
31 changes: 24 additions & 7 deletions nekoyume/Assets/_Scripts/UI/Module/Button/ConditionalCostButton.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@
using System.Collections.Generic;
using TMPro;
using UnityEngine;
using UnityEngine.UI;

namespace Nekoyume.UI.Module
{
using UniRx;
public class ConditionalCostButton : ConditionalButton
{
public struct CostParam
Expand Down Expand Up @@ -46,7 +48,7 @@ private struct CostText
private List<GameObject> costParents = null;

private readonly Dictionary<CostType, long> _costMap = new();

public long GetCost(CostType type) =>
_costMap.TryGetValue(type, out var cost)
? cost
Expand Down Expand Up @@ -95,12 +97,6 @@ public override void UpdateObjects()
{
base.UpdateObjects();

var showCost = _costMap.Count > 0;
foreach (var parent in costParents)
{
parent.SetActive(showCost);
}

foreach (var costObject in costObjects)
{
var exist = _costMap.ContainsKey(costObject.type);
Expand All @@ -121,6 +117,27 @@ public override void UpdateObjects()
costText.text.color = CheckCostOfType(costObject.type, cost) ? Palette.GetColor(ColorType.ButtonEnabled) : Palette.GetColor(ColorType.TextDenial);
}
}

var showCost = _costMap.Count > 0;
foreach (var parent in costParents)
{
parent.SetActive(showCost);
}

var currentObject = CurrentState.Value switch
{
State.Normal => normalText,
State.Conditional => conditionalText,
State.Disabled => disabledText,
};
Observable.NextFrame().Subscribe(_ =>
{
currentObject.gameObject.SetActive(false);
currentObject.gameObject.SetActive(true);
LayoutRebuilder.ForceRebuildLayoutImmediate(
(RectTransform)currentObject.transform);
LayoutRebuilder.ForceRebuildLayoutImmediate((RectTransform)transform);
});
}

/// <summary>
Expand Down
4 changes: 2 additions & 2 deletions nekoyume/Assets/_Scripts/UI/Widget/CustomCraft.cs
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ private enum SubmittableState

private const string RelationshipInfoKey = "RELATIONSHIP-INFO-{0}";

private static string TutorialKey => $"Tutorial_Check_CustomCraft_{Game.Game.instance.States.CurrentAvatarKey}";
private static string TutorialKey => $"Tutorial_Check_CustomCraft_V2_{Game.Game.instance.States.CurrentAvatarKey}";

public bool RequiredUpdateCraftCount { get; set; }

Expand Down Expand Up @@ -230,7 +230,7 @@ public override void Show(bool ignoreShowAnimation = false)
PlayerPrefs.GetInt(TutorialKey, 0) == 0)
{
// Play Tutorial - Custom craft (for old user)
Game.Game.instance.Stage.TutorialController.Play(2010002);
Game.Game.instance.Stage.TutorialController.Play(3010002);
PlayerPrefs.SetInt(TutorialKey, 1);
}

Expand Down
Loading

0 comments on commit 7b3ec33

Please sign in to comment.