private void CreateReflectionOptions() { _reflectionArea = new SideBarPanel(ControlManager.Manager) { Passive = true, Parent = _sideBar, Left = 16, Top = ToolOptionsY, Height = 56, CanFocus = false }; _reflectionArea.Width = _sideBar.Width - _reflectionArea.Left; _reflectionArea.Init(); _reflectionArea.Parent = _sideBar; var editButton = new Button(ControlManager.Manager) { Text = "Edit Node Logic", Left = 16, Top = 16, Width = _reflectionArea.Width - 32 }; editButton.Init(); editButton.Parent = _reflectionArea; editButton.Click += (sender, args) => EditNode(GetCurrentlySelectedNode()); }
private void InitSkins() { pnlSkin = new SideBarPanel(Manager); pnlSkin.Init(); pnlSkin.Passive = true; pnlSkin.Parent = sidebar; pnlSkin.Left = 16; pnlSkin.Width = sidebar.Width - pnlRes.Left; pnlSkin.Height = 60; pnlSkin.Top = ClientHeight - 16 - pnlStats.Height - pnlSkin.Height - 16; pnlSkin.Anchor = EAnchors.Left | EAnchors.Bottom; pnlSkin.CanFocus = false; rdbDefault = new RadioButton(Manager); rdbDefault.Init(); rdbDefault.Parent = pnlSkin; rdbDefault.Left = 8; rdbDefault.Width = pnlSkin.Width - rdbDefault.Left * 2; rdbDefault.Height = 16; rdbDefault.Text = "Default Skin"; rdbDefault.Top = 8; rdbDefault.Checked = Manager.Skin.Name == "Default"; rdbDefault.Click += new Controls.EventHandler(rdbDefault_Click); rdbGreen = new RadioButton(Manager); rdbGreen.Init(); rdbGreen.Parent = pnlSkin; rdbGreen.Left = 8; rdbGreen.Width = pnlSkin.Width - rdbGreen.Left * 2; rdbGreen.Height = 16; rdbGreen.Text = "Green Skin"; rdbGreen.Top = 24; rdbGreen.Checked = Manager.Skin.Name == "Green"; rdbGreen.Click += new Controls.EventHandler(rdbGreen_Click); rdbGreen.Enabled = true; rdbRed = new RadioButton(Manager); rdbRed.Init(); rdbRed.Parent = pnlSkin; rdbRed.Left = 8; rdbRed.Width = pnlSkin.Width - rdbGreen.Left * 2; rdbRed.Height = 16; rdbRed.Text = "Red Skin"; rdbRed.Top = 40; rdbRed.Checked = Manager.Skin.Name == "Red"; rdbRed.Click += new Controls.EventHandler(rdbRed_Click); rdbRed.Enabled = true; }
private void InitTasks() { pnlTasks = new SideBarPanel(Manager); pnlTasks.Init(); pnlTasks.Passive = true; pnlTasks.Parent = sidebar; pnlTasks.Left = 16; pnlTasks.Width = sidebar.Width - pnlRes.Left; pnlTasks.Height = (TasksCount * 25) + 16; pnlTasks.Top = btnApply.Top + btnApply.Height + 16; pnlTasks.CanFocus = false; btnTasks = new Button[TasksCount]; for (var i = 0; i < TasksCount; i++) { btnTasks[i] = new Button(Manager); btnTasks[i].Init(); btnTasks[i].Parent = pnlTasks; btnTasks[i].Left = 8; btnTasks[i].Top = 8 + i * (btnTasks[i].Height + 1); btnTasks[i].Width = -8 + btnApply.Width * 2; btnTasks[i].Click += btnTask_Click; btnTasks[i].Text = "Task [" + i + "]"; if (Tasks.Length >= i - 1 && Tasks[i] != "") { btnTasks[i].Text = Tasks[i]; } } btnRandom = new Button(Manager); btnRandom.Init(); btnRandom.Parent = sidebar; btnRandom.Width = 80; btnRandom.Left = 16; btnRandom.Top = pnlTasks.Top + pnlTasks.Height + 8; btnRandom.Text = "Random"; btnRandom.Click += btnRandom_Click; btnClose = new Button(Manager); btnClose.Init(); btnClose.Width = 80; btnClose.Parent = sidebar; btnClose.Left = btnRandom.Left + btnRandom.Width + 8; btnClose.Top = pnlTasks.Top + pnlTasks.Height + 8; ; btnClose.Text = "Close"; btnClose.Click += btnClose_Click; }
private void InitStats() { pnlStats = new SideBarPanel(Manager); pnlStats.Init(); pnlStats.Passive = true; pnlStats.Parent = sidebar; pnlStats.Left = 16; pnlStats.Width = sidebar.Width - pnlStats.Left; pnlStats.Height = 64; pnlStats.Top = ClientHeight - 16 - pnlStats.Height; pnlStats.Anchor = Anchors.Left | Anchors.Bottom; pnlStats.CanFocus = false; lblObjects = new Label(Manager); lblObjects.Init(); lblObjects.Parent = pnlStats; lblObjects.Left = 8; lblObjects.Top = 8; lblObjects.Height = 16; lblObjects.Width = pnlStats.Width - lblObjects.Left * 2; ; lblObjects.Alignment = Alignment.MiddleLeft; lblAvgFps = new Label(Manager); lblAvgFps.Init(); lblAvgFps.Parent = pnlStats; lblAvgFps.Left = 8; lblAvgFps.Top = 24; lblAvgFps.Height = 16; lblAvgFps.Width = pnlStats.Width - lblObjects.Left * 2; lblAvgFps.Alignment = Alignment.MiddleLeft; lblFps = new Label(Manager); lblFps.Init(); lblFps.Parent = pnlStats; lblFps.Left = 8; lblFps.Top = 40; lblFps.Height = 16; lblFps.Width = pnlStats.Width - lblObjects.Left * 2; lblFps.Alignment = Alignment.MiddleLeft; }
//////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////// private void InitRes() { pnlRes = new SideBarPanel(Manager); pnlRes.Init(); pnlRes.Passive = true; pnlRes.Parent = sidebar; pnlRes.Left = 16; pnlRes.Top = 16; pnlRes.Width = sidebar.Width - pnlRes.Left; pnlRes.Height = 86; pnlRes.CanFocus = false; rdbRes1024 = new RadioButton(Manager); rdbRes1024.Init(); rdbRes1024.Parent = pnlRes; rdbRes1024.Left = 8; rdbRes1024.Width = pnlRes.Width - rdbRes1024.Left * 2; rdbRes1024.Height = 16; rdbRes1024.Text = "Resolution 1024x768"; rdbRes1024.Top = 8; rdbRes1024.Checked = true; rdbRes1280 = new RadioButton(Manager); rdbRes1280.Init(); rdbRes1280.Parent = pnlRes; rdbRes1280.Left = rdbRes1024.Left; rdbRes1280.Width = rdbRes1024.Width; rdbRes1280.Height = rdbRes1024.Height; rdbRes1280.Text = "Resolution 1280x1024"; rdbRes1280.Top = 24; rdbRes1680 = new RadioButton(Manager); rdbRes1680.Init(); rdbRes1680.Parent = pnlRes; rdbRes1680.Left = rdbRes1024.Left; rdbRes1680.Width = rdbRes1024.Width; rdbRes1680.Height = rdbRes1024.Height; rdbRes1680.Text = "Resolution 1680x1050"; rdbRes1680.Top = 40; chkResFull = new CheckBox(Manager); chkResFull.Parent = pnlRes; chkResFull.Init(); chkResFull.Left = rdbRes1024.Left; chkResFull.Width = rdbRes1024.Width; chkResFull.Height = rdbRes1024.Height; chkResFull.Text = "Fullscreen Mode"; chkResFull.Top = 64; btnApply = new Button(Manager); btnApply.Init(); btnApply.Width = 80; btnApply.Parent = sidebar; btnApply.Left = pnlRes.Left; btnApply.Top = pnlRes.Top + pnlRes.Height + 8; btnApply.Text = "Apply"; btnApply.Click += new Controls.EventHandler(btnApply_Click); btnExit = new Button(Manager); btnExit.Init(); btnExit.Width = 80; btnExit.Parent = sidebar; btnExit.Left = btnApply.Left + btnApply.Width + 8; btnExit.Top = pnlRes.Top + pnlRes.Height + 8; btnExit.Text = "Exit"; btnExit.Click += new Controls.EventHandler(btnExit_Click); }
private void InitRes() { pnlRes = new SideBarPanel(Manager); pnlRes.Init(); pnlRes.Passive = true; pnlRes.Parent = sidebar; pnlRes.Left = 16; pnlRes.Top = 16; pnlRes.Width = sidebar.Width - pnlRes.Left; pnlRes.Height = 86; pnlRes.CanFocus = false; rdbRes1024 = new RadioButton(Manager); rdbRes1024.Init(); rdbRes1024.Parent = pnlRes; rdbRes1024.Left = 8; rdbRes1024.Width = pnlRes.Width - rdbRes1024.Left * 2; rdbRes1024.Height = 16; rdbRes1024.Text = "Resolution 1024x768"; rdbRes1024.Top = 8; rdbRes1024.Checked = true; rdbRes1280 = new RadioButton(Manager); rdbRes1280.Init(); rdbRes1280.Parent = pnlRes; rdbRes1280.Left = rdbRes1024.Left; rdbRes1280.Width = rdbRes1024.Width; rdbRes1280.Height = rdbRes1024.Height; rdbRes1280.Text = "Resolution 1280x1024"; rdbRes1280.Top = 24; rdbRes1680 = new RadioButton(Manager); rdbRes1680.Init(); rdbRes1680.Parent = pnlRes; rdbRes1680.Left = rdbRes1024.Left; rdbRes1680.Width = rdbRes1024.Width; rdbRes1680.Height = rdbRes1024.Height; rdbRes1680.Text = "Resolution 1680x1050"; rdbRes1680.Top = 40; chkResFull = new CheckBox(Manager); chkResFull.Parent = pnlRes; chkResFull.Init(); chkResFull.Left = rdbRes1024.Left; chkResFull.Width = rdbRes1024.Width; chkResFull.Height = rdbRes1024.Height; chkResFull.Text = "Fullscreen Mode"; chkResFull.Top = 64; btnApply = new Button(Manager); btnApply.Init(); btnApply.Width = 80; btnApply.Parent = sidebar; btnApply.Left = pnlRes.Left; btnApply.Top = pnlRes.Top + pnlRes.Height + 8; btnApply.Text = "Apply"; btnApply.Click += new Controls.EventHandler(btnApply_Click); btnExit = new Button(Manager); btnExit.Init(); btnExit.Width = 80; btnExit.Parent = sidebar; btnExit.Left = btnApply.Left + btnApply.Width + 8; btnExit.Top = pnlRes.Top + pnlRes.Height + 8; btnExit.Text = "Exit"; btnExit.Click += new Controls.EventHandler(btnExit_Click); }
private void InitStats() { pnlStats = new SideBarPanel(Manager); pnlStats.Init(); pnlStats.Passive = true; pnlStats.Parent = sidebar; pnlStats.Left = 16; pnlStats.Width = sidebar.Width - pnlStats.Left; pnlStats.Height = 64; pnlStats.Top = ClientHeight - 16 - pnlStats.Height; pnlStats.Anchor = EAnchors.Left | EAnchors.Bottom; pnlStats.CanFocus = false; lblObjects = new Label(Manager); lblObjects.Init(); lblObjects.Parent = pnlStats; lblObjects.Left = 8; lblObjects.Top = 8; lblObjects.Height = 16; lblObjects.Width = pnlStats.Width - lblObjects.Left * 2; ; lblObjects.Alignment = EAlignment.MiddleLeft; lblAvgFps = new Label(Manager); lblAvgFps.Init(); lblAvgFps.Parent = pnlStats; lblAvgFps.Left = 8; lblAvgFps.Top = 24; lblAvgFps.Height = 16; lblAvgFps.Width = pnlStats.Width - lblObjects.Left * 2; lblAvgFps.Alignment = EAlignment.MiddleLeft; lblFps = new Label(Manager); lblFps.Init(); lblFps.Parent = pnlStats; lblFps.Left = 8; lblFps.Top = 40; lblFps.Height = 16; lblFps.Width = pnlStats.Width - lblObjects.Left * 2; lblFps.Alignment = EAlignment.MiddleLeft; }
private void InitSkins() { pnlSkin = new SideBarPanel(Manager); pnlSkin.Init(); pnlSkin.Passive = true; pnlSkin.Parent = sidebar; pnlSkin.Left = 16; pnlSkin.Width = sidebar.Width - pnlRes.Left; pnlSkin.Height = 60; pnlSkin.Top = ClientHeight - 16 - pnlStats.Height - pnlSkin.Height - 16; pnlSkin.Anchor = EAnchors.Left | EAnchors.Bottom; pnlSkin.CanFocus = false; rdbDefault = new RadioButton(Manager); rdbDefault.Init(); rdbDefault.Parent = pnlSkin; rdbDefault.Left = 8; rdbDefault.Width = pnlSkin.Width - rdbDefault.Left * 2; rdbDefault.Height = 16; rdbDefault.Text = "Default Skin"; rdbDefault.Top = 8; rdbDefault.Checked = Manager.Skin.Name == "Default"; rdbDefault.Click += new Controls.EventHandler(rdbDefault_Click); rdbGreen = new RadioButton(Manager); rdbGreen.Init(); rdbGreen.Parent = pnlSkin; rdbGreen.Left = 8; rdbGreen.Width = pnlSkin.Width - rdbGreen.Left * 2; rdbGreen.Height = 16; rdbGreen.Text = "Green Skin"; rdbGreen.Top = 24; rdbGreen.Checked = Manager.Skin.Name == "Green"; rdbGreen.Click += new Controls.EventHandler(rdbGreen_Click); rdbGreen.Enabled = true; rdbRed = new RadioButton(Manager); rdbRed.Init(); rdbRed.Parent = pnlSkin; rdbRed.Left = 8; rdbRed.Width = pnlSkin.Width - rdbGreen.Left * 2; rdbRed.Height = 16; rdbRed.Text = "Red Skin"; rdbRed.Top = 40; rdbRed.Checked = Manager.Skin.Name == "Red"; rdbRed.Click += new Controls.EventHandler(rdbRed_Click); rdbRed.Enabled = true; }
private void InitTasks() { pnlTasks = new SideBarPanel(Manager); pnlTasks.Init(); pnlTasks.Passive = true; pnlTasks.Parent = sidebar; pnlTasks.Left = 16; pnlTasks.Width = sidebar.Width - pnlRes.Left; pnlTasks.Height = (TasksCount * 25) + 16; pnlTasks.Top = btnApply.Top + btnApply.Height + 16; pnlTasks.CanFocus = false; btnTasks = new Button[TasksCount]; for (int i = 0; i < TasksCount; i++) { btnTasks[i] = new Button(Manager); btnTasks[i].Init(); btnTasks[i].Parent = pnlTasks; btnTasks[i].Left = 8; btnTasks[i].Top = 8 + i * (btnTasks[i].Height + 1); btnTasks[i].Width = -8 + btnApply.Width * 2; btnTasks[i].Click += new GodLesZ.Library.XNA.WindowLibrary.Controls.EventHandler(btnTask_Click); btnTasks[i].Text = "Task [" + i.ToString() + "]"; if (Tasks.Length >= i - 1 && Tasks[i] != "") btnTasks[i].Text = Tasks[i]; } btnRandom = new Button(Manager); btnRandom.Init(); btnRandom.Parent = sidebar; btnRandom.Width = 80; btnRandom.Left = 16; btnRandom.Top = pnlTasks.Top + pnlTasks.Height + 8; btnRandom.Text = "Random"; btnRandom.Click += new Controls.EventHandler(btnRandom_Click); btnClose = new Button(Manager); btnClose.Init(); btnClose.Width = 80; btnClose.Parent = sidebar; btnClose.Left = btnRandom.Left + btnRandom.Width + 8; btnClose.Top = pnlTasks.Top + pnlTasks.Height + 8; ; btnClose.Text = "Close"; btnClose.Click += new Controls.EventHandler(btnClose_Click); }