protected override void OnLoad(EventArgs e) { base.OnLoad(e); { m_DockControl = new Alt.GUI.Temporary.Gwen.Control.TabControl(this); m_DockControl.SetBounds(10, 10, 200, 200); { Alt.GUI.Temporary.Gwen.Control.TabButton button = m_DockControl.AddPage("Controls"); Alt.GUI.Temporary.Gwen.Control.Base page = button.Page; { Color rbColor = Color.Gray * 0.5; Alt.GUI.Temporary.Gwen.Control.RadioButtonGroup radio = new Alt.GUI.Temporary.Gwen.Control.RadioButtonGroup(page, "Tab position"); radio.TextColor = rbColor; radio.UseCurrentColorAsNormal = true; radio.SetPosition(10, 10); Alt.GUI.Temporary.Gwen.Control.LabeledRadioButton rb; rb = radio.AddOption("Top"); rb.Select(); rb.NormalTextColor = rbColor; rb = radio.AddOption("Bottom"); rb.NormalTextColor = rbColor; rb = radio.AddOption("Left"); rb.NormalTextColor = rbColor; rb = radio.AddOption("Right"); rb.NormalTextColor = rbColor; radio.SelectionChanged += OnDockChange; } } m_DockControl.AddPage("Red"); m_DockControl.AddPage("Green"); m_DockControl.AddPage("Blue"); } { Alt.GUI.Temporary.Gwen.Control.TabControl dragMe = new Alt.GUI.Temporary.Gwen.Control.TabControl(this); dragMe.SetBounds(220, 10, 200, 200); dragMe.AddPage("You"); dragMe.AddPage("Can"); dragMe.AddPage("Reorder").SetImage("AltData/Gwen/test16.png"); dragMe.AddPage("These"); dragMe.AddPage("Tabs"); dragMe.AllowReorder = true; } }
void CreateUI1() { m_MainSplitter = new Alt.GUI.Temporary.Gwen.Control.VerticalSplitter(this); m_MainSplitter.Dock = Pos.Fill; m_TabControl = new Alt.GUI.Temporary.Gwen.Control.TabControl(m_MainSplitter); m_TabControl.SetBounds(0, 0, 220, 200); m_TabControl.Dock = Pos.Right; m_MainSplitter.SetPanel(1, m_TabControl); m_MainSplitter.SetHValue(0.73f); // map Tab Alt.GUI.Temporary.Gwen.Control.TabButton button = m_TabControl.AddPage("map"); Base page = button.Page; { m_Page_map_ScrollControl = new ScrollControl(page); m_Page_map_ScrollControl.Dock = Pos.Fill; m_Page_map_ScrollControl.EnableScroll(false, true); m_Page_map_ScrollControl.AutoHideBars = true; m_Page_map_MainPanel = new Base(m_Page_map_ScrollControl); m_Page_map_MainPanel.SetBounds(0, 0, 100, 500); m_Page_map_MainPanel.Dock = Pos.Top; int btn_offset = 7; // coordinates m_Page_map_GroupBox_coordinates = new Alt.GUI.Temporary.Gwen.Control.GroupBox(m_Page_map_MainPanel); m_Page_map_GroupBox_coordinates.TextColor = LabelColor; m_Page_map_GroupBox_coordinates.Text = "coordinates"; m_Page_map_GroupBox_coordinates.Dock = Pos.Top; m_Page_map_GroupBox_coordinates.AutoSizeToContents = true; { // lat Alt.GUI.Temporary.Gwen.Control.Label label = new Alt.GUI.Temporary.Gwen.Control.Label(m_Page_map_GroupBox_coordinates); label.TextColor = LabelColor; label.AutoSizeToContents = true; label.Text = "lat:"; label.Dock = Pos.Top; // set top offset label.Margin = new Margin(0, 5, 0, 2); textBoxLat = new Alt.GUI.Temporary.Gwen.Control.TextBox(m_Page_map_GroupBox_coordinates); textBoxLat.ReadOnly = true; textBoxLat.Dock = Pos.Top; textBoxLat.Text = "54.6961334816182"; // lng label = new Alt.GUI.Temporary.Gwen.Control.Label(m_Page_map_GroupBox_coordinates); label.TextColor = LabelColor; label.AutoSizeToContents = true; label.Text = "lng:"; label.Dock = Pos.Top; label.Margin = new Margin(0, 0, 0, 2); textBoxLng = new Alt.GUI.Temporary.Gwen.Control.TextBox(m_Page_map_GroupBox_coordinates); textBoxLng.ReadOnly = true; textBoxLng.Dock = Pos.Top; textBoxLng.Text = "25.2985095977783"; // goto label = new Alt.GUI.Temporary.Gwen.Control.Label(m_Page_map_GroupBox_coordinates); label.TextColor = LabelColor; label.AutoSizeToContents = true; label.Text = "goto:"; label.Dock = Pos.Top; label.Margin = new Margin(0, 0, 0, 2); textBoxGeo = new Alt.GUI.Temporary.Gwen.Control.TextBox(m_Page_map_GroupBox_coordinates); textBoxGeo.ReadOnly = true; textBoxGeo.Dock = Pos.Top; textBoxGeo.Text = "lietuva vilnius"; // GoTo button8 = new Alt.GUI.Temporary.Gwen.Control.Button(m_Page_map_GroupBox_coordinates); button8.Text = "GoTo !"; button8.Dock = Pos.Top; // set top offset button8.Margin = new Margin(0, btn_offset, 0, 0); button8.Click += new EventHandler(button8_Click); // Reload button1 = new Alt.GUI.Temporary.Gwen.Control.Button(m_Page_map_GroupBox_coordinates); button1.Text = "Reload"; button1.Dock = Pos.Top; // set top offset button1.Margin = new Margin(0, btn_offset, 0, 0); button1.Click += new EventHandler(button1_Click); } // gmap m_Page_map_GroupBox_gmap = new Alt.GUI.Temporary.Gwen.Control.GroupBox(m_Page_map_MainPanel); m_Page_map_GroupBox_gmap.TextColor = LabelColor; m_Page_map_GroupBox_gmap.Text = "gmap"; m_Page_map_GroupBox_gmap.Dock = Pos.Top; m_Page_map_GroupBox_gmap.AutoSizeToContents = true; // set top offset m_Page_map_GroupBox_gmap.Margin = new Margin(0, 10, 0, 0); { // type Alt.GUI.Temporary.Gwen.Control.Label label = new Alt.GUI.Temporary.Gwen.Control.Label(m_Page_map_GroupBox_gmap); label.TextColor = LabelColor; label.AutoSizeToContents = true; label.Text = "type:"; label.Dock = Pos.Top; // set top offset label.Margin = new Margin(0, 5, 0, 0); comboBoxMapType = new Alt.GUI.Temporary.Gwen.Control.ComboBox(m_Page_map_GroupBox_gmap); comboBoxMapType.Dock = Pos.Top; // mode label = new Alt.GUI.Temporary.Gwen.Control.Label(m_Page_map_GroupBox_gmap); label.TextColor = LabelColor; label.AutoSizeToContents = true; label.Text = "mode:"; label.Dock = Pos.Top; comboBoxMode = new Alt.GUI.Temporary.Gwen.Control.ComboBox(m_Page_map_GroupBox_gmap); comboBoxMode.Dock = Pos.Top; #if UNITY_WEBPLAYER || UNITY_5 comboBoxMode.Disable(); #endif // Current Marker checkBoxCurrentMarker = new Alt.GUI.Temporary.Gwen.Control.LabeledCheckBox(m_Page_map_GroupBox_gmap); checkBoxCurrentMarker.TextColor = LabelColor; checkBoxCurrentMarker.UseCurrentColorAsNormal = true; checkBoxCurrentMarker.Text = "Current Marker"; checkBoxCurrentMarker.Dock = Pos.Top; // set top offset checkBoxCurrentMarker.Margin = new Margin(0, btn_offset, 0, 0); checkBoxCurrentMarker.CheckedChanged += new EventHandler(checkBoxCurrentMarker_CheckedChanged); // Grid checkBoxDebug = new Alt.GUI.Temporary.Gwen.Control.LabeledCheckBox(m_Page_map_GroupBox_gmap); checkBoxDebug.TextColor = LabelColor; checkBoxDebug.UseCurrentColorAsNormal = true; checkBoxDebug.Text = "Grid"; checkBoxDebug.Dock = Pos.Top; // set top offset checkBoxDebug.Margin = new Margin(0, btn_offset, 0, 0); checkBoxDebug.CheckedChanged += new EventHandler(checkBoxDebug_CheckedChanged); // Drag Map checkBoxCanDrag = new Alt.GUI.Temporary.Gwen.Control.LabeledCheckBox(m_Page_map_GroupBox_gmap); checkBoxCanDrag.TextColor = LabelColor; checkBoxCanDrag.UseCurrentColorAsNormal = true; checkBoxCanDrag.Text = "Drag Map (right mouse button)"; checkBoxCanDrag.Dock = Pos.Top; // set top offset checkBoxCanDrag.Margin = new Margin(0, btn_offset, 0, 0); checkBoxCanDrag.CheckedChanged += new EventHandler(checkBoxCanDrag_CheckedChanged); } // routing m_Page_map_GroupBox_routing = new Alt.GUI.Temporary.Gwen.Control.GroupBox(m_Page_map_MainPanel); m_Page_map_GroupBox_routing.TextColor = LabelColor; m_Page_map_GroupBox_routing.Text = "routing"; m_Page_map_GroupBox_routing.Dock = Pos.Top; m_Page_map_GroupBox_routing.AutoSizeToContents = true; // set top offset m_Page_map_GroupBox_routing.Margin = new Margin(0, 10, 0, 0); { // set Start buttonSetStart = new Alt.GUI.Temporary.Gwen.Control.Button(m_Page_map_GroupBox_routing); buttonSetStart.Text = "set Start"; buttonSetStart.Dock = Pos.Top; // set top offset buttonSetStart.Margin = new Margin(0, 7, 0, 0); buttonSetStart.Click += new EventHandler(buttonSetStart_Click); // set End buttonSetEnd = new Alt.GUI.Temporary.Gwen.Control.Button(m_Page_map_GroupBox_routing); buttonSetEnd.Text = "set End"; buttonSetEnd.Dock = Pos.Top; // set top offset buttonSetEnd.Margin = new Margin(0, btn_offset, 0, 0); buttonSetEnd.Click += new EventHandler(buttonSetEnd_Click); // Add Route button3 = new Alt.GUI.Temporary.Gwen.Control.Button(m_Page_map_GroupBox_routing); button3.Text = "Add Route"; button3.Dock = Pos.Top; // set top offset button3.Margin = new Margin(0, btn_offset, 0, 10); button3.Click += new EventHandler(button3_Click); // Clear Routes button6 = new Alt.GUI.Temporary.Gwen.Control.Button(m_Page_map_GroupBox_routing); button6.Text = "Clear Routes"; button6.Dock = Pos.Top; // set top offset button6.Margin = new Margin(0, btn_offset, 0, 0); button6.Click += new EventHandler(button6_Click); // Clear Polygons button15 = new Alt.GUI.Temporary.Gwen.Control.Button(m_Page_map_GroupBox_routing); button15.Text = "Clear Polygons"; button15.Dock = Pos.Top; // set top offset button15.Margin = new Margin(0, btn_offset, 0, 0); button15.Click += new EventHandler(button15_Click); } // markers m_Page_map_GroupBox_markers = new Alt.GUI.Temporary.Gwen.Control.GroupBox(m_Page_map_MainPanel); m_Page_map_GroupBox_markers.TextColor = LabelColor; m_Page_map_GroupBox_markers.Text = "markers"; m_Page_map_GroupBox_markers.Dock = Pos.Top; m_Page_map_GroupBox_markers.AutoSizeToContents = true; // set top offset m_Page_map_GroupBox_markers.Margin = new Margin(0, 10, 0, 0); { // Add Marker button4 = new Alt.GUI.Temporary.Gwen.Control.Button(m_Page_map_GroupBox_markers); button4.Text = "Add Marker"; button4.Dock = Pos.Top; // set top offset button4.Margin = new Margin(0, 7, 0, 0); button4.Click += new EventHandler(button4_Click); // place info checkBoxPlacemarkInfo = new Alt.GUI.Temporary.Gwen.Control.LabeledCheckBox(m_Page_map_GroupBox_markers); checkBoxPlacemarkInfo.TextColor = LabelColor; checkBoxPlacemarkInfo.UseCurrentColorAsNormal = true; checkBoxPlacemarkInfo.Text = "place info"; checkBoxPlacemarkInfo.Dock = Pos.Top; // set top offset checkBoxPlacemarkInfo.Margin = new Margin(0, btn_offset, 0, 0); checkBoxPlacemarkInfo.IsChecked = true; // Zoom Center button7 = new Alt.GUI.Temporary.Gwen.Control.Button(m_Page_map_GroupBox_markers); button7.Text = "Zoom Center"; button7.Dock = Pos.Top; // set top offset button7.Margin = new Margin(0, btn_offset, 0, 0); button7.Click += new EventHandler(button7_Click); // Clear All button5 = new Alt.GUI.Temporary.Gwen.Control.Button(m_Page_map_GroupBox_markers); button5.Text = "Clear All"; button5.Dock = Pos.Top; // set top offset button5.Margin = new Margin(0, btn_offset, 0, 0); button5.Click += new EventHandler(button5_Click); } } }