/// <summary> /// 创建普通文本弹窗 /// </summary> /// <returns></returns> public static GeneralDialog createGeneralDialog() { GameObject dialogObj = Instantiate(ResourcesManager.LoadData <GameObject>("Prefab/UI/Common/GeneralDialog")); GeneralDialog dialog = dialogObj.GetComponent <GeneralDialog>(); return(dialog); }
public static Location NewItem(LocationType locationType, int parentID) { Location returnPart = null; GeneralDialog gd = new GeneralDialog(); gd.setTitle("Add " + locationType); var name = gd.addSimpleField(locationType + " name"); var button = gd.addSimpleButtons("Add"); button.Click += delegate { returnPart = new Location(name.Text, locationType, -1, parentID); gd.Close(); }; gd.ShowDialog(); return(returnPart); }
/// <summary> /// Allows the game to perform any initialization it needs to before starting to run. /// This is where it can query for any required services and load any non-graphic /// related content. Calling base.Initialize will enumerate through any components /// and initialize them as well. /// </summary> protected override void Initialize() { ClearBackground = true; BackgroundColor = Color.White; ExitConfirmation = false; Camera = new CameraManager(this); Components.Add(Camera); MpqManager.Initialize("S:\\WoW"); //Components.Add(new AdtDrawer(this, "World\\maps\\Azeroth\\Azeroth_36_49.adt")); //Components.Add(new AdtDrawer(this, "World\\maps\\Azeroth\\Azeroth_29_49.adt")); Stormwind //Components.Add(new AdtDrawer(this, "World\\maps\\Kalimdor\\Kalimdor_32_30.adt")); IsMouseVisible = true; base.Initialize(); GeneralDialog = new GeneralDialog(Manager); }
public static Part NewItem() { Part returnPart = null; GeneralDialog gd = new GeneralDialog(); gd.setTitle("Add Part"); var name = gd.addSimpleField("Part Name"); var id = gd.addSimpleField("Internal ID"); var eol = gd.addCheckbox("Is part at End of Life", false); var button = gd.addSimpleButtons("Add"); button.Click += delegate { returnPart = new Part(name.Text, id.Text, (bool)eol.IsChecked); gd.Close(); }; gd.ShowDialog(); return(returnPart); }
/// <summary> /// Allows the game to perform any initialization it needs to before starting to run. /// This is where it can query for any required services and load any non-graphic /// related content. Calling base.Initialize will enumerate through any components /// and initialize them as well. /// </summary> protected override void Initialize() { ClearBackground = true; BackgroundColor = Color.White; ExitConfirmation = false; Camera = new CameraManager(this); Components.Add(Camera); //Components.Add(new AdtDrawer(this, "World\\maps\\EyeoftheStorm2.0\\EyeoftheStorm2.0_28_27.adt")); //Components.Add(new AdtDrawer(this, "World\\maps\\EyeoftheStorm2.0\\EyeoftheStorm2.0_28_28.adt")); //Components.Add(new AdtDrawer(this, "World\\maps\\Azeroth\\Azeroth_35_20.adt")); //Components.Add(new AdtDrawer(this, "World\\maps\\Azeroth\\Azeroth_36_20.adt")); /*Components.Add(new AdtDrawer(this, "World\\maps\\GoldRushBG\\GoldRushBG_28_30.adt")); * Components.Add(new AdtDrawer(this, "World\\maps\\GoldRushBG\\GoldRushBG_28_31.adt")); * Components.Add(new AdtDrawer(this, "World\\maps\\GoldRushBG\\GoldRushBG_28_32.adt")); * Components.Add(new AdtDrawer(this, "World\\maps\\GoldRushBG\\GoldRushBG_28_33.adt")); */ Components.Add(new AdtDrawer(this, "World\\maps\\Azeroth\\Azeroth_30_43.adt")); Components.Add(new AdtDrawer(this, "World\\maps\\Azeroth\\Azeroth_30_44.adt")); //Components.Add(new AdtDrawer(this, "World\\maps\\Azeroth\\Azeroth_30_53.adt")); //Components.Add(new AdtDrawer(this, "World\\maps\\Azeroth\\Azeroth_31_53.adt")); //Components.Add(new AdtDrawer(this, "World\\maps\\Kalimdor\\Kalimdor_29_12.adt")); //Components.Add(new AdtDrawer(this, "World\\maps\\Kalimdor\\Kalimdor_30_12.adt")); //Components.Add(new AdtDrawer(this, "World\\maps\\Kalimdor\\Kalimdor_29_13.adt")); //Components.Add(new AdtDrawer(this, "World\\maps\\Kalimdor\\Kalimdor_30_13.adt")); /*Components.Add(new AdtDrawer(this, "World\\maps\\GoldRushBG\\GoldRushBG_29_30.adt")); * Components.Add(new AdtDrawer(this, "World\\maps\\GoldRushBG\\GoldRushBG_29_31.adt")); * Components.Add(new AdtDrawer(this, "World\\maps\\GoldRushBG\\GoldRushBG_29_32.adt")); * Components.Add(new AdtDrawer(this, "World\\maps\\GoldRushBG\\GoldRushBG_29_33.adt")); * * Components.Add(new AdtDrawer(this, "World\\maps\\GoldRushBG\\GoldRushBG_30_30.adt")); * Components.Add(new AdtDrawer(this, "World\\maps\\GoldRushBG\\GoldRushBG_30_31.adt")); * Components.Add(new AdtDrawer(this, "World\\maps\\GoldRushBG\\GoldRushBG_30_32.adt")); * Components.Add(new AdtDrawer(this, "World\\maps\\GoldRushBG\\GoldRushBG_30_33.adt")); * * Components.Add(new AdtDrawer(this, "World\\maps\\GoldRushBG\\GoldRushBG_31_30.adt")); * Components.Add(new AdtDrawer(this, "World\\maps\\GoldRushBG\\GoldRushBG_31_31.adt")); * Components.Add(new AdtDrawer(this, "World\\maps\\GoldRushBG\\GoldRushBG_31_32.adt")); * Components.Add(new AdtDrawer(this, "World\\maps\\GoldRushBG\\GoldRushBG_31_33.adt")); * * Components.Add(new AdtDrawer(this, "World\\maps\\GoldRushBG\\GoldRushBG_32_30.adt")); * Components.Add(new AdtDrawer(this, "World\\maps\\GoldRushBG\\GoldRushBG_32_31.adt")); * Components.Add(new AdtDrawer(this, "World\\maps\\GoldRushBG\\GoldRushBG_32_32.adt")); * Components.Add(new AdtDrawer(this, "World\\maps\\GoldRushBG\\GoldRushBG_32_33.adt")); */ //Components.Add(new AdtDrawer(this, "World\\maps\\Firelands1\\Firelands1_32_54.adt")); //Components.Add(new AdtDrawer(this, "World\\maps\\Firelands1\\Firelands1_32_55.adt"));*/ //Components.Add(new AdtDrawer(this, "World\\maps\\Firelands1\\Firelands1_34_40.adt")); AddMesh("Azeroth", 30, 43); AddMesh("Azeroth", 30, 44); //AddMesh("Azeroth", 30, 53); //AddMesh("Azeroth", 31, 53); //AddMesh("Kalimdor", 29, 12); //AddMesh("Kalimdor", 30, 12); //AddMesh("Kalimdor", 29, 13); //AddMesh("Kalimdor", 30, 13); //AddMesh("Azeroth", 35, 20); //AddMesh("Azeroth", 36, 20); /* * AddMesh("GoldRushBG", 28, 30); * AddMesh("GoldRushBG", 28, 31); * AddMesh("GoldRushBG", 28, 32); * * AddMesh("GoldRushBG", 29, 30); * AddMesh("GoldRushBG", 29, 31); * AddMesh("GoldRushBG", 29, 32); * * AddMesh("GoldRushBG", 30, 30); * AddMesh("GoldRushBG", 30, 31); * AddMesh("GoldRushBG", 30, 32); * * AddMesh("GoldRushBG", 31, 30); * AddMesh("GoldRushBG", 31, 31); * AddMesh("GoldRushBG", 31, 32); * * AddMesh("GoldRushBG", 32, 30); * AddMesh("GoldRushBG", 32, 31); * AddMesh("GoldRushBG", 32, 32);*/ //AddMesh("Azeroth", 34, 40); //Components.Add(new AdtDrawer(this, "World\\maps\\Azeroth\\Azeroth_36_49.adt")); //Components.Add(new AdtDrawer(this, "World\\maps\\Azeroth\\Azeroth_29_49.adt")); Stormwind //Components.Add(new AdtDrawer(this, "World\\maps\\Kalimdor\\Kalimdor_32_30.adt")); IsMouseVisible = true; base.Initialize(); GeneralDialog = new GeneralDialog(Manager); }