private void LoadButtons()
        {
            Category category = new Category();

            category.categoryID = pageUserControl.category.categoryID;
            foreach (Category pageSubItem in category.GetSubCategories())
            {
                Objects.Button btnPage = new Objects.Button(pageUserControl, pageSubItem.categoryID, pageSubItem.categoryTitle);
                if (SpRowOne.Children.Count() < 1)
                {
                    SpRowOne.Children.Add(btnPage);
                }
                else if (SpRowTwo.Children.Count() < 1)
                {
                    SpRowTwo.Children.Add(btnPage);
                }
                else if (SpRowThree.Children.Count() < 1)
                {
                    SpRowThree.Children.Add(btnPage);
                }
                else if (SpRowFour.Children.Count() < 1)
                {
                    SpRowFour.Children.Add(btnPage);
                }
                else if (SpRowFive.Children.Count() < 1)
                {
                    SpRowFive.Children.Add(btnPage);
                }
            }
        }
Ejemplo n.º 2
0
        protected override void OnRegistered()
        {
            AddLayer(new TitleLayer());
            var button = new Objects.Button
            {
                keyValuePairs = new Dictionary <string, Action>()
                {
                    { "Start Game", () => { asd.Engine.ChangeScene(new SelectChara()); } },
                    { "Records", () => {} },
                    { "Option", () => { asd.Engine.ChangeScene(new Scenes.Option()); } },
                    { "Quit", () => { asd.Engine.Close(); } }
                },
                buttonPos = new asd.Vector2DF(10, 65)
            };

            AddLayer(button);
        }
Ejemplo n.º 3
0
        protected override void OnRegistered()
        {
            var titleText = new asd.Layer2D();
            var title     = new asd.TextObject2D()
            {
                Text     = "Select the charactor",
                Position = new asd.Vector2DF(100, 10),
                Font     = titleFont
            };

            titleText.AddObject(title);

            int count = 0;

            foreach (string url in charas)
            {
                var tex = asd.Engine.Graphics.CreateTexture2D(url);
                var img = new asd.TextureObject2D
                {
                    Texture  = tex,
                    Position = new asd.Vector2DF(10 + count * 200, 50)
                };
                titleText.AddObject(img);
                count++;
            }

            var button = new Objects.Button
            {
                keyValuePairs = new Dictionary <string, Action>()
                {
                    { "Back", () => { asd.Engine.ChangeScene(new Title()); } }
                },
                buttonPos = new asd.Vector2DF(10, 400)
            };

            AddLayer(button);
            AddLayer(titleText);
        }