public StatusWindow(WindowManager WM, GameObject.MapEntities.Actors.Player Player) { this.Player = Player; this.WM = WM; this.Width = 360; this.Height = 500; this.Title = "Status"; this.OKButton = new GUI.Controls.Button("Make something!"); this.OKButton.Clicked += OKButton_Clicked; this.OKButton.Width = 128; this.OKButton.Height = 48; this.OKButton.X = 64; this.OKButton.Y = 49; this.AddControl(this.OKButton); this.slot = new ItemSlot(null); this.slot.X = 0; this.slot.Y = 49; this.Controls.Add(this.slot); this.HPBar = new GUI.Controls.ProgressBar { DisplayLabel = true, Style = 0, Height = 16, Width = 192, Colour = new Color(255, 0, 80), X = 3, Y = 3 }; this.AddControl(HPBar); this.MPBar = new GUI.Controls.ProgressBar { DisplayLabel = true, Style = 0, Height = 16, Width = 192, Colour = new Color(25, 150, 255), X = 3, Y = 21 }; this.AddControl(MPBar); this.EXPBar = new GUI.Controls.ProgressBar { DisplayLabel = true, Style = 0, Height = 24, Width = 192, Colour = new Color(200, 100, 255), X = 3, Y = 39 }; this.AddControl(EXPBar); // this.AddControl(Texst); }
public ShopWindow(NPCShop shop, GameObject.MapEntities.Actors.Player Player) { this.Width = 360; this.Height = 420; this.shop = shop; this.WM = Main.CurrentScene.WindowManager; this._basket = new List <Tuple <GameObject.Item, int> >(); this._basketslots = new ItemSlot[8]; this.Player = Player; SetupWares(); SetupBasket(); GUI.Controls.Button BuyButton = new GUI.Controls.Button("Purchase"); BuyButton.Width = 150; BuyButton.Height = 32; BuyButton.X = 3; BuyButton.Y = (ShopHeight + 1) * _basketslots[0].Height + 30 + 16 + TotalLabel.Height + 5; BuyButton.OnClick += new ClickEventHandler((sender, m) => Buy()); AddControl(BuyButton); //#TODO: sell menu - BuysAnything as toggleable option, default on, if on - items on the buying list have custom (higher) price }
public StatusWindow(WindowManager WM, GameObject.MapEntities.Actors.Player Player) { this.Player = Player; this.WM = WM; this.Width = 360; this.Height = 500; this.Title = "Status"; this.HPBar = new GUI.Controls.ProgressBar { DisplayLabel = true, Style = 0, Height = 16, Width = 192, Colour = new Color(255, 0, 80), X = 3, Y = 3 }; this.AddControl(HPBar); this.MPBar = new GUI.Controls.ProgressBar { DisplayLabel = true, Style = 0, Height = 16, Width = 192, Colour = new Color(25, 150, 255), X = 3, Y = 21 }; this.AddControl(MPBar); this.EXPBar = new GUI.Controls.ProgressBar { DisplayLabel = true, Style = 0, Height = 24, Width = 192, Colour = new Color(200, 100, 255), X = 3, Y = 39 }; this.AddControl(EXPBar); //all these will be moved to a separate GUI testing window someday ;_; this.OKButton = new GUI.Controls.Button("Make something!"); this.OKButton.Clicked += OKButton_Clicked; this.OKButton.Width = 128; this.OKButton.Height = 48; this.OKButton.X = 0; this.OKButton.Y = 300; this.AddControl(this.OKButton); this.slot = new ItemSlot(null); this.slot.X = 0; this.slot.Y = 49; this.slot.Y = 0; // this.Controls.Add(this.slot); GUI.Controls.TextBox box = new GUI.Controls.TextBox(); box.Height = 20; box.Width = 200; box.Y = 100; box.Y = 0; // AddControl(box); GUI.Controls.NumberBox nbox = new GUI.Controls.NumberBox(); nbox.Height = 20; nbox.Width = 200; nbox.Y = 130; nbox.Y = 0; nbox.Value = 1204; // AddControl(nbox); //// recipe = new GameObject.ItemLogic.CraftingRecipe(); GameObject.Item result = MakeRandomEquip(); GameObject.Item betterresult = (GameObject.Item)result.Clone(); betterresult.NameColour = Color.Red; GameObject.Item comp = MakeRandomMat(); GameObject.Item comp2 = MakeRandomMat(); comp.SubType = 1; comp2.SubType = 2; recipe.Components.Add(new Tuple <GameObject.Item, int>(comp, 1)); // recipe.Components.Add(new Tuple<GameObject.Item, int>(comp2, 1)); recipe.Outputs[0] = new List <GameObject.Item>() { result }; recipe.Outputs[1] = new List <GameObject.Item>() { betterresult }; recipe.Outputs[2] = new List <GameObject.Item>() { betterresult }; rs = new ItemSlot(result); rs.X = 40; rs.CanGrab = false; rs.CanPut = false; cs = new ItemSlot(comp); cs.X = 10; cs.Y = 50; cs.CanGrab = false; cs.CanPut = false; cs2 = new ItemSlot(comp2); cs2.X = 60; cs2.Y = 50; cs2.CanGrab = false; cs2.CanPut = false; GUI.Controls.Button craftb = new GUI.Controls.Button("Craft"); craftb.Y = 100; craftb.Width = 150; craftb.Height = 32; craftb.OnClick += CraftTest; GUI.Controls.TabbedView tabs = new GUI.Controls.TabbedView(); AddControl(tabs); tabs.Width = 200; tabs.AddTab("first", new List <Control>() { slot }); tabs.AddTab("second", new List <Control>() { cs, cs2, rs, craftb }); tabs.AddTab("thirddd", new List <Control>() { box }); tabs.Y = 100; tabs.Height = 152; tabs.SetActiveTab(0); // this.AddControl(Texst); }