コード例 #1
0
        public FBindWindow(GUI.WindowManager WM, GameObject.MapEntities.Actors.Player Player)
        {
            this.Width  = 404;
            this.Height = 78;
            this.Title  = "Skillz";
            this.X      = 300;
            this.Y      = 450;
            int y = 0;
            int x = 0;

            //  int i = y * Width + x;

            for (int i = 0; i < 8; i++)
            {
                ItemSlot s = new ItemSlot(null);
                s.Y                  = 8;
                s.X                  = 8 + 48 * i; //8 between each
                s.CanGrab            = true;
                s.CanPut             = true;
                s.RenderCooldown     = true;
                s.BeforeItemChanged += CheckSkill;
                this.AddControl(s);
                FBinds[i] = s;
            }
        }
コード例 #2
0
ファイル: ShopWindow.cs プロジェクト: htmlcoderexe/3DGame
        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
        }