override public void Update() { base.Update(); CameraController.SetCamera(monsterComponent.location); Game game = Game.Get(); TextButton tb = new TextButton(new Vector2(0, 0), new Vector2(4, 1), "Monster", delegate { QuestEditorData.TypeSelect(); }); tb.button.GetComponent <UnityEngine.UI.Text>().fontSize = UIScaler.GetSmallFont(); tb.button.GetComponent <UnityEngine.UI.Text>().alignment = TextAnchor.MiddleRight; tb.ApplyTag("editor"); tb = new TextButton(new Vector2(4, 0), new Vector2(15, 1), name.Substring("Monster".Length), delegate { QuestEditorData.ListMonster(); }); tb.button.GetComponent <UnityEngine.UI.Text>().fontSize = UIScaler.GetSmallFont(); tb.button.GetComponent <UnityEngine.UI.Text>().alignment = TextAnchor.MiddleLeft; tb.ApplyTag("editor"); tb = new TextButton(new Vector2(19, 0), new Vector2(1, 1), "E", delegate { Rename(); }); tb.button.GetComponent <UnityEngine.UI.Text>().fontSize = UIScaler.GetSmallFont(); tb.ApplyTag("editor"); int offset = 1; DialogBox db = null; for (int heroes = 2; heroes < 5; heroes++) { int h = heroes; db = new DialogBox(new Vector2(0, offset), new Vector2(5, 1), heroes + " Heros:"); db.ApplyTag("editor"); tb = new TextButton(new Vector2(19, offset++), new Vector2(1, 1), "+", delegate { MonsterPlaceAdd(h); }, Color.green); tb.button.GetComponent <UnityEngine.UI.Text>().fontSize = UIScaler.GetSmallFont(); tb.ApplyTag("editor"); for (int i = 0; i < 8; i++) { if (monsterComponent.placement[heroes].Length > i) { int mSlot = i; string place = monsterComponent.placement[heroes][i]; tb = new TextButton(new Vector2(0, offset), new Vector2(1, 1), "-", delegate { MonsterPlaceRemove(h, mSlot); }, Color.red); tb.button.GetComponent <UnityEngine.UI.Text>().fontSize = UIScaler.GetSmallFont(); tb.ApplyTag("editor"); tb = new TextButton(new Vector2(1, offset), new Vector2(19, 1), place, delegate { QuestEditorData.SelectComponent(place); }); tb.button.GetComponent <UnityEngine.UI.Text>().fontSize = UIScaler.GetSmallFont(); tb.ApplyTag("editor"); } offset++; } } game.tokenBoard.AddHighlight(monsterComponent.location, "MonsterLoc", "editor"); }
override public void Update() { base.Update(); CameraController.SetCamera(monsterComponent.location); Game game = Game.Get(); TextButton tb = new TextButton(new Vector2(0, 0), new Vector2(4, 1), "Monster", delegate { QuestEditorData.TypeSelect(); }); tb.button.GetComponent <UnityEngine.UI.Text>().fontSize = UIScaler.GetSmallFont(); tb.button.GetComponent <UnityEngine.UI.Text>().alignment = TextAnchor.MiddleRight; tb.ApplyTag("editor"); tb = new TextButton(new Vector2(4, 0), new Vector2(15, 1), name.Substring("Monster".Length), delegate { QuestEditorData.ListMonster(); }); tb.button.GetComponent <UnityEngine.UI.Text>().fontSize = UIScaler.GetSmallFont(); tb.button.GetComponent <UnityEngine.UI.Text>().alignment = TextAnchor.MiddleLeft; tb.ApplyTag("editor"); tb = new TextButton(new Vector2(19, 0), new Vector2(1, 1), "E", delegate { Rename(); }); tb.button.GetComponent <UnityEngine.UI.Text>().fontSize = UIScaler.GetSmallFont(); tb.ApplyTag("editor"); DialogBox db = new DialogBox(new Vector2(0, 2), new Vector2(4, 1), "Position"); db.ApplyTag("editor"); tb = new TextButton(new Vector2(4, 2), new Vector2(1, 1), "><", delegate { GetPosition(); }); tb.button.GetComponent <UnityEngine.UI.Text>().fontSize = UIScaler.GetSmallFont(); tb.ApplyTag("editor"); tb = new TextButton(new Vector2(5, 2), new Vector2(1, 1), "~", delegate { GetPosition(false); }); tb.button.GetComponent <UnityEngine.UI.Text>().fontSize = UIScaler.GetSmallFont(); tb.ApplyTag("editor"); tb = new TextButton(new Vector2(0, 4), new Vector2(8, 1), "Event", delegate { QuestEditorData.SelectAsEvent(name); }); tb.button.GetComponent <UnityEngine.UI.Text>().fontSize = UIScaler.GetSmallFont(); tb.ApplyTag("editor"); tb = new TextButton(new Vector2(12, 4), new Vector2(8, 1), "Placement", delegate { QuestEditorData.SelectAsMonsterPlacement(name); }); tb.button.GetComponent <UnityEngine.UI.Text>().fontSize = UIScaler.GetSmallFont(); tb.ApplyTag("editor"); if (monsterComponent.unique) { tb = new TextButton(new Vector2(0, 6), new Vector2(8, 1), "Unique", delegate { UniqueToggle(); }); } else { tb = new TextButton(new Vector2(0, 6), new Vector2(8, 1), "Normal", delegate { UniqueToggle(); }); } tb.button.GetComponent <UnityEngine.UI.Text>().fontSize = UIScaler.GetSmallFont(); tb.ApplyTag("editor"); db = new DialogBox(new Vector2(0, 8), new Vector2(5, 1), "Unique Title:"); db.ApplyTag("editor"); uniqueTitleDBE = new DialogBoxEditable(new Vector2(5, 8), new Vector2(15, 1), monsterComponent.uniqueTitle, delegate { UpdateUniqueTitle(); }); uniqueTitleDBE.ApplyTag("editor"); uniqueTitleDBE.AddBorder(); db = new DialogBox(new Vector2(0, 10), new Vector2(20, 1), "Unique Information:"); db.ApplyTag("editor"); uniqueTextDBE = new DialogBoxEditable(new Vector2(0, 11), new Vector2(20, 8), monsterComponent.uniqueText, delegate { UpdateUniqueText(); }); uniqueTextDBE.ApplyTag("editor"); uniqueTextDBE.AddBorder(); db = new DialogBox(new Vector2(0, 20), new Vector2(3, 1), "Types:"); db.ApplyTag("editor"); tb = new TextButton(new Vector2(12, 20), new Vector2(1, 1), "+", delegate { MonsterTypeAdd(0); }, Color.green); tb.button.GetComponent <UnityEngine.UI.Text>().fontSize = UIScaler.GetSmallFont(); tb.ApplyTag("editor"); for (int i = 0; i < 8; i++) { if (monsterComponent.mTypes.Length > i) { int mSlot = i; string mName = monsterComponent.mTypes[i]; if (mName.IndexOf("Monster") == 0) { mName = mName.Substring("Monster".Length); } tb = new TextButton(new Vector2(0, 21 + i), new Vector2(1, 1), "-", delegate { MonsterTypeRemove(mSlot); }, Color.red); tb.button.GetComponent <UnityEngine.UI.Text>().fontSize = UIScaler.GetSmallFont(); tb.ApplyTag("editor"); tb = new TextButton(new Vector2(1, 21 + i), new Vector2(11, 1), mName, delegate { MonsterTypeReplace(mSlot); }); tb.button.GetComponent <UnityEngine.UI.Text>().fontSize = UIScaler.GetSmallFont(); tb.ApplyTag("editor"); tb = new TextButton(new Vector2(12, 21 + i), new Vector2(1, 1), "+", delegate { MonsterTypeAdd(mSlot + 1); }, Color.green); tb.button.GetComponent <UnityEngine.UI.Text>().fontSize = UIScaler.GetSmallFont(); tb.ApplyTag("editor"); } } db = new DialogBox(new Vector2(14, 20), new Vector2(3, 1), "Traits:"); db.ApplyTag("editor"); tb = new TextButton(new Vector2(19, 20), new Vector2(1, 1), "+", delegate { MonsterTraitsAdd(); }, Color.green); tb.button.GetComponent <UnityEngine.UI.Text>().fontSize = UIScaler.GetSmallFont(); tb.ApplyTag("editor"); for (int i = 0; i < 8; i++) { if (monsterComponent.mTraits.Length > i) { int mSlot = i; string mName = monsterComponent.mTraits[i]; tb = new TextButton(new Vector2(14, 21 + i), new Vector2(1, 1), "-", delegate { MonsterTraitsRemove(mSlot); }, Color.red); tb.button.GetComponent <UnityEngine.UI.Text>().fontSize = UIScaler.GetSmallFont(); tb.ApplyTag("editor"); tb = new TextButton(new Vector2(15, 21 + i), new Vector2(5, 1), mName, delegate { MonsterTraitReplace(mSlot); }); tb.button.GetComponent <UnityEngine.UI.Text>().fontSize = UIScaler.GetSmallFont(); tb.ApplyTag("editor"); } } game.tokenBoard.AddHighlight(monsterComponent.location, "MonsterLoc", "editor"); }