|
@@ -69,8 +69,8 @@ namespace GFGGame
|
|
|
protected override void OnInit()
|
|
|
{
|
|
|
base.OnInit();
|
|
|
- _ui.m_btnLastStep.visible = false;
|
|
|
- _ui.m_btnNextStep.visible = false;
|
|
|
+ _ui.m_btnLastStep.visible = true;
|
|
|
+ _ui.m_btnNextStep.visible = true;
|
|
|
_ui.m_btnSearch.visible = true;
|
|
|
_ui.m_btnPhoto.visible = true;
|
|
|
_ui.m_btnAction.visible = false;
|
|
@@ -163,6 +163,8 @@ namespace GFGGame
|
|
|
_ui.m_comboBox.items = CustomSuitDataManager.GetSuitPosItems();
|
|
|
_ui.m_comboBox.selectedIndex = currentIndex;
|
|
|
MyDressUpHelper.PutOnSuitSavedByPos(currentIndex);
|
|
|
+ UpdateStepBtn(true);
|
|
|
+
|
|
|
Timers.inst.AddUpdate(CheckGuide);
|
|
|
}
|
|
|
|
|
@@ -187,7 +189,8 @@ namespace GFGGame
|
|
|
base.RemoveEventListener();
|
|
|
EventAgent.RemoveEventListener(ConstMessage.CLOSE_PHOTOGRAPHVIEW, UpdateScene);
|
|
|
EventAgent.RemoveEventListener(ConstMessage.DRESS_FILTER, UpdatePartsListSort);
|
|
|
- EventAgent.RemoveEventListener(ConstMessage.DRESS_SEARCH, UpdatePartsListSort);
|
|
|
+ EventAgent.AddEventListener(ConstMessage.DRESS_SEARCH, UpdateSerch);
|
|
|
+ EventAgent.AddEventListener(ConstMessage.DRESS_FILTER, UpdateSerch);
|
|
|
EventAgent.RemoveEventListener(ConstMessage.DRESS_FILTER_RESET, DressResetSerch);
|
|
|
}
|
|
|
private void OnClickBtnBack()
|
|
@@ -211,12 +214,12 @@ namespace GFGGame
|
|
|
private void OnClickBtnLastStep()
|
|
|
{
|
|
|
if (!MyDressUpHelper.OnClickBtnLastStep()) return;
|
|
|
- UpdateStepBtn();
|
|
|
+ UpdateStepBtn(false);
|
|
|
}
|
|
|
private void OnClickBtnNextStep()
|
|
|
{
|
|
|
if (!MyDressUpHelper.OnClickBtnNextStep()) return;
|
|
|
- UpdateStepBtn();
|
|
|
+ UpdateStepBtn(false);
|
|
|
|
|
|
}
|
|
|
private void OnComboBoxChanged()
|
|
@@ -236,6 +239,7 @@ namespace GFGGame
|
|
|
}
|
|
|
currentIndex = _ui.m_comboBox.selectedIndex;
|
|
|
MyDressUpHelper.PutOnSuitSavedByPos(_ui.m_comboBox.selectedIndex);
|
|
|
+ UpdateStepBtn(true);
|
|
|
}
|
|
|
|
|
|
private void OnClickListType1Item(EventContext context)
|
|
@@ -285,10 +289,12 @@ namespace GFGGame
|
|
|
}
|
|
|
UI_PartsListItem listItem = UI_PartsListItem.Proxy(context.data as GObject);// (GObject)context.data as GObject;
|
|
|
int id = (int)listItem.target.data;
|
|
|
- // bool isSuit = SuitCfgArray.Instance.GetTotalCountOfOneSuit(id) > 0;
|
|
|
+ bool isDress = true;
|
|
|
|
|
|
if (_currentMenuType == ConstDressUpItemType.TAO_ZHUANG)
|
|
|
{
|
|
|
+ isDress = false;
|
|
|
+
|
|
|
if (GuideDataManager.IsGuideFinish(ConstGuideId.FREEDOM_DRESS) <= 0 && GuideDataManager.currentGuideId == GuideCfgArray.Instance.GetCfg(ConstGuideId.FREEDOM_DRESS).id)
|
|
|
{
|
|
|
ShowSuitPartList(id, true);
|
|
@@ -329,10 +335,12 @@ namespace GFGGame
|
|
|
MyDressUpHelper.dressUpObj.AddOrRemove(id, true);
|
|
|
}
|
|
|
}
|
|
|
- MyDressUpHelper.AddMemoryDressup();
|
|
|
- UpdateListPartsSelected(id);
|
|
|
- UpdateListSuitPartsSelected();
|
|
|
- // AddMemoryDressup();
|
|
|
+ if (isDress)
|
|
|
+ {
|
|
|
+ UpdateStepBtn(true, id);
|
|
|
+ }
|
|
|
+ // UpdateListPartsSelected(id);
|
|
|
+ // UpdateListSuitPartsSelected();
|
|
|
}
|
|
|
private void OnBtnNormalClick(EventContext context)
|
|
|
{
|
|
@@ -363,7 +371,7 @@ namespace GFGGame
|
|
|
{
|
|
|
MyDressUpHelper.dressUpObj.PutOnSuitCfg(suitId, false);
|
|
|
}
|
|
|
-
|
|
|
+ UpdateStepBtn(true);
|
|
|
}
|
|
|
|
|
|
private void OnClickSuitPartsListItem(EventContext context)
|
|
@@ -384,14 +392,20 @@ namespace GFGGame
|
|
|
{
|
|
|
MyDressUpHelper.dressUpObj.PutOnOrTakeOffAction(id);
|
|
|
}
|
|
|
- MyDressUpHelper.AddMemoryDressup();
|
|
|
- UpdateListSuitPartsSelected();
|
|
|
+ UpdateStepBtn(true);
|
|
|
+ // UpdateListSuitPartsSelected();
|
|
|
}
|
|
|
|
|
|
- private void UpdateStepBtn()
|
|
|
+ private void UpdateStepBtn(bool isAdd, int suitId = 0)
|
|
|
{
|
|
|
+ if (isAdd)
|
|
|
+ {
|
|
|
+ MyDressUpHelper.AddMemoryDressup();
|
|
|
+ }
|
|
|
_ui.m_btnLastStep.enabled = MyDressUpHelper.stepIndex > 0;
|
|
|
- _ui.m_btnNextStep.enabled = MyDressUpHelper.stepIndex < MyDressUpHelper.MAX_MEMORY_STEP - 1;
|
|
|
+ _ui.m_btnNextStep.enabled = MyDressUpHelper.stepIndex < MyDressUpHelper.dressMemory.Count - 1;
|
|
|
+ UpdateListPartsSelected(suitId);
|
|
|
+ UpdateListSuitPartsSelected();
|
|
|
}
|
|
|
|
|
|
private void OnLongPress(EventContext context)
|
|
@@ -446,7 +460,7 @@ namespace GFGGame
|
|
|
UpdateBtnAction();
|
|
|
_ui.m_partsList.m_list.numItems = _currentList3.Count;
|
|
|
_ui.m_partsList2.m_list.numItems = _currentList4.Count;
|
|
|
- MyDressUpHelper.AddMemoryDressup();
|
|
|
+ UpdateStepBtn(true);
|
|
|
}
|
|
|
|
|
|
private void OnClickBtnSave()
|