public InventoryStockableInterface(Texture2D back, TypeSacoche sacoche1, TypeSacoche sacoche2,Rectangle position , InventoryInterface invoc )
        {
            parent = invoc;
            this.position = positionongl = position;
            sac1 = sacoche1;
            sac2 = sacoche2;
            this.back = back;
            int ongX = positionongl.X+10;
            Onglet o = Onglet.Armes;
            onglet.Add(new ClickableArea(o.ToString(), Tools.Quick.dicoFont[Tools.TypeFont.Texte], new Vector2(ongX, positionongl.Y), () => changeOnglet(Onglet.Armes)));
            ongX += (int)Tools.Quick.dicoFont[Tools.TypeFont.Texte].MeasureString(o.ToString()).X + 10;

             o = Onglet.Armures;
             onglet.Add(new ClickableArea(o.ToString(), Tools.Quick.dicoFont[Tools.TypeFont.Texte], new Vector2(ongX, positionongl.Y), () => changeOnglet(Onglet.Armures)));
            ongX += (int)Tools.Quick.dicoFont[Tools.TypeFont.Texte].MeasureString(o.ToString()).X + 10;

            o = Onglet.Potions;
            onglet.Add(new ClickableArea(o.ToString(), Tools.Quick.dicoFont[Tools.TypeFont.Texte], new Vector2(ongX, positionongl.Y), () => changeOnglet( Onglet.Potions)));
            ongX += (int)Tools.Quick.dicoFont[Tools.TypeFont.Texte].MeasureString(o.ToString()).X + 10;

            o = Onglet.Crochets;
            onglet.Add(new ClickableArea(o.ToString(), Tools.Quick.dicoFont[Tools.TypeFont.Texte], new Vector2(ongX, positionongl.Y), () => changeOnglet(Onglet.Crochets)));
            ongX += (int)Tools.Quick.dicoFont[Tools.TypeFont.Texte].MeasureString(o.ToString()).X + 10;

            o = Onglet.Parchemins;
            onglet.Add(new ClickableArea(o.ToString(), Tools.Quick.dicoFont[Tools.TypeFont.Texte], new Vector2(ongX, positionongl.Y), () => changeOnglet(Onglet.Parchemins)));
            ongX += (int)Tools.Quick.dicoFont[Tools.TypeFont.Texte].MeasureString(o.ToString()).X + 10;

            o = Onglet.Carquois;
            onglet.Add(new ClickableArea(o.ToString(), Tools.Quick.dicoFont[Tools.TypeFont.Texte], new Vector2(ongX, positionongl.Y), () => changeOnglet(Onglet.Carquois)));
            ongX += (int)Tools.Quick.dicoFont[Tools.TypeFont.Texte].MeasureString(o.ToString()).X + 10;

            foreach (ClickableArea ca in onglet)
            {
                ca.Visible = false;
                ca.Visible = false ;
            }
        }
Esempio n. 2
0
 public void setsacoche(TypeSacoche tsac1, TypeSacoche tsac2)
 {
     sac1 = tsac1;
     sac2 = tsac2;
 }