public PlayerView(Sidebar sidebar, Control parent, int Left, int Top) : base(sidebar, parent, Left, Top, false) { playerGroup = sidebar.room.groups.player; btnEditAllPlayers = new Button(manager); btnEditAllPlayers.Init(); btnEditAllPlayers.Parent = parent; btnEditAllPlayers.Text = "Edit All Players"; btnEditAllPlayers.Width = 150; btnEditAllPlayers.Left = parent.Width / 2 - btnEditAllPlayers.Width / 2; btnEditAllPlayers.Top = Top + VertPadding * 2; HeightCounter += btnEditAllPlayers.Height * 2; btnEditAllPlayers.Click += (s, e) => { editGroupWindow = new EditNodeWindow(sidebar, "All Players", room.groups.player.Name, ViewType.Group); editGroupWindow.componentView.SwitchGroup(room.groups.player); //editGroupWindow.componentView.SwitchNode(n, false); }; lblPlayers = new Label(manager); lblPlayers.Init(); lblPlayers.Parent = parent; lblPlayers.Text = "Players"; lblPlayers.Width = 150; lblPlayers.Left = LeftPadding; lblPlayers.TextColor = Color.Black; lblPlayers.Top = HeightCounter; HeightCounter += lblPlayers.Height + VertPadding; Width = parent.Width - LeftPadding * 4; base.Initialize(); insView = new InspectorView(sidebar, parent, Left, HeightCounter); insView.GroupSync = true; insView.Height = 120; insView.Width = Width; this.ItemCreator += ItemCreatorDelegate; InitializePlayers(); }
public GamemodeWindow(Sidebar sidebar) { this.manager = sidebar.manager; this.sidebar = sidebar; window = new Window(manager); window.Init(); window.Left = sidebar.master.Left; window.Width = sidebar.master.Width; window.Top = 0; window.Height = 600; window.Text = "Game Mode"; manager.Add(window); TitlePanel titlePanel = new TitlePanel(sidebar, window, "Game Mode", true); titlePanel.btnBack.Click += (s, e) => window.Close(); HeightCounter += titlePanel.topPanel.Height + LeftPadding * 2; lblMode = new Label(manager); lblMode.Init(); lblMode.Parent = window; lblMode.Top = HeightCounter; lblMode.Left = LeftPadding; lblMode.Text = "Game Mode Options"; lblMode.Width = 120; lblMode.TextColor = Color.Black; //cbMode = new ComboBox(manager); //cbMode.Init(); //cbMode.Parent = window; //cbMode.Left = lblMode.Left + lblMode.Width; //cbMode.Top = HeightCounter; //cbMode.Width = 100; // //foreach (GameModes m in Enum.GetValues(typeof(GameModes))) //{ // cbMode.Items.Add(m); //} HeightCounter += lblMode.Height + LeftPadding * 3; insViewModes = new InspectorView(sidebar, window, LeftPadding, HeightCounter); insViewModes.Width -= 20; insViewModes.Height -= 100; HeightCounter += insViewModes.Height + LeftPadding * 3; insViewModes.SetRootObject(OrbIt.globalGameMode); //insViewGlobal = new InspectorView(sidebar, window, LeftPadding, HeightCounter); //insViewGlobal.Width -= 20; //insViewGlobal.Height -= 100; window.Refresh(); }
public void InitializeProcessesPage() { tbcViews.AddPage(); TabPage processTab = tbcViews.TabPages[3]; processTab.Text = "Processes"; tbcViews.SelectedIndex = 3; activeTabControl = tbcViews; TitlePanel titlePanelProcesses = new TitlePanel(this, processTab, "Processes", false); processesView = new NormalView(this, processTab, 0, titlePanelProcesses.Height, Height: 150); processInsView = new InspectorView(this, processTab, 0, processesView.Top + processesView.Height + 20, Height: 150); processesView.OnSelectionChanged += processesView_OnSelectionChanged; tbcViews.SelectedIndex = 0; }
public ComponentView(Sidebar sidebar, Control parent, int Left, int Top, ViewType viewType) : base(sidebar, parent, Left, Top, false) { this.parent = parent; lblComponents = new Label(manager); lblComponents.Init(); lblComponents.Parent = parent; lblComponents.Text = "Components"; lblComponents.Width = 150; lblComponents.Left = LeftPadding; lblComponents.TextColor = Color.Black; lblComponents.Top = HeightCounter; HeightCounter += lblComponents.Height + VertPadding; base.Initialize(); btnAddComponent = new Button(manager); btnAddComponent.Init(); btnAddComponent.Width = 150; btnAddComponent.Left = Left + LeftPadding + (Width - btnAddComponent.Width) / 2; btnAddComponent.Top = HeightCounter; btnAddComponent.Parent = parent; btnAddComponent.Text = "Add Component"; btnAddComponent.Click += btnAddComponent_Click; HeightCounter += btnAddComponent.Height + VertPadding; bottomArea = new TabControl(manager); bottomArea.Init(); bottomArea.Parent = parent; bottomArea.Left = 0; bottomArea.Top = HeightCounter; bottomArea.Width = sidebar.Width - 5; bottomArea.Height = 500; bottomArea.AddPage(); bottomArea.TabPages[0].Text = "Edit"; TabPage editTab = bottomArea.TabPages[0]; editTab.Margins = new Margins(0, 0, 0, 0); lblCurrentComp = new Label(manager); lblCurrentComp.Init(); lblCurrentComp.Parent = editTab; lblCurrentComp.Width = 150; lblCurrentComp.Top = 5; lblCurrentComp.Left = LeftPadding; lblCurrentComp.Text = ""; lblCurrentComp.TextColor = Color.Black; insView = new InspectorView(sidebar, editTab, Left, lblComponents.Height + 10); insView.GroupSync = true; insView.Height = 140; OnItemEvent += OnEvent2; editTab.Margins = new Margins(0, 0, 0, 0); bottomArea.AddPage(); bottomArea.TabPages[1].Text = "Preview"; TabPage previewTab = bottomArea.TabPages[1]; previewTab.Margins = new Margins(0, 0, 0, 0); bottomArea.Height = insView.Height + 140; this.viewType = viewType; }