private void InitWindow() { Title = new GuiDockChild() { Dock = GuiDock.Top, Control = new GuiLabel() { Text = "My Window 1" } }; Border = new GuiBorder() { Border = new GuiThickness(5), BorderColor = Color.White }; Margin = new GuiThickness(0); BackgroundColor = new Color(Color.Green, 0.5f); Name = "W1"; X = 0; Y = 0; Width = 500; Height = 400; Content = new GuiPanel() { Name = "Panel 1", Margin = new GuiThickness(60), BackgroundColor = Color.Orange, Content = new GuiStackPanel() { Name = "Stack", Margin = new GuiThickness(15), BackgroundColor = Color.DarkSlateGray, Orientation = GuiStackPanelOrientation.Horizontal, Childs = new List <GuiStackChild> { new GuiStackChild() { Control = new GuiBox() { Name = "PNL Box 1", BackgroundColor = Color.Black, Width = 100, Height = 100 } }, new GuiStackChild() { Control = new GuiCanvasPanel() { Name = "PNL Canvas", BackgroundColor = Color.DarkBlue, Childs = fMyBoxes } }, new GuiStackChild() { Control = new GuiLabel() { Name = "PNL Clipped Label", BackgroundColor = Color.DarkBlue, Text = "This should be a clipped label", HorizontalAlignment = GuiHorizontalAlignment.Right, VerticalAlignment = GuiVerticalAlignment.Top, Width = 50, Height = 5 } }, new GuiStackChild() { Control = new GuiBox() { Name = "PNL Box 2", BackgroundColor = Color.Gray, Width = 100, Height = 100 } }, new GuiStackChild() { Control = new GuiDockPanel() { Name = "PNL Dock", BackgroundColor = Color.Black, LastChildFill = true, Childs = new List <GuiDockChild>() { new GuiDockChild() { Dock = GuiDock.Left, Control = new GuiLabel() { Text = "Left", BackgroundColor = Color.LightPink } }, new GuiDockChild() { Dock = GuiDock.Top, Control = new GuiLabel() { Text = "Top", BackgroundColor = Color.LightGreen } }, new GuiDockChild() { Dock = GuiDock.Right, Control = new GuiLabel() { Text = "Right", BackgroundColor = Color.LightYellow } }, new GuiDockChild() { Dock = GuiDock.Bottom, Control = new GuiLabel() { Text = "Bottom", BackgroundColor = Color.LightSkyBlue } }, new GuiDockChild() { Control = new GuiLabel() { Text = "LAST", BackgroundColor = Color.White } }, } } }, new GuiStackChild() { Control = fMyLabel1 }, new GuiStackChild() { Control = new GuiBox() { Name = "PNL Box 3", BackgroundColor = Color.Red, Width = 20, Height = 20 } }, new GuiStackChild() { Control = fMyLabel2 }, new GuiStackChild() { Control = new GuiStackPanel() { Name = "Another Stacker", Orientation = GuiStackPanelOrientation.Horizontal, BackgroundColor = Color.DarkRed, Margin = new GuiThickness(10), Childs = new List <GuiStackChild>() { new GuiStackChild() { Control = new GuiBox() { Name = "Box A1", Width = 20, Height = 20, Margin = new GuiThickness(3), BackgroundColor = Color.Black } }, new GuiStackChild() { Control = new GuiBox() { Name = "Box A1", Width = 30, Height = 30, Margin = new GuiThickness(3), BackgroundColor = Color.Red } }, new GuiStackChild() { Control = new GuiBox() { Name = "Box A1", Width = 20, Height = 20, Margin = new GuiThickness(3), BackgroundColor = Color.Green } }, new GuiStackChild() { Control = new GuiBox() { Name = "Box A1", Width = 20, Height = 20, Margin = new GuiThickness(3), BackgroundColor = Color.Blue } }, new GuiStackChild() { Control = fMyBox1 } } } }, new GuiStackChild() { Control = new GuiStackPanel() { Name = "Another Stacker", Orientation = GuiStackPanelOrientation.Vertical, BackgroundColor = Color.DarkBlue, Margin = new GuiThickness(10), HorizontalAlignment = GuiHorizontalAlignment.Center, VerticalAlignment = GuiVerticalAlignment.Center, Childs = new List <GuiStackChild>() { new GuiStackChild() { Control = new GuiBox() { Name = "Box A1", Width = 20, Height = 20, Margin = new GuiThickness(3), BackgroundColor = Color.Black } }, new GuiStackChild() { Control = new GuiBox() { Name = "Box A1", Width = 30, Height = 30, Margin = new GuiThickness(3), BackgroundColor = Color.Red } }, new GuiStackChild() { Control = new GuiBox() { Name = "Box A1", Width = 20, Height = 20, Margin = new GuiThickness(3), BackgroundColor = Color.Green } }, new GuiStackChild() { Control = new GuiBox() { Name = "Box A1", Width = 20, Height = 20, Margin = new GuiThickness(3), BackgroundColor = Color.Blue } }, new GuiStackChild() { Control = fMyBox2 } } } }, new GuiStackChild() { Control = new GuiBox() { Name = "PNL Box 4", BackgroundColor = Color.Red, Width = 20, Height = 20 } }, new GuiStackChild() { Control = new GuiBox() { Name = "PNL Box 5", BackgroundColor = Color.Yellow, Width = 20, Height = 20 } } } } }; }
private void InitWindow() { Title = new GuiDockChild() { Dock = GuiDock.Top, Control = new GuiLabel() { Text = "My Window 2" } }; X = 150; Y = 100; Width = 500; Height = 400; Margin = new GuiThickness(50); Name = "W2"; Content = new GuiStackPanel() { Name = "Stack", Margin = new GuiThickness(0), Orientation = GuiStackPanelOrientation.Horizontal, Childs = new List <GuiStackChild> { new GuiStackChild() { Control = new GuiPanel() { Name = "Panel Left", BackgroundColor = Color.White, Width = 200, HorizontalAlignment = GuiHorizontalAlignment.Left, Content = new GuiStackPanel() { Name = "Stack", Margin = new GuiThickness(0), Orientation = GuiStackPanelOrientation.Vertical, Childs = new List <GuiStackChild>() { new GuiStackChild() { Control = new GuiLabel() { Text = "Line 1", Padding = new GuiThickness(2), BackgroundColor = Color.Yellow } }, new GuiStackChild() { Control = new GuiLabel() { Text = "Line 2", Padding = new GuiThickness(4), BackgroundColor = Color.Yellow } }, new GuiStackChild() { Control = new GuiLabel() { Text = "Line 3", Padding = new GuiThickness(6), BackgroundColor = Color.Yellow } }, new GuiStackChild() { Control = new GuiLabel() { Text = "Line 4", Padding = new GuiThickness(8), BackgroundColor = Color.Yellow } }, new GuiStackChild() { Control = new GuiLabel() { Text = "Line 5", Padding = new GuiThickness(10), BackgroundColor = Color.Yellow } }, new GuiStackChild() { Control = new GuiLabel() { Text = "Line 6", Padding = new GuiThickness(2), BackgroundColor = Color.Pink, HorizontalAlignment = GuiHorizontalAlignment.Left } }, new GuiStackChild() { Control = new GuiLabel() { Text = "Line 7", Padding = new GuiThickness(2), BackgroundColor = Color.Pink, HorizontalAlignment = GuiHorizontalAlignment.Right } }, new GuiStackChild() { Control = new GuiLabel() { Text = "Line 8", Padding = new GuiThickness(2), BackgroundColor = Color.Pink, HorizontalAlignment = GuiHorizontalAlignment.Center } }, new GuiStackChild() { Control = new GuiLabel() { Text = "Line 9", Padding = new GuiThickness(2), BackgroundColor = Color.Pink, HorizontalAlignment = GuiHorizontalAlignment.Stretch } }, } } } }, new GuiStackChild() { Control = new GuiPanel() { Name = "Panel Right", BackgroundColor = Color.Blue, HorizontalAlignment = GuiHorizontalAlignment.Left, } } } }; }
private void InitWindow() { Title = new GuiDockChild() { Dock = GuiDock.Bottom, Control = new GuiLabel() { Text = "My Window 3" } }; Border = new GuiBorder() { Border = new GuiThickness(2), BorderColor = Color.Black }; X = 300; Y = 200; Width = 500; Height = 400; Margin = new GuiThickness(0); Name = "W3"; Content = new GuiTabControl() { Name = "MainTab", BackgroundColor = Color.White, Childs = new List <GuiTabControlChild>() { new GuiTabControlChild() { Header = new GuiLabel() { BackgroundColor = Color.Orange, Text = "FPS", Margin = new GuiThickness(2) }, Control = new GuiPanel() { BackgroundColor = Color.DarkMagenta, Content = fMyFpsLabel } }, new GuiTabControlChild() { Header = new GuiLabel() { BackgroundColor = Color.Orange, Text = "StackPanel", Margin = new GuiThickness(2) }, Control = new GuiPanel() { Content = new GuiTabControl() { Name = "SubTab", Childs = new List <GuiTabControlChild>() { new GuiTabControlChild() { Header = new GuiLabel() { BackgroundColor = Color.Orange, Text = "100x100", Margin = new GuiThickness(2) }, Control = new GuiStackPanel() { BackgroundColor = Color.Black, Childs = new List <GuiStackChild>() { new GuiStackChild() { Control = new GuiBox() { BackgroundColor = Color.Yellow, Width = 100, Height = 100 } }, new GuiStackChild() { Control = new GuiBox() { BackgroundColor = Color.Aquamarine, Width = 100, Height = 100 } }, new GuiStackChild() { Control = new GuiBox() { BackgroundColor = Color.Blue, Width = 100, Height = 100 } }, new GuiStackChild() { Control = new GuiBox() { BackgroundColor = Color.CadetBlue, Width = 100, Height = 100 } } } } }, new GuiTabControlChild() { Header = new GuiLabel() { BackgroundColor = Color.Orange, Text = "H.Stretch", Margin = new GuiThickness(2) }, Control = new GuiStackPanel() { BackgroundColor = Color.Red, Orientation = GuiStackPanelOrientation.Horizontal, VerticalAlignment = GuiVerticalAlignment.Stretch, HorizontalAlignment = GuiHorizontalAlignment.Stretch, Childs = new List <GuiStackChild>() { new GuiStackChild() { Control = new GuiBox() { BackgroundColor = Color.Yellow, Width = 100, Height = 100 } }, new GuiStackChild() { Control = new GuiBox() { BackgroundColor = Color.Aquamarine, Width = 100, Height = 100 } }, new GuiStackChild() { Control = new GuiBox() { BackgroundColor = Color.Blue, Width = 100, Height = 100 } }, new GuiStackChild() { Control = new GuiBox() { BackgroundColor = Color.CadetBlue, Width = 100, Height = 100 } } } } }, new GuiTabControlChild() { Header = new GuiLabel() { BackgroundColor = Color.Orange, Text = "H.Center", Margin = new GuiThickness(2) }, Control = new GuiStackPanel() { BackgroundColor = Color.Red, Name = "H.Center", Orientation = GuiStackPanelOrientation.Horizontal, VerticalAlignment = GuiVerticalAlignment.Center, HorizontalAlignment = GuiHorizontalAlignment.Center, Childs = new List <GuiStackChild>() { new GuiStackChild() { Control = new GuiBox() { BackgroundColor = Color.Yellow, Width = 100, Height = 100 } }, new GuiStackChild() { Control = new GuiBox() { BackgroundColor = Color.Aquamarine, Width = 100, Height = 100 } }, new GuiStackChild() { Control = new GuiBox() { BackgroundColor = Color.Blue, Width = 100, Height = 100 } }, new GuiStackChild() { Control = new GuiBox() { BackgroundColor = Color.CadetBlue, Width = 100, Height = 100 } } } } } , new GuiTabControlChild() { Header = new GuiLabel() { BackgroundColor = Color.Orange, Text = "Height20", Margin = new GuiThickness(2) }, Control = new GuiStackPanel() { BackgroundColor = Color.Black, Childs = new List <GuiStackChild>() { new GuiStackChild() { Control = new GuiBox() { BackgroundColor = Color.Yellow, Height = 20 } }, new GuiStackChild() { Control = new GuiBox() { BackgroundColor = Color.Aquamarine, Height = 20 } }, new GuiStackChild() { Control = new GuiBox() { BackgroundColor = Color.Blue, Height = 20 } }, new GuiStackChild() { Control = new GuiBox() { BackgroundColor = Color.CadetBlue, Height = 20 } } } } }, new GuiTabControlChild() { Header = new GuiLabel() { BackgroundColor = Color.Orange, Text = "Width20", Margin = new GuiThickness(2) }, Control = new GuiStackPanel() { BackgroundColor = Color.Black, Childs = new List <GuiStackChild>() { new GuiStackChild() { Control = new GuiBox() { BackgroundColor = Color.Yellow, Width = 20 } }, new GuiStackChild() { Control = new GuiBox() { BackgroundColor = Color.Aquamarine, Width = 20 } }, new GuiStackChild() { Control = new GuiBox() { BackgroundColor = Color.Blue, Width = 20 } }, new GuiStackChild() { Control = new GuiBox() { BackgroundColor = Color.CadetBlue, Width = 20 } } } } }, new GuiTabControlChild() { Header = new GuiLabel() { BackgroundColor = Color.Orange, Text = "H.Alignment", Margin = new GuiThickness(2) }, Control = new GuiStackPanel() { BackgroundColor = Color.Black, Childs = new List <GuiStackChild>() { new GuiStackChild() { Control = new GuiBox() { BackgroundColor = Color.Yellow, Width = 25, Height = 25, HorizontalAlignment = GuiHorizontalAlignment.Right } }, new GuiStackChild() { Control = new GuiBox() { BackgroundColor = Color.Aquamarine, Width = 25, Height = 25, HorizontalAlignment = GuiHorizontalAlignment.Left } }, new GuiStackChild() { Control = new GuiBox() { BackgroundColor = Color.Blue, Width = 25, Height = 25, HorizontalAlignment = GuiHorizontalAlignment.Stretch } }, new GuiStackChild() { Control = new GuiBox() { BackgroundColor = Color.CadetBlue, Width = 25, Height = 25, HorizontalAlignment = GuiHorizontalAlignment.Center } } } } }, new GuiTabControlChild() { Header = new GuiLabel() { BackgroundColor = Color.Orange, Text = "Text", Margin = new GuiThickness(2) }, Control = new GuiStackPanel() { BackgroundColor = Color.White, Childs = new List <GuiStackChild>() { new GuiStackChild() { Control = new GuiLabel() { Width = 50, Text = "Text 1" } }, new GuiStackChild() { Control = new GuiLabel() { Text = "Text 2" } }, new GuiStackChild() { Control = new GuiLabel() { Text = "Text 3" } }, new GuiStackChild() { Control = new GuiPanel() { BackgroundColor = Color.Black, HorizontalAlignment = GuiHorizontalAlignment.Stretch, VerticalAlignment = GuiVerticalAlignment.Stretch, Content = new GuiLabel() { Text = "..." } } }, new GuiStackChild() { Control = new GuiLabel() { Text = "Text 4" } }, new GuiStackChild() { Control = new GuiLabel() { Text = "Text 5" } } } } }, new GuiTabControlChild() { Header = new GuiLabel() { BackgroundColor = Color.Orange, Text = "MY TEST", Margin = new GuiThickness(2) }, Control = new GuiStackPanel() { BackgroundColor = Color.DarkSlateGray, Childs = new List <GuiStackChild>() { new GuiStackChild() { Control = new GuiLabel() { Margin = new GuiThickness(1), BackgroundColor = Color.LightBlue, Text = "Line 1" } }, new GuiStackChild() { Control = new GuiLabel() { Margin = new GuiThickness(1), BackgroundColor = Color.AliceBlue, Text = "Line 2" } }, new GuiStackChild() { Control = new GuiDockPanel() { Margin = new GuiThickness(10), BackgroundColor = Color.Yellow, Childs = new List <GuiDockChild>() { new GuiDockChild() { Dock = GuiDock.Left, Control = new GuiLabel() { BackgroundColor = Color.Orange, Text = "Box A3", HorizontalAlignment = GuiHorizontalAlignment.Stretch } } } } }, new GuiStackChild() { Control = new GuiBox() { Margin = new GuiThickness(5), BackgroundColor = Color.Red, Width = 20, Height = 20 } }, new GuiStackChild() { Control = new GuiLabel() { Margin = new GuiThickness(1), BackgroundColor = Color.LightBlue, Text = "Line 3" } }, } } } }, }, } }, new GuiTabControlChild() { Header = new GuiLabel() { BackgroundColor = Color.Orange, Text = "Test", Margin = new GuiThickness(2) }, Control = new GuiTabControl() { Childs = new List <GuiTabControlChild>() { new GuiTabControlChild() { Header = new GuiLabel() { BackgroundColor = Color.Orange, Text = "Test", Margin = new GuiThickness(2) }, Control = new GuiDockPanel() { BackgroundColor = Color.Yellow, Margin = new GuiThickness(5), Childs = new List <GuiDockChild>() { new GuiDockChild() { Dock = GuiDock.Bottom, Control = new GuiLabel() { Text = "Box A3" } } } } }, new GuiTabControlChild() { Header = new GuiLabel() { BackgroundColor = Color.Orange, Text = "SP1", Margin = new GuiThickness(2) }, Control = new GuiStackPanel() { BackgroundColor = Color.Orange, Orientation = GuiStackPanelOrientation.Horizontal, VerticalAlignment = GuiVerticalAlignment.Center, HorizontalAlignment = GuiHorizontalAlignment.Center, Margin = new GuiThickness(5), Width = 200, Childs = new List <GuiStackChild>() { new GuiStackChild() { Control = new GuiBox() { BackgroundColor = Color.Yellow, Width = 50, Height = 50 } }, new GuiStackChild() { Control = new GuiBox() { BackgroundColor = Color.Aquamarine, Width = 50, Height = 50 } } } } }, new GuiTabControlChild() { Header = new GuiLabel() { BackgroundColor = Color.Orange, Text = "SP2", Margin = new GuiThickness(2) }, Control = new GuiStackPanel() { BackgroundColor = Color.Orange, Orientation = GuiStackPanelOrientation.Horizontal, VerticalAlignment = GuiVerticalAlignment.Center, HorizontalAlignment = GuiHorizontalAlignment.Center, Margin = new GuiThickness(5), Childs = new List <GuiStackChild>() { new GuiStackChild() { Control = new GuiBox() { BackgroundColor = Color.Yellow, Width = 50, Height = 50 } }, new GuiStackChild() { Control = new GuiBox() { BackgroundColor = Color.Aquamarine, Width = 50, Height = 50 } } } } }, new GuiTabControlChild() { Header = new GuiLabel() { BackgroundColor = Color.Orange, Text = "Border", Margin = new GuiThickness(2) }, Control = new GuiBorder() { BackgroundColor = Color.LightBlue, BorderColor = Color.Red, Border = new GuiThickness(20, 2, 20, 2), Margin = new GuiThickness(25), //Content = new GuiLabel(){ Text="In a border"} Content = new GuiPanel() { BackgroundColor = Color.Blue, Margin = new GuiThickness(5), Content = new GuiBorder() { Border = new GuiThickness(5), BorderColor = Color.Orange, Content = new GuiLabel() { Text = "In a panel" } } } } }, new GuiTabControlChild() { Header = new GuiLabel() { BackgroundColor = Color.Orange, Text = "Expandable", Margin = new GuiThickness(2) }, Control = new GuiStackPanel() { BackgroundColor = Color.GreenYellow, Childs = new List <GuiStackChild>() { new GuiStackChild() { Control = new GuiLabel() { Text = "Label first" } }, new GuiStackChild() { Control = new GuiExpandablePanel() { Title = new GuiDockChild() { Dock = GuiDock.Top, Control = new GuiLabel() { Text = "Expander 1" } }, BackgroundColor = Color.LightGreen, Border = new GuiBorder() { Border = new GuiThickness(2), BorderColor = Color.Black }, Content = new GuiLabel() { VerticalAlignment = GuiVerticalAlignment.Top, HorizontalAlignment = GuiHorizontalAlignment.Stretch, Text = "Inside an expandable panel", BackgroundColor = Color.Yellow } } }, new GuiStackChild() { Control = new GuiExpandablePanel() { Title = new GuiDockChild() { Dock = GuiDock.Top, Control = new GuiLabel() { Text = "Expander 2" } }, BackgroundColor = Color.LightGray, Border = new GuiBorder() { Border = new GuiThickness(2), BorderColor = Color.Black }, Content = new GuiLabel() { Text = "Inside an expandable panel", BackgroundColor = Color.Yellow } } }, new GuiStackChild() { Control = new GuiExpandablePanel() { Title = new GuiDockChild() { Dock = GuiDock.Top, Control = new GuiLabel() { Text = "Expander 3" } }, BackgroundColor = Color.LightGray, Border = new GuiBorder() { Border = new GuiThickness(2), BorderColor = Color.Black }, Content = new GuiBox() { BackgroundColor = Color.Yellow, Width = 100, Height = 100 } } } } } } } } }, } }; }