コード例 #1
0
        public override void Initialize()
        {
            Layer.HUD.camera.x   = Page.camOffset;
            this.backgroundColor = new Color(8, 12, 13);
            this._font           = new BitmapFont("biosFont", 8);
            HUD.AddCornerControl(HUDCorner.BottomLeft, "SELECT@SELECT@");
            HUD.AddCornerControl(HUDCorner.BottomRight, "@QUACK@BACK");
            CategoryGrid categoryGrid = new CategoryGrid(12f, 20f, (List <Card>)null, (IPageListener)this);

            Level.Add((Thing)categoryGrid);
            if (this._cards.Count > 4)
            {
                this._cards.Insert(4, (Card) new LevelInfo(false, "Upload Thing"));
            }
            StripInfo infos = new StripInfo(false);

            infos.cards.AddRange((IEnumerable <Card>) this._cards);
            infos.header       = "Your Things";
            infos.cardsVisible = 4;
            categoryGrid.AddStrip(infos);
            categoryGrid.AddStrip(new StripInfo(false)
            {
                cards =
                {
                    (Card) new LevelInfo(false, "Not a thing.")
                },
                header       = "Browse Things",
                cardsVisible = 4
            });
            this._strip = (Thing)categoryGrid;
            base.Initialize();
        }
コード例 #2
0
        public void AddStrip(StripInfo infos)
        {
            List <Card> cards = new List <Card>();

            cards.AddRange((IEnumerable <Card>)infos.cards);
            CardStrip cardStrip = new CardStrip(this.x, this.y, cards, this._listener, infos.large, infos.cardsVisible, infos.header);

            this._strips.Add(cardStrip);
            Level.Add((Thing)cardStrip);
        }