public void GeneralSet() { this.cancelButton = this.Children.Find <ButtonWidget>("取消"); this.blockID = this.Children.Find <TextBoxWidget>("方块ID", true); this.blockIconWidget = this.Children.Find <BlockIconWidget>("方块"); this.SelectBlockButton = this.Children.Find <ButtonWidget>("选择方块"); }
public Sphere(ComponentPlayer player, int id, TerrainRaycastResult?Point1, SubsystemTerrain subsystemTerrain) { Point = null; Point = Point1; m_subsystemTerrain = subsystemTerrain; id1 = id; this.player = player; WidgetsManager.LoadWidgetContents(this, this, ContentManager.Get <XElement>("WE/DialogsWE/SphereDialog")); m_title = this.Children.Find <LabelWidget>("Sphere_Dialog.Title", true); Mode = this.Children.Find <LabelWidget>("Sphere_Dialog.Mode", true); Icon_select = this.Children.Find <ButtonWidget>("Sphere_Dialog.Icon_select", true); m_radius = this.Children.Find <SliderWidget>("Sphere_Dialog.Slider1", true); plusButton = this.Children.Find <ButtonWidget>("Sphere_Dialog.Button4", true); minusButton = this.Children.Find <ButtonWidget>("Sphere_Dialog.Button3", true); mSelect_mode = this.Children.Find <ButtonWidget>("Sphere_Dialog.Select_mode", true); m_okButton = this.Children.Find <ButtonWidget>("Sphere_Dialog.OK", true); m_cancelButton = this.Children.Find <ButtonWidget>("Sphere_Dialog.Cancel", true); this.m_blockIconWidget = this.Children.Find <BlockIconWidget>("Sphere_Dialog.Icon", true); m_title.Text = "Sphere"; //switch_mode.Text = "Holow"; //m_blockIconWidget.Value Mode.Text = "Hollow"; m_radius.MinValue = 1f; m_radius.MaxValue = 100; m_radius.Value = 1f; names.Add("Soild"); names.Add("Hollow"); foreach (string category in names) { m_categories.Add(new Category() { Name = category, }); } }
public Mountain(ComponentPlayer player, TerrainRaycastResult?Point1, SubsystemTerrain subsystemTerrain) { m_subsystemTerrain = subsystemTerrain; Point = Point1; id1 = 3; id2 = 2; id3 = 8; this.player = player; WidgetsManager.LoadWidgetContents(this, this, ContentManager.Get <XElement>("WE/DialogsWE/MountainDialog")); m_title = this.Children.Find <LabelWidget>("Mountain_Dialog.Title", true); Icon_select = this.Children.Find <ButtonWidget>("Mountain_Dialog.Icon_select", true); Icon_select1 = this.Children.Find <ButtonWidget>("Mountain_Dialog.Icon_select1", true); Icon_select2 = this.Children.Find <ButtonWidget>("Mountain_Dialog.Icon_select2", true); m_radius = this.Children.Find <SliderWidget>("Mountain_Dialog.Slider1", true); m_lenght = this.Children.Find <SliderWidget>("Mountain_Dialog.Slider2", true); plusButton = this.Children.Find <ButtonWidget>("Mountain_Dialog.Button4", true); minusButton = this.Children.Find <ButtonWidget>("Mountain_Dialog.Button3", true); lenght_plusButton = this.Children.Find <ButtonWidget>("Mountain_Dialog.Button2", true); lenght_minusButton = this.Children.Find <ButtonWidget>("Mountain_Dialog.Button1", true); m_okButton = this.Children.Find <ButtonWidget>("Mountain_Dialog.OK", true); m_cancelButton = this.Children.Find <ButtonWidget>("Mountain_Dialog.Cancel", true); m_blockIconWidget = this.Children.Find <BlockIconWidget>("Mountain_Dialog.Icon", true); m_blockIconWidget1 = this.Children.Find <BlockIconWidget>("Mountain_Dialog.Icon1", true); m_blockIconWidget2 = this.Children.Find <BlockIconWidget>("Mountain_Dialog.Icon2", true); m_title.Text = "Mountain"; //switch_mode.Text = "Holow"; //m_blockIconWidget.Value m_radius.MinValue = 1f; m_radius.MaxValue = 100; m_radius.Value = 1f; m_lenght.MinValue = 1f; m_lenght.MaxValue = 100; m_lenght.Value = 1f; }
public EditWorldDialog(CreatorAPI creatorAPI) { this.creatorAPI = creatorAPI; this.player = creatorAPI.componentMiner.ComponentPlayer; XElement node = ContentManager.Get <XElement>("NewWidgets/Dialog/编辑世界"); WidgetsManager.LoadWidgetContents(this, this, node); this.worldSettings = player.Project.FindSubsystem <SubsystemGameInfo>(true).WorldSettings; this.OKButton = Children.Find <ButtonWidget>("确定"); this.UpdataWorldButton = Children.Find <ButtonWidget>("重载"); this.UpdataButton = Children.Find <ButtonWidget>("刷新"); this.paletteButton = this.Children.Find <ButtonWidget>("Palette", true); this.blocksTextureIcon = this.Children.Find <RectangleWidget>("BlocksTextureIcon", true); this.blocksTextureLabel = this.Children.Find <LabelWidget>("BlocksTextureLabel", true); this.blocksTextureDetails = this.Children.Find <LabelWidget>("BlocksTextureDetails", true); this.blocksTextureButton = this.Children.Find <ButtonWidget>("BlocksTextureButton", true); this.supernaturalCreaturesButton = this.Children.Find <ButtonWidget>("SupernaturalCreatures", true); this.environmentBehaviorButton = this.Children.Find <ButtonWidget>("EnvironmentBehavior", true); this.timeOfDayButton = this.Children.Find <ButtonWidget>("TimeOfDay", true); this.weatherEffectsButton = this.Children.Find <ButtonWidget>("WeatherEffects", true); this.adventureRespawnButton = this.Children.Find <ButtonWidget>("AdventureRespawn", true); this.adventureSurvivalMechanicsButton = this.Children.Find <ButtonWidget>("AdventureSurvivalMechanics", true); this.terrainGenerationLabel = this.Children.Find <LabelWidget>("TerrainGenerationLabel", true); this.terrainGenerationButton = this.Children.Find <ButtonWidget>("TerrainGeneration", true); this.seaLevelOffsetSlider = this.Children.Find <SliderWidget>("SeaLevelOffset", true); this.temperatureOffsetSlider = this.Children.Find <SliderWidget>("TemperatureOffset", true); this.humidityOffsetSlider = this.Children.Find <SliderWidget>("HumidityOffset", true); this.biomeSizeSlider = this.Children.Find <SliderWidget>("BiomeSize", true); this.islandTerrainPanel = this.Children.Find <Widget>("IslandTerrainPanel", true); this.islandSizeNS = this.Children.Find <SliderWidget>("IslandSizeNS", true); this.islandSizeEW = this.Children.Find <SliderWidget>("IslandSizeEW", true); this.flatTerrainPanel = this.Children.Find <Widget>("FlatTerrainPanel", true); this.continentTerrainPanel = this.Children.Find <Widget>("ContinentTerrainPanel", true); this.flatTerrainLevelSlider = this.Children.Find <SliderWidget>("FlatTerrainLevel", true); this.flatTerrainBlock = this.Children.Find <BlockIconWidget>("FlatTerrainBlock", true); this.flatTerrainBlockLabel = this.Children.Find <LabelWidget>("FlatTerrainBlockLabel", true); this.flatTerrainBlockButton = this.Children.Find <ButtonWidget>("FlatTerrainBlockButton", true); this.flatTerrainMagmaOceanCheckbox = this.Children.Find <CheckboxWidget>("MagmaOcean", true); this.islandSizeEW.MinValue = 0f; this.islandSizeEW.MaxValue = (float)(this.islandSizes.Length - 1); this.islandSizeEW.Granularity = 1f; this.islandSizeNS.MinValue = 0f; this.islandSizeNS.MaxValue = (float)(this.islandSizes.Length - 1); this.islandSizeNS.Granularity = 1f; this.biomeSizeSlider.MinValue = 0f; this.biomeSizeSlider.MaxValue = (float)(this.biomeSizes.Length - 1); this.biomeSizeSlider.Granularity = 1f; }
public Rectangle(ComponentPlayer player, int id, TerrainRaycastResult?Point1, TerrainRaycastResult?Point2, SubsystemTerrain subsystemTerrain) { m_subsystemTerrain = subsystemTerrain; Point = Point1; this.Point2 = Point2; id1 = id; this.player = player; WidgetsManager.LoadWidgetContents(this, this, ContentManager.Get <XElement>("WE/DialogsWE/PillarDialog")); m_title = this.Children.Find <LabelWidget>("Pillar_Dialog.Title", true); mPosition = this.Children.Find <LabelWidget>("Pillar_Dialog.Pos", true); Icon_select = this.Children.Find <ButtonWidget>("Pillar_Dialog.Icon_select", true); mselect_pos = this.Children.Find <ButtonWidget>("Pillar_Dialog.Select_pos", true); m_okButton = this.Children.Find <ButtonWidget>("Pillar_Dialog.OK", true); m_cancelButton = this.Children.Find <ButtonWidget>("Pillar_Dialog.Cancel", true); this.m_blockIconWidget = this.Children.Find <BlockIconWidget>("Pillar_Dialog.Icon", true); m_title.Text = "Frame or box"; //switch_mode.Text = "Holow"; //m_blockIconWidget.Value mPosition.Text = "Frame"; m_blockIconWidget.Value = id; names.Add("Soild"); names.Add("Hollow"); names_pos.Add("Frame"); names_pos.Add("Hollow Box"); names_pos.Add("Soild Box"); foreach (string category in names) { m_categories.Add(new Category() { Name = category, }); } foreach (string category in names_pos) { m_categories_pos.Add(new Category() { Name = category, }); } }
public Round(ComponentPlayer player, int id, TerrainRaycastResult?Point1, SubsystemTerrain subsystemTerrain) { m_subsystemTerrain = subsystemTerrain; Point = Point1; id1 = id; this.player = player; WidgetsManager.LoadWidgetContents(this, this, ContentManager.Get <XElement>("WE/DialogsWE/RoundDialog")); m_title = this.Children.Find <LabelWidget>("Round_Dialog.Title", true); Mode = this.Children.Find <LabelWidget>("Round_Dialog.Mode", true); mPosition = this.Children.Find <LabelWidget>("Round_Dialog.Pos", true); Icon_select = this.Children.Find <ButtonWidget>("Round_Dialog.Icon_select", true); mselect_pos = this.Children.Find <ButtonWidget>("Round_Dialog.Select_pos", true); m_radius = this.Children.Find <SliderWidget>("Round_Dialog.Slider1", true); m_lenght = this.Children.Find <SliderWidget>("Round_Dialog.Slider2", true); plusButton = this.Children.Find <ButtonWidget>("Round_Dialog.Button4", true); minusButton = this.Children.Find <ButtonWidget>("Round_Dialog.Button3", true); lenght_plusButton = this.Children.Find <ButtonWidget>("Round_Dialog.Button2", true); lenght_minusButton = this.Children.Find <ButtonWidget>("Round_Dialog.Button1", true); mSelect_mode = this.Children.Find <ButtonWidget>("Round_Dialog.Select_mode", true); m_okButton = this.Children.Find <ButtonWidget>("Round_Dialog.OK", true); m_cancelButton = this.Children.Find <ButtonWidget>("Round_Dialog.Cancel", true); this.m_blockIconWidget = this.Children.Find <BlockIconWidget>("Round_Dialog.Icon", true); m_title.Text = "Round"; //switch_mode.Text = "Holow"; //m_blockIconWidget.Value mPosition.Text = "Flat"; Mode.Text = "Hollow"; m_radius.MinValue = 1f; m_radius.MaxValue = 100; m_radius.Value = 1f; m_lenght.MinValue = 1f; m_lenght.MaxValue = 100; m_lenght.Value = 1f; m_blockIconWidget.Value = id; names.Add("Soild"); names.Add("Hollow"); names_pos.Add("Flat"); names_pos.Add("Pos_X"); names_pos.Add("Pos_Y"); foreach (string category in names) { m_categories.Add(new Category() { Name = category, }); } foreach (string category in names_pos) { m_categories_pos.Add(new Category() { Name = category, }); } }