override public void Update() { base.Update(); Game game = Game.Get(); TextButton tb = new TextButton(new Vector2(0, 0), new Vector2(3, 1), PUZZLE, 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(3, 0), new Vector2(16, 1), new StringKey(name.Substring("Puzzle".Length), false), delegate { QuestEditorData.ListPuzzle(); }); 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), CommonStringKeys.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(3, 1), new StringKey("val", "X_COLON", PUZZLE_CLASS)); db.ApplyTag("editor"); tb = new TextButton(new Vector2(5, 2), new Vector2(8, 1), new StringKey(puzzleComponent.puzzleClass, false), delegate { Class(); }); tb.button.GetComponent <UnityEngine.UI.Text>().fontSize = UIScaler.GetSmallFont(); tb.ApplyTag("editor"); db = new DialogBox(new Vector2(0, 4), new Vector2(4, 1), new StringKey("val", "X_COLON", CommonStringKeys.SKILL)); db.ApplyTag("editor"); tb = new TextButton(new Vector2(5, 4), new Vector2(6, 1), new StringKey(puzzleComponent.skill, false), delegate { Skill(); }); tb.button.GetComponent <UnityEngine.UI.Text>().fontSize = UIScaler.GetSmallFont(); tb.ApplyTag("editor"); db = new DialogBox(new Vector2(0, 6), new Vector2(4, 1), new StringKey("val", "X_COLON", PUZZLE_LEVEL)); db.ApplyTag("editor"); levelDBE = new DialogBoxEditable(new Vector2(5, 6), new Vector2(2, 1), puzzleComponent.puzzleLevel.ToString(), delegate { UpdateLevel(); }); levelDBE.ApplyTag("editor"); levelDBE.AddBorder(); if (!puzzleComponent.puzzleClass.Equals("slide")) { db = new DialogBox(new Vector2(0, 8), new Vector2(5, 1), new StringKey("val", "X_COLON", PUZZLE_ALT_LEVEL)); db.ApplyTag("editor"); altLevelDBE = new DialogBoxEditable(new Vector2(5, 8), new Vector2(2, 1), puzzleComponent.puzzleAltLevel.ToString(), delegate { UpdateAltLevel(); }); altLevelDBE.ApplyTag("editor"); altLevelDBE.AddBorder(); if (puzzleComponent.puzzleClass.Equals("image")) { db = new DialogBox(new Vector2(0, 10), new Vector2(3, 1), new StringKey("val", "X_COLON", IMAGE)); db.ApplyTag("editor"); tb = new TextButton(new Vector2(5, 10), new Vector2(8, 1), new StringKey(puzzleComponent.imageType, false), delegate { Image(); }); tb.button.GetComponent <UnityEngine.UI.Text>().fontSize = UIScaler.GetSmallFont(); tb.ApplyTag("editor"); } } tb = new TextButton(new Vector2(0, 12), new Vector2(8, 1), CommonStringKeys.EVENT, delegate { QuestEditorData.SelectAsEvent(name); }); tb.button.GetComponent <UnityEngine.UI.Text>().fontSize = UIScaler.GetSmallFont(); tb.ApplyTag("editor"); }
override public void Update() { base.Update(); Game game = Game.Get(); TextButton tb = new TextButton(new Vector2(0, 0), new Vector2(3, 1), "Puzzle", 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(3, 0), new Vector2(16, 1), name.Substring("Puzzle".Length), delegate { QuestEditorData.ListPuzzle(); }); 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(3, 1), "Class:"); db.ApplyTag("editor"); tb = new TextButton(new Vector2(3, 2), new Vector2(8, 1), puzzleComponent.puzzleClass, delegate { Class(); }); tb.button.GetComponent <UnityEngine.UI.Text>().fontSize = UIScaler.GetSmallFont(); tb.ApplyTag("editor"); db = new DialogBox(new Vector2(0, 4), new Vector2(3, 1), "Skill:"); db.ApplyTag("editor"); tb = new TextButton(new Vector2(3, 4), new Vector2(2, 1), EventManager.SymbolReplace(puzzleComponent.skill), delegate { Skill(); }); tb.button.GetComponent <UnityEngine.UI.Text>().fontSize = UIScaler.GetSmallFont(); tb.ApplyTag("editor"); db = new DialogBox(new Vector2(0, 6), new Vector2(3, 1), "Level:"); db.ApplyTag("editor"); levelDBE = new DialogBoxEditable(new Vector2(3, 6), new Vector2(2, 1), puzzleComponent.puzzleLevel.ToString(), delegate { UpdateLevel(); }); levelDBE.ApplyTag("editor"); levelDBE.AddBorder(); if (!puzzleComponent.puzzleClass.Equals("slide")) { db = new DialogBox(new Vector2(0, 8), new Vector2(3, 1), "Alt Level:"); db.ApplyTag("editor"); altLevelDBE = new DialogBoxEditable(new Vector2(3, 8), new Vector2(2, 1), puzzleComponent.puzzleAltLevel.ToString(), delegate { UpdateAltLevel(); }); altLevelDBE.ApplyTag("editor"); altLevelDBE.AddBorder(); if (puzzleComponent.puzzleClass.Equals("image")) { db = new DialogBox(new Vector2(0, 10), new Vector2(3, 1), "Image:"); db.ApplyTag("editor"); tb = new TextButton(new Vector2(3, 10), new Vector2(8, 1), puzzleComponent.imageType, delegate { Image(); }); tb.button.GetComponent <UnityEngine.UI.Text>().fontSize = UIScaler.GetSmallFont(); tb.ApplyTag("editor"); } } tb = new TextButton(new Vector2(0, 12), new Vector2(8, 1), "Event", delegate { QuestEditorData.SelectAsEvent(name); }); tb.button.GetComponent <UnityEngine.UI.Text>().fontSize = UIScaler.GetSmallFont(); tb.ApplyTag("editor"); }