public CraftingRecipeSlotWidget() { XElement node = ContentManager.Get <XElement>("Widgets/CraftingRecipeSlot"); LoadContents(this, node); m_blockIconWidget = Children.Find <BlockIconWidget>("CraftingRecipeSlotWidget.Icon"); m_labelWidget = Children.Find <LabelWidget>("CraftingRecipeSlotWidget.Count"); }
public RecipaediaDescriptionScreen() { XElement node = ContentManager.Get <XElement>("Screens/RecipaediaDescriptionScreen"); LoadContents(this, node); m_blockIconWidget = Children.Find <BlockIconWidget>("Icon"); m_nameWidget = Children.Find <LabelWidget>("Name"); m_leftButtonWidget = Children.Find <ButtonWidget>("Left"); m_rightButtonWidget = Children.Find <ButtonWidget>("Right"); m_descriptionWidget = Children.Find <LabelWidget>("Description"); m_propertyNames1Widget = Children.Find <LabelWidget>("PropertyNames1"); m_propertyValues1Widget = Children.Find <LabelWidget>("PropertyValues1"); m_propertyNames2Widget = Children.Find <LabelWidget>("PropertyNames2"); m_propertyValues2Widget = Children.Find <LabelWidget>("PropertyValues2"); }
public WorldOptionsScreen() { XElement node = ContentManager.Get <XElement>("Screens/WorldOptionsScreen"); LoadContents(this, node); m_creativeModePanel = Children.Find <Widget>("CreativeModePanel"); m_newWorldOnlyPanel = Children.Find <Widget>("NewWorldOnlyPanel"); m_continentTerrainPanel = Children.Find <Widget>("ContinentTerrainPanel"); m_islandTerrainPanel = Children.Find <Widget>("IslandTerrainPanel"); m_islandSizeNS = Children.Find <SliderWidget>("IslandSizeNS"); m_islandSizeEW = Children.Find <SliderWidget>("IslandSizeEW"); m_flatTerrainPanel = Children.Find <Widget>("FlatTerrainPanel"); m_blocksTextureIcon = Children.Find <RectangleWidget>("BlocksTextureIcon"); m_blocksTextureLabel = Children.Find <LabelWidget>("BlocksTextureLabel"); m_blocksTextureDetails = Children.Find <LabelWidget>("BlocksTextureDetails"); m_blocksTextureButton = Children.Find <ButtonWidget>("BlocksTextureButton"); m_seaLevelOffsetSlider = Children.Find <SliderWidget>("SeaLevelOffset"); m_temperatureOffsetSlider = Children.Find <SliderWidget>("TemperatureOffset"); m_humidityOffsetSlider = Children.Find <SliderWidget>("HumidityOffset"); m_biomeSizeSlider = Children.Find <SliderWidget>("BiomeSize"); m_paletteButton = Children.Find <ButtonWidget>("Palette"); m_supernaturalCreaturesButton = Children.Find <ButtonWidget>("SupernaturalCreatures"); m_friendlyFireButton = Children.Find <ButtonWidget>("FriendlyFire"); m_environmentBehaviorButton = Children.Find <ButtonWidget>("EnvironmentBehavior"); m_timeOfDayButton = Children.Find <ButtonWidget>("TimeOfDay"); m_weatherEffectsButton = Children.Find <ButtonWidget>("WeatherEffects"); m_adventureRespawnButton = Children.Find <ButtonWidget>("AdventureRespawn"); m_adventureSurvivalMechanicsButton = Children.Find <ButtonWidget>("AdventureSurvivalMechanics"); m_terrainGenerationButton = Children.Find <ButtonWidget>("TerrainGeneration"); m_flatTerrainLevelSlider = Children.Find <SliderWidget>("FlatTerrainLevel"); m_flatTerrainShoreRoughnessSlider = Children.Find <SliderWidget>("FlatTerrainShoreRoughness"); m_flatTerrainBlock = Children.Find <BlockIconWidget>("FlatTerrainBlock"); m_flatTerrainBlockLabel = Children.Find <LabelWidget>("FlatTerrainBlockLabel"); m_flatTerrainBlockButton = Children.Find <ButtonWidget>("FlatTerrainBlockButton"); m_flatTerrainMagmaOceanCheckbox = Children.Find <CheckboxWidget>("MagmaOcean"); m_descriptionLabel = Children.Find <LabelWidget>("Description"); m_islandSizeEW.MinValue = 0f; m_islandSizeEW.MaxValue = m_islandSizes.Length - 1; m_islandSizeEW.Granularity = 1f; m_islandSizeNS.MinValue = 0f; m_islandSizeNS.MaxValue = m_islandSizes.Length - 1; m_islandSizeNS.Granularity = 1f; m_biomeSizeSlider.MinValue = 0f; m_biomeSizeSlider.MaxValue = m_biomeSizes.Length - 1; m_biomeSizeSlider.Granularity = 1f; }
public InventorySlotWidget() { base.Size = new Vector2(72f, 72f); WidgetsList children = Children; Widget[] array = new Widget[7]; BevelledRectangleWidget obj = new BevelledRectangleWidget { BevelSize = -2f, DirectionalLight = 0.15f, CenterColor = Color.Transparent }; BevelledRectangleWidget bevelledRectangleWidget = obj; m_rectangleWidget = obj; array[0] = bevelledRectangleWidget; RectangleWidget obj2 = new RectangleWidget { FillColor = Color.Transparent, OutlineColor = Color.Transparent }; RectangleWidget rectangleWidget = obj2; m_highlightWidget = obj2; array[1] = rectangleWidget; BlockIconWidget obj3 = new BlockIconWidget { HorizontalAlignment = WidgetAlignment.Center, VerticalAlignment = WidgetAlignment.Center, Margin = new Vector2(2f, 2f) }; BlockIconWidget blockIconWidget = obj3; m_blockIconWidget = obj3; array[2] = blockIconWidget; LabelWidget obj4 = new LabelWidget { Font = ContentManager.Get <BitmapFont>("Fonts/Pericles"), FontScale = 1f, HorizontalAlignment = WidgetAlignment.Far, VerticalAlignment = WidgetAlignment.Far, Margin = new Vector2(6f, 2f) }; LabelWidget labelWidget = obj4; m_countWidget = obj4; array[3] = labelWidget; ValueBarWidget obj5 = new ValueBarWidget { LayoutDirection = LayoutDirection.Vertical, HorizontalAlignment = WidgetAlignment.Near, VerticalAlignment = WidgetAlignment.Far, BarsCount = 3, FlipDirection = true, LitBarColor = new Color(32, 128, 0), UnlitBarColor = new Color(24, 24, 24, 64), BarSize = new Vector2(12f, 12f), BarSubtexture = ContentManager.Get <Subtexture>("Textures/Atlas/ProgressBar"), Margin = new Vector2(4f, 4f) }; ValueBarWidget valueBarWidget = obj5; m_healthBarWidget = obj5; array[4] = valueBarWidget; StackPanelWidget obj6 = new StackPanelWidget { Direction = LayoutDirection.Horizontal, HorizontalAlignment = WidgetAlignment.Far, Margin = new Vector2(3f, 3f) }; WidgetsList children2 = obj6.Children; RectangleWidget obj7 = new RectangleWidget { Subtexture = ContentManager.Get <Subtexture>("Textures/Atlas/InteractiveItemOverlay"), Size = new Vector2(13f, 14f), FillColor = new Color(160, 160, 160), OutlineColor = Color.Transparent }; rectangleWidget = obj7; m_interactiveOverlayWidget = obj7; children2.Add(rectangleWidget); WidgetsList children3 = obj6.Children; RectangleWidget obj8 = new RectangleWidget { Subtexture = ContentManager.Get <Subtexture>("Textures/Atlas/EditItemOverlay"), Size = new Vector2(12f, 14f), FillColor = new Color(160, 160, 160), OutlineColor = Color.Transparent }; rectangleWidget = obj8; m_editOverlayWidget = obj8; children3.Add(rectangleWidget); WidgetsList children4 = obj6.Children; RectangleWidget obj9 = new RectangleWidget { Subtexture = ContentManager.Get <Subtexture>("Textures/Atlas/FoodItemOverlay"), Size = new Vector2(11f, 14f), FillColor = new Color(160, 160, 160), OutlineColor = Color.Transparent }; rectangleWidget = obj9; m_foodOverlayWidget = obj9; children4.Add(rectangleWidget); array[5] = obj6; LabelWidget obj10 = new LabelWidget { Text = "Split", Font = ContentManager.Get <BitmapFont>("Fonts/Pericles"), Color = new Color(255, 64, 0), HorizontalAlignment = WidgetAlignment.Near, VerticalAlignment = WidgetAlignment.Near, Margin = new Vector2(2f, 0f) }; labelWidget = obj10; m_splitLabelWidget = obj10; array[6] = labelWidget; children.Add(array); }