public override void CreateControls(GUI gui) { listsPanel = new FloatPanel(new Vector2(300, 200), "ENTITIES", false, false); listsPanel.Pos.X = 0; listsPanel.Pos.Y = 22; listsPanel.Visible = false; gui.AddChild(listsPanel); groupsList = new ListBox(new Vector2(120, listsPanel.Size.Y - 24), 1, groupItemSelected); groupsList.Pos.X = 2; groupsList.Pos.Y = 2; listsPanel.AddChild(groupsList); entitiesList = new ListBox(new Vector2(174, listsPanel.Size.Y - 24), 1, entityItemSelected); entitiesList.Pos.X = 124; entitiesList.Pos.Y = 2; listsPanel.AddChild(entitiesList); newEntityDropDown = new DropDown(addEntityDropDownItemSelected); newEntityDropDown.Pos.X = listsPanel.Size.X - 20; listsPanel.AddChild(newEntityDropDown); newEntityDropDown.AddItem("New Checkpoint", 1); newEntityDropDown.AddItem("New Trigger", 1); newEntityDropDown.AddItem("New Recovery Truck", 1); newEntityDropDown.AddItem("New Cone", 1); newEntityDropDown.AddItem("New Explosion", 1); newEntityDropDown.AddItem("New Steam", 1); newEntityDropDown.AddItem("New Fuel Item", 1); newEntityDropDown.AddItem("New Shield Item", 1); newEntityDropDown.AddItem("New Ammo Item", 1); newEntityDropDown.AddItem("New Minigun Item", 1); newEntityDropDown.AddItem("New Missile Item", 1); newEntityDropDown.AddItem("New Booster Item", 1); layout(); }
public override void CreateControls(GUI gui) { /* * selectionPanel = new FloatPanel(new Vector2(300, 200), "DEFINITIONS", false, false); * selectionPanel.Pos.X = 0; * selectionPanel.Pos.Y = 22; * selectionPanel.Visible = false; * gui.AddChild(selectionPanel); * * columnsList = new ListBox(new Vector2(120, selectionPanel.Size.Y - 24), 1, columnItemSelected); * columnsList.Pos.X = 2; * columnsList.Pos.Y = 2; * selectionPanel.AddChild(columnsList); * * blocksList = new ListBox(new Vector2(120, selectionPanel.Size.Y - 24), 1, blockItemSelected); * blocksList.Pos.X = 124; * blocksList.Pos.Y = 2; * selectionPanel.AddChild(blocksList); */ editPanel = new FloatPanel(new Vector2(400, 400), "COLUMN CONFIGURATION", false, false); editPanel.MouseEnabled = false; editPanel.Pos.Y = gui.Size.Y - editPanel.Size.Y - 100; editPanel.Visible = false; gui.AddChild(editPanel); emptyBlockTopBitmap = new Bitmap(Config.DATA_FOLDER + "gui/images/isoCubeTop.png"); emptyBlockBottomBitmap = new Bitmap(Config.DATA_FOLDER + "gui/images/isoCubeBottom.png"); blockButtons = new ImageButton[16]; for (int i = 0; i < 8; i++) { TextureResource tex = new TextureResource("blockButtonTextureT-" + i, emptyBlockTopBitmap); ImageButton btn = new ImageButton(new Vector2(64, 64), tex, null, blockButtonClicked); btn.Tag = i; btn.Pos.X = 30; btn.Pos.Y = 30 + 40 * i; editPanel.AddChild(btn); blockButtons[i * 2] = btn; tex = new TextureResource("blockButtonTextureB-" + i, emptyBlockBottomBitmap); btn = new ImageButton(new Vector2(64, 64), tex, null, blockButtonClicked); btn.Tag = i; btn.Pos.X = editPanel.Size.X - btn.Size.X - 30; btn.Pos.Y = 30 + 40 * i; editPanel.AddChild(btn, 0); blockButtons[i * 2 + 1] = btn; } columnInfo = new Label(new Vector2(200, 14), 9); columnInfo.Pos.X = 120; columnInfo.Pos.Y = editPanel.Size.Y - 70; editPanel.AddChild(columnInfo); editPanelClose = new Button(new Vector2(100, 22), "DONE", null, closeEditPanel); editPanelClose.BorderSize = 1; editPanelClose.Pos.X = (float)Math.Floor(0.5f * (editPanel.Size.X - editPanelClose.Size.X)); editPanelClose.Pos.Y = 50; editPanel.AddChild(editPanelClose); }