예제 #1
0
        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);
        }
예제 #2
0
        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);
        }