/// <summary> /// 显示 隐藏 注册面板 /// </summary> /// <param name="game"></param> public void LoginPanelShowHidd() { Debug.Log("show login"); UTool.showOrHidd(loginPanel); }
void OnGUI() { UTool.CheckInitUI(); bool change = false; #region File Menu EditorGUILayout.BeginHorizontal(); showConst = EditorGUILayout.Foldout(showConst, "Show Const"); GUILayout.Space(20); DefaultLoad(); MenuFileIO(); EditorGUILayout.Space(); if (GUILayout.Button("Init", GUILayout.Width(50)) || tableConst.modelW == null) { InitTable(); } EditorGUILayout.EndHorizontal(); #endregion #region Edit Const Data if (showConst) { EditorGUILayout.BeginHorizontal(); GUILayout.Space(20); for (int i = 0; i < modelCode.Length; i++) { IntID model = modelCode[i]; if (tableConst.modelW.ContainsKey(model) == false) { continue; } EditorGUILayout.LabelField(model.ToString(), GUILayout.Width(25)); int w = EditorConstValue(tableConst.modelW[model], 40, "model_weight", tableConst.modelW[model]); if (w != tableConst.modelW[model]) { tableConst.modelW[model] = w; break; } if (i + 1 < modelCode.Length) // 종류가 다르면 다음라인에 출력. { int r1 = modelCode[i] / 100; int r2 = modelCode[i + 1] / 100; if (r1 != r2) { EditorGUILayout.EndHorizontal(); EditorGUILayout.BeginHorizontal(); GUILayout.Space(20); } } } if (GUILayout.Button("Apply", GUILayout.Width(50))) { EditConstWeightAllItem(); } EditorGUILayout.EndHorizontal(); EditorGUILayout.BeginHorizontal(); // [skill weight] GUILayout.Space(20); int count = 0; foreach (var pair in tableConst.skillW) { if (pair.Key == ItemSkill.none) { continue; } if (count == 7) { count = 0; EditorGUILayout.EndHorizontal(); EditorGUILayout.BeginHorizontal(); GUILayout.Space(20); } EditorGUILayout.LabelField(pair.Key.ToString(), GUILayout.Width(60)); int w = EditorConstValue(pair.Value, 40, "weapon_weight", pair.Value); if (w != pair.Value) { tableConst.skillW[pair.Key] = w; break; } count++; } EditorGUILayout.EndHorizontal(); GUILayout.Space(5); } #endregion #region Chioce Model // items info EditorGUILayout.BeginHorizontal(); GUILayout.Space(20); EditorGUILayout.LabelField("Filter:", GUILayout.Width(40)); string newFilter = EditorGUILayout.TextField(mIDFilter, GUILayout.Width(100)); { mIDFilter = newFilter; ReadyNowList(); } /* if (GUILayout.Button (" < ", GUILayout.Width(40))) * { * nowModel = MoveModel (nowModel, -1); * ReadyNowList (); * } * if (GUILayout.Button (" > ", GUILayout.Width(40))) * { * nowModel = MoveModel (nowModel, 1); * ReadyNowList (); * } * IntID newModel = EditorGUILayout.IntPopup (nowModel, modelName, modelCode, GUILayout.Width(50)); * if (newModel != nowModel) * { * nowModel = newModel; * ReadyNowList (); * }*/ EditorGUILayout.LabelField(" Model: " + nowList.Count.ToString(), GUILayout.Width(100)); EditorGUILayout.LabelField(" All: " + tItemDict.Count.ToString(), GUILayout.Width(100)); bool newshowAll = EditorGUILayout.ToggleLeft("Show All", showAll); if (showAll != newshowAll) { showAll = newshowAll; ReadyNowList(); } EditorGUILayout.EndHorizontal(); #endregion #region Field Name EditorGUILayout.BeginHorizontal(); // ablility list GUILayout.Space(20); EditorGUILayout.LabelField("DN ", GUILayout.Width(25)); EditorGUILayout.LabelField("Insert ", GUILayout.Width(40)); EditorGUILayout.LabelField("ItemID ", GUILayout.Width(60)); EditorGUILayout.LabelField("Scale ", GUILayout.Width(30)); EditorGUILayout.LabelField("Skill ", GUILayout.Width(60)); EditorGUILayout.LabelField("capEnergy ", GUILayout.Width(60)); EditorGUILayout.LabelField("genEnergy ", GUILayout.Width(60)); EditorGUILayout.LabelField("capBody ", GUILayout.Width(55)); EditorGUILayout.LabelField("capShield ", GUILayout.Width(60)); EditorGUILayout.LabelField("genShield ", GUILayout.Width(60)); EditorGUILayout.LabelField("capStorage", GUILayout.Width(60)); EditorGUILayout.LabelField("capAccel ", GUILayout.Width(60)); EditorGUILayout.LabelField("capSpeed ", GUILayout.Width(60)); EditorGUILayout.LabelField("capSight ", GUILayout.Width(60)); //EditorGUILayout.LabelField ("gain ", GUILayout.Width(40)); refreshgain = GUILayout.Button("gain", GUILayout.Width(40)); EditorGUILayout.EndHorizontal(); #endregion #region Edit Const ablility rate if (showConst) { EditorGUILayout.BeginHorizontal(); // ablility list GUILayout.Space(20); if (GUILayout.Button(editConst == "" ? "" : "Cancel", GUILayout.Width(60))) { editAbillR = new DicAbilityRate(tableConst.abillR); editConst = ""; EditorUtility.FocusProjectWindow(); // focus out } if (GUILayout.Button(editConst == "" ? "" : "Change: " + editConst, GUILayout.Width(167))) { EditConstRateAllItem(); editConst = ""; EditorUtility.FocusProjectWindow(); // focus out } editAbillR[ItemAbility.capEnergy] = EditorConstValue(editAbillR[ItemAbility.capEnergy], 60, "capEnergy", tableConst.abillR[ItemAbility.capEnergy]); editAbillR[ItemAbility.genEnergy] = EditorConstValue(editAbillR[ItemAbility.genEnergy], 60, "genEnergy", tableConst.abillR[ItemAbility.genEnergy]); editAbillR[ItemAbility.capBody] = EditorConstValue(editAbillR[ItemAbility.capBody], 55, "capBody", tableConst.abillR[ItemAbility.capBody]); editAbillR[ItemAbility.capShield] = EditorConstValue(editAbillR[ItemAbility.capShield], 60, "capShield", tableConst.abillR[ItemAbility.capShield]); editAbillR[ItemAbility.genShield] = EditorConstValue(editAbillR[ItemAbility.genShield], 60, "genShield", tableConst.abillR[ItemAbility.genShield]); GUILayout.Space(60 + 4); editAbillR[ItemAbility.capAccel] = EditorConstValue(editAbillR[ItemAbility.capAccel], 60, "capAccel", tableConst.abillR[ItemAbility.capAccel]); editAbillR[ItemAbility.capSpeed] = EditorConstValue(editAbillR[ItemAbility.capSpeed], 60, "capSpeed", tableConst.abillR[ItemAbility.capSpeed]); EditorConstValue(0, 60, "capSight", 0); EditorGUILayout.EndHorizontal(); } #endregion #region Edit Item List scrollpos = EditorGUILayout.BeginScrollView(new Vector2(0, scrollpos.y)); foreach (TableItem item in nowList) { EditorGUILayout.BeginHorizontal(); GUILayout.Space(20); if (GUILayout.Button("D", GUILayout.Width(25))) { newItem = item; tItemDict.Remove(item.itemID); ReadyNowList(); } if (GUILayout.Button("+", GUILayout.Width(40))) { TableItem insert = item; IntID id = item.itemID; for (; tItemDict.ContainsKey(id + 1); id++) { TableItem saveitem = tItemDict[id + 1]; insert.itemID = id + 1; tItemDict[insert.itemID] = insert; insert = saveitem; } insert.itemID = id + 1; tItemDict[insert.itemID] = insert; ReadyNowList(); } change = false; TableItem eitem = GUIEditor_Item(item, ref change); if (change) { if (eitem.itemID == item.itemID) { tItemDict[eitem.itemID] = eitem; } ReadyNowList(); } EditorGUILayout.EndHorizontal(); } EditorGUILayout.EndScrollView(); #endregion #region Add Item EditorGUILayout.BeginHorizontal(); GUILayout.Space(20); if (GUILayout.Button("ADD", GUILayout.Width(70))) { tItemDict[newItem.itemID] = newItem; ReadyNowList(); } change = false; newItem = GUIEditor_Item(newItem, ref change, true); EditorGUILayout.EndHorizontal(); #endregion #region Edit ItemID EditorGUILayout.BeginHorizontal(); GUILayout.Space(20); if (changeID != 0) { EditorGUILayout.LabelField(changeID.ToString(), GUILayout.Width(60)); changeEditID = EditorGUILayout.IntField(changeEditID, GUILayout.Width(60)); if (GUILayout.Button("Change", GUILayout.Width(100))) { if (changeEditID == changeID) { changeID = 0; } else { if (tItemDict.ContainsKey(changeEditID) == false) { TableItem item = tItemDict[changeID]; item.itemID = changeEditID; tItemDict[item.itemID] = item; tItemDict.Remove(changeID); ReadyNowList(); changeID = 0; } } } } EditorGUILayout.EndHorizontal(); #endregion }
protected void Application_Error(object sender, EventArgs e) { Exception err1 = Server.GetLastError(); UTool.WriteErrorLog(err1); }