|
@@ -1504,8 +1504,11 @@ public class SceneEdit : MonoBehaviour
|
|
|
this.m_misDelOnly = null;
|
|
|
for (int i = 0; i < this.m_listBtnPartsType.Count; i++)
|
|
|
{
|
|
|
- GameObject obj = this.m_listBtnPartsType[i];
|
|
|
- UnityEngine.Object.DestroyImmediate(obj);
|
|
|
+ GameObject gameObject = this.m_listBtnPartsType[i];
|
|
|
+ if (gameObject != null)
|
|
|
+ {
|
|
|
+ UnityEngine.Object.DestroyImmediate(gameObject);
|
|
|
+ }
|
|
|
}
|
|
|
this.m_listBtnPartsType.Clear();
|
|
|
for (int j = 0; j < this.m_listSliderItem.Count; j++)
|
|
@@ -1535,29 +1538,33 @@ public class SceneEdit : MonoBehaviour
|
|
|
for (int n = 0; n < f_cate.m_listPartsType.Count; n++)
|
|
|
{
|
|
|
SceneEdit.SPartsType spartsType = f_cate.m_listPartsType[n];
|
|
|
- if (MPN.EarNone > spartsType.m_mpn || spartsType.m_mpn > MPN.EarScl || PluginData.IsEnabled("GP001") || Product.type == Product.Type.JpPublic)
|
|
|
+ if (MPN.EarNone <= spartsType.m_mpn && spartsType.m_mpn <= MPN.EarScl && !PluginData.IsEnabled("GP001") && Product.type != Product.Type.JpPublic)
|
|
|
+ {
|
|
|
+ this.m_listBtnPartsType.Add(null);
|
|
|
+ }
|
|
|
+ else
|
|
|
{
|
|
|
UnityEngine.Object @object = Resources.Load("SceneEdit/MainMenu/Prefab/ButtonCate");
|
|
|
- GameObject gameObject = NGUITools.AddChild(this.m_Panel_PartsType.goGrid, @object as GameObject);
|
|
|
- UILabel uilabel = gameObject.GetComponentsInChildren<UILabel>(true)[0];
|
|
|
+ GameObject gameObject2 = NGUITools.AddChild(this.m_Panel_PartsType.goGrid, @object as GameObject);
|
|
|
+ UILabel uilabel = gameObject2.GetComponentsInChildren<UILabel>(true)[0];
|
|
|
Localize component = uilabel.gameObject.GetComponent<Localize>();
|
|
|
if (component != null)
|
|
|
{
|
|
|
component.SetTerm("SceneEdit/カテゴリー/サブ/" + spartsType.m_strPartsTypeName);
|
|
|
}
|
|
|
- ButtonEdit buttonEdit = gameObject.GetComponentsInChildren<ButtonEdit>(true)[0];
|
|
|
+ ButtonEdit buttonEdit = gameObject2.GetComponentsInChildren<ButtonEdit>(true)[0];
|
|
|
buttonEdit.m_PartsType = spartsType;
|
|
|
- UIButton uibutton = gameObject.GetComponentsInChildren<UIButton>(true)[0];
|
|
|
+ UIButton uibutton = gameObject2.GetComponentsInChildren<UIButton>(true)[0];
|
|
|
uibutton.isEnabled = spartsType.m_isEnabled;
|
|
|
if (uibutton.isEnabled)
|
|
|
{
|
|
|
EventDelegate.Add(uibutton.onClick, new EventDelegate.Callback(this.ClickCallback));
|
|
|
}
|
|
|
- buttonEdit.m_goFrame = gameObject.transform.Find("Frame").gameObject;
|
|
|
+ buttonEdit.m_goFrame = gameObject2.transform.Find("Frame").gameObject;
|
|
|
buttonEdit.m_goFrame.transform.GetComponent<UISprite>().enabled = false;
|
|
|
UIButton component2 = buttonEdit.GetComponent<UIButton>();
|
|
|
buttonEdit.m_colBtnDefault = component2.defaultColor;
|
|
|
- this.m_listBtnPartsType.Add(gameObject);
|
|
|
+ this.m_listBtnPartsType.Add(gameObject2);
|
|
|
}
|
|
|
}
|
|
|
this.m_Panel_PartsType.ResetScrollPos(0.5f);
|
|
@@ -2275,11 +2282,14 @@ public class SceneEdit : MonoBehaviour
|
|
|
for (int k = 0; k < this.m_listBtnPartsType.Count; k++)
|
|
|
{
|
|
|
GameObject gameObject = this.m_listBtnPartsType[k];
|
|
|
- ButtonEdit componentInChildren2 = gameObject.GetComponentInChildren<ButtonEdit>();
|
|
|
- UISprite component3 = componentInChildren2.m_goFrame.GetComponent<UISprite>();
|
|
|
- component3.enabled = false;
|
|
|
- UIButton component4 = componentInChildren2.GetComponent<UIButton>();
|
|
|
- component4.defaultColor = componentInChildren2.m_colBtnDefault;
|
|
|
+ if (!(gameObject == null))
|
|
|
+ {
|
|
|
+ ButtonEdit componentInChildren2 = gameObject.GetComponentInChildren<ButtonEdit>();
|
|
|
+ UISprite component3 = componentInChildren2.m_goFrame.GetComponent<UISprite>();
|
|
|
+ component3.enabled = false;
|
|
|
+ UIButton component4 = componentInChildren2.GetComponent<UIButton>();
|
|
|
+ component4.defaultColor = componentInChildren2.m_colBtnDefault;
|
|
|
+ }
|
|
|
}
|
|
|
UISprite component5 = componentInChildren.m_goFrame.GetComponent<UISprite>();
|
|
|
component5.enabled = true;
|
|
@@ -2726,13 +2736,16 @@ public class SceneEdit : MonoBehaviour
|
|
|
}
|
|
|
foreach (GameObject gameObject in this.m_listBtnPartsType)
|
|
|
{
|
|
|
- ButtonEdit buttonEdit = gameObject.GetComponentsInChildren<ButtonEdit>(true)[0];
|
|
|
- SceneEdit.SPartsType partsType = buttonEdit.m_PartsType;
|
|
|
- UIButton uibutton = gameObject.GetComponentsInChildren<UIButton>(true)[0];
|
|
|
- uibutton.isEnabled = partsType.m_isEnabled;
|
|
|
- if (uibutton.isEnabled && (uibutton.onClick == null || uibutton.onClick.Count == 0))
|
|
|
+ if (!(gameObject == null))
|
|
|
{
|
|
|
- EventDelegate.Add(uibutton.onClick, new EventDelegate.Callback(this.ClickCallback));
|
|
|
+ ButtonEdit buttonEdit = gameObject.GetComponentsInChildren<ButtonEdit>(true)[0];
|
|
|
+ SceneEdit.SPartsType partsType = buttonEdit.m_PartsType;
|
|
|
+ UIButton uibutton = gameObject.GetComponentsInChildren<UIButton>(true)[0];
|
|
|
+ uibutton.isEnabled = partsType.m_isEnabled;
|
|
|
+ if (uibutton.isEnabled && (uibutton.onClick == null || uibutton.onClick.Count == 0))
|
|
|
+ {
|
|
|
+ EventDelegate.Add(uibutton.onClick, new EventDelegate.Callback(this.ClickCallback));
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
if (this.isNewFace && this.maid.GetProp(MPN.EarNone).value != 0)
|
|
@@ -3069,6 +3082,7 @@ public class SceneEdit : MonoBehaviour
|
|
|
{
|
|
|
if (scategory.m_listPartsType[i].m_ePartsType == partsType && i < this.m_listBtnPartsType.Count)
|
|
|
{
|
|
|
+ this.m_listBtnPartsType[i].name = partsType;
|
|
|
UIButton componentInChildren = this.m_listBtnPartsType[i].GetComponentInChildren<UIButton>();
|
|
|
if (componentInChildren != null)
|
|
|
{
|