public MicrowaveMenu(MicrowaveBoundUserInterface owner = null) { Owner = owner; Title = Loc.GetString("Microwave"); DisableCookingPanelOverlay = new PanelContainer { MouseFilter = MouseFilterMode.Stop, PanelOverride = new StyleBoxFlat { BackgroundColor = Color.Black.WithAlpha(0.60f) }, SizeFlagsHorizontal = SizeFlags.Fill, SizeFlagsVertical = SizeFlags.Fill, }; var hSplit = new HBoxContainer { SizeFlagsHorizontal = SizeFlags.Fill, SizeFlagsVertical = SizeFlags.Fill }; IngredientsListReagents = new ItemList { SizeFlagsVertical = SizeFlags.FillExpand, SizeFlagsHorizontal = SizeFlags.FillExpand, SelectMode = ItemList.ItemListSelectMode.Button, SizeFlagsStretchRatio = 2, CustomMinimumSize = (100, 128) }; IngredientsList = new ItemList { SizeFlagsVertical = SizeFlags.FillExpand, SizeFlagsHorizontal = SizeFlags.FillExpand, SelectMode = ItemList.ItemListSelectMode.Button, SizeFlagsStretchRatio = 2, CustomMinimumSize = (100, 128) }; hSplit.AddChild(IngredientsListReagents); //Padding between the lists. hSplit.AddChild(new Control { CustomMinimumSize = (0, 5), });
public MicrowaveMenu(MicrowaveBoundUserInterface owner) { SetSize = MinSize = (512, 256); Owner = owner; Title = Loc.GetString("microwave-menu-title"); DisableCookingPanelOverlay = new PanelContainer { MouseFilter = MouseFilterMode.Stop, PanelOverride = new StyleBoxFlat { BackgroundColor = Color.Black.WithAlpha(0.60f) }, }; var hSplit = new BoxContainer { Orientation = LayoutOrientation.Horizontal }; IngredientsListReagents = new ItemList { VerticalExpand = true, HorizontalExpand = true, SelectMode = ItemList.ItemListSelectMode.Button, SizeFlagsStretchRatio = 2, MinSize = (100, 128) }; IngredientsList = new ItemList { VerticalExpand = true, HorizontalExpand = true, SelectMode = ItemList.ItemListSelectMode.Button, SizeFlagsStretchRatio = 2, MinSize = (100, 128) }; hSplit.AddChild(IngredientsListReagents); //Padding between the lists. hSplit.AddChild(new Control { MinSize = (0, 5), });