Beispiel #1
0
        public ScoreSearcher(PPDDevice device, PPDFramework.Resource.ResourceManager resourceManager, DxTextBox textBox, SongSelectFilter filter) : base(device)
        {
            this.textBox = textBox;
            this.filter  = filter;

            back = new PictureObject(device, resourceManager, Utility.Path.Combine("searchback.png"), true)
            {
                Position = new Vector2(400, 234)
            };

            sif = new SongInfoFinder(filter);

            border = new LineRectangleComponent(device, resourceManager, PPDColors.Selection)
            {
                BorderThickness = 3,
                Hidden          = true
            };
            this.AddChild(border);
            results = new TextureString[12];
            for (int i = 0; i < results.Length; i++)
            {
                results[i] = new TextureString(device, "", 20, 300, PPDColors.Black)
                {
                    Position = new Vector2(240, 120 + 26 * i)
                };
                this.AddChild(results[i]);
            }


            Inputed    += ScoreSearcher_Inputed;
            GotFocused += ScoreSearcher_GotFocused;

            this.AddChild(back);
        }
Beispiel #2
0
 public SelectSongManager(ContestInfo contestInfo, WebSongInformation[] activeScores, ListInfo[] listInfos)
 {
     this.contestInfo  = contestInfo;
     this.activeScores = activeScores;
     this.listInfos    = listInfos;
     Filter            = new SongSelectFilter();
     songSelect        = new SelectInfo();
     logicSelect       = new SelectInfo();
     contestSelect     = new SelectInfo();
     activeScoreSelect = new SelectInfo();
     listInfoSelect    = new SelectInfo();
     GenerateSelectContests();
     GenerateSelectActiveScores();
     GenerateSelectLists();
     SongInformation.Updated += SongInformation_Updated;
     LogicFolderInfomation.StaticAfterAdd          += LogicFolderInfomation_StaticAfterAdd;
     LogicFolderInfomation.StaticBeforeRemove      += LogicFolderInfomation_StaticBeforeRemove;
     LogicFolderInfomation.StaticBeforeChangeIndex += LogicFolderInfomation_StaticBeforeChangeIndex;
 }
Beispiel #3
0
        public ScoreManager(PPDDevice device, PPDFramework.Resource.ResourceManager resourceManager, DxTextBox textBox, ISound sound, SongSelectFilter filter) : base(device)
        {
            this.sound   = sound;
            this.textBox = textBox;
            this.filter  = filter;

            back = new PictureObject(device, resourceManager, Utility.Path.Combine("scoremanager", "back.png"));

            folder = new PictureObject(device, resourceManager, Utility.Path.Combine("scoremanager", "folder.png"));

            score = new PictureObject(device, resourceManager, Utility.Path.Combine("scoremanager", "score.png"));

            Lw = new PictureObject(device, resourceManager, Utility.Path.Combine("scoremanager", "lw.png"))
            {
                Position = new Vector2(34, 57)
            };

            Lb = new PictureObject(device, resourceManager, Utility.Path.Combine("scoremanager", "lb.png"))
            {
                Position = new Vector2(34, 57)
            };

            Rw = new PictureObject(device, resourceManager, Utility.Path.Combine("scoremanager", "rw.png"))
            {
                Position = new Vector2(720, 57)
            };

            Rb = new PictureObject(device, resourceManager, Utility.Path.Combine("scoremanager", "rb.png"))
            {
                Position = new Vector2(720, 57)
            };

            songInfoSelection  = new RectangleComponent(device, resourceManager, PPDColors.White);
            logicInfoSelection = new RectangleComponent(device, resourceManager, PPDColors.White);

            black = new RectangleComponent(device, resourceManager, PPDColors.Black)
            {
                RectangleHeight = 450,
                RectangleWidth  = 800,
                Alpha           = 0.65f
            };

            this.AddChild(new TextureString(device, Utility.Language["ScoreManager"], 24, PPDColors.White)
            {
                Position = new Vector2(32, 25)
            });
            this.AddChild(new TextureString(device, Utility.Language["Move"], 16, PPDColors.White)
            {
                Position = new Vector2(70, 406)
            });
            this.AddChild(new TextureString(device, Utility.Language["SortInHolding"], 16, PPDColors.White)
            {
                Position = new Vector2(190, 406)
            });
            this.AddChild(new TextureString(device, Utility.Language["Menu"], 16, PPDColors.White)
            {
                Position = new Vector2(430, 406)
            });
            this.AddChild(new TextureString(device, Utility.Language["FolderExpandCollapse"], 16, PPDColors.White)
            {
                Position = new Vector2(545, 406)
            });
            this.AddChild(new TextureString(device, Utility.Language["Back"], 16, PPDColors.White)
            {
                Position = new Vector2(707, 406)
            });
            this.AddChild(back);
            this.AddChild(black);

            createlinkmenu   = Utility.Language["CreateLink"];
            createfoldermenu = Utility.Language["CreateFolder"];
            cutmenu          = Utility.Language["Cut"];
            copymenu         = Utility.Language["Copy"];
            pastemenu        = Utility.Language["Paste"];
            deletemenu       = Utility.Language["Delete"];
            renamemenu       = Utility.Language["Rename"];

            cm           = new ContextMenu(device, resourceManager, sound);
            cm.Selected += cm_Selected;

            Inputed += ScoreManager_Inputed;

            SongInformation.Updated += SongInformation_Updated;
        }
Beispiel #4
0
 public SelectedSongInfoFilter(SongSelectFilter filter)
 {
     this.filter = filter;
 }
Beispiel #5
0
 public SongInfoFinder(SongSelectFilter filter)
 {
     Result      = new List <SongInformation>();
     queue       = new Queue <SongInformation>();
     this.Filter = filter;
 }
Beispiel #6
0
        public FilterControl(PPDDevice device, PPDFramework.Resource.ResourceManager resourceManager, ISound sound, SongSelectFilter filter) : base(device)
        {
            this.sound  = sound;
            this.filter = filter;
            selection   = new GridSelection();

            PictureObject back;

            var mainSprite = new SpriteObject(device);

            mainSprite.AddChild(new TextureString(device, Utility.Language["SortField"], 22, PPDColors.White)
            {
                Position = new Vector2(50, 80)
            });
            var sortFieldSprite = new SpriteObject(device);

            this.AddChild(sortFieldSprite);
            sortFieldSprite.AddChild(nameRadio = new RadioBoxComponent(device, resourceManager, Utility.Path, Utility.Language["Name"])
            {
                Position = new Vector2(80, 120),
                Selected = true
            });
            nameRadio.Update();
            sortFieldSprite.AddChild(timeRadio = new RadioBoxComponent(device, resourceManager, Utility.Path, Utility.Language["Time"])
            {
                Position = new Vector2(nameRadio.Position.X + nameRadio.Width + Margin, 120)
            });
            timeRadio.Update();
            sortFieldSprite.AddChild(updateDateRadio = new RadioBoxComponent(device, resourceManager, Utility.Path, Utility.Language["UpdateDate"])
            {
                Position = new Vector2(timeRadio.Position.X + timeRadio.Width + Margin, 120)
            });
            updateDateRadio.Update();
            sortFieldSprite.AddChild(bpmRadio = new RadioBoxComponent(device, resourceManager, Utility.Path, Utility.Language["BPM"])
            {
                Position = new Vector2(updateDateRadio.Position.X + updateDateRadio.Width + Margin, 120)
            });
            bpmRadio.Update();
            sortFieldSprite.AddChild(authorRadio = new RadioBoxComponent(device, resourceManager, Utility.Path, Utility.Language["Author"])
            {
                Position = new Vector2(bpmRadio.Position.X + bpmRadio.Width + Margin, 120)
            });

            mainSprite.AddChild(new TextureString(device, Utility.Language["SortOrder"], 22, PPDColors.White)
            {
                Position = new Vector2(50, 160)
            });
            var sortOrderSprite = new SpriteObject(device);

            this.AddChild(sortOrderSprite);
            sortOrderSprite.AddChild(ascRadio = new RadioBoxComponent(device, resourceManager, Utility.Path, Utility.Language["Ascendant"])
            {
                Position = new Vector2(80, 200)
            });
            nameRadio.Update();
            sortOrderSprite.AddChild(descRadio = new RadioBoxComponent(device, resourceManager, Utility.Path, Utility.Language["Descendant"])
            {
                Position = new Vector2(ascRadio.Position.X + ascRadio.Width + Margin, 200)
            });

            mainSprite.AddChild(new TextureString(device, Utility.Language["Type"], 22, PPDColors.White)
            {
                Position = new Vector2(50, 240)
            });
            mainSprite.AddChild(easyCheck = new CheckBoxComponent(device, resourceManager, Utility.Path, "EASY")
            {
                Position = new Vector2(80, 280)
            });
            easyCheck.Update();
            mainSprite.AddChild(normalCheck = new CheckBoxComponent(device, resourceManager, Utility.Path, "NORMAL")
            {
                Position = new Vector2(easyCheck.Position.X + easyCheck.Width + Margin, 280)
            });
            normalCheck.Update();
            mainSprite.AddChild(hardCheck = new CheckBoxComponent(device, resourceManager, Utility.Path, "HARD")
            {
                Position = new Vector2(normalCheck.Position.X + normalCheck.Width + Margin, 280)
            });
            hardCheck.Update();
            mainSprite.AddChild(extremeCheck = new CheckBoxComponent(device, resourceManager, Utility.Path, "EXTREME")
            {
                Position = new Vector2(hardCheck.Position.X + hardCheck.Width + Margin, 280)
            });
            mainSprite.AddChild(normalScoreCheck = new CheckBoxComponent(device, resourceManager, Utility.Path, Utility.Language["NormalScore"])
            {
                Position = new Vector2(80, 320)
            });
            normalScoreCheck.Update();
            mainSprite.AddChild(acScoreCheck = new CheckBoxComponent(device, resourceManager, Utility.Path, Utility.Language["ACScore"])
            {
                Position = new Vector2(normalScoreCheck.Position.X + normalScoreCheck.Width + Margin, 320)
            });
            acScoreCheck.Update();
            mainSprite.AddChild(acftScoreCheck = new CheckBoxComponent(device, resourceManager, Utility.Path, Utility.Language["ACFTScore"])
            {
                Position = new Vector2(acScoreCheck.Position.X + acScoreCheck.Width + Margin, 320)
            });

            mainSprite.AddChild(setDefaultButton = new ButtonComponent(device, resourceManager, Utility.Path, Utility.Language["SetDefault"])
            {
                Position = new Vector2(300, 370)
            });

            selectList = new SelectableComponent[] {
                nameRadio,
                timeRadio,
                updateDateRadio,
                bpmRadio,
                authorRadio,
                ascRadio,
                descRadio,
                easyCheck,
                normalCheck,
                hardCheck,
                extremeCheck,
                normalScoreCheck,
                acScoreCheck,
                acftScoreCheck,
                setDefaultButton
            };
            foreach (SelectableComponent comp in selectList)
            {
                selection.Add(comp.Position);
            }

            this.AddChild(mainSprite);
            this.AddChild(back = new PictureObject(device, resourceManager, Utility.Path.Combine("dialog_back.png")));
            this.AddChild(new RectangleComponent(device, resourceManager, PPDColors.Black)
            {
                RectangleHeight = 450,
                RectangleWidth  = 800,
                Alpha           = 0.65f
            });
            back.AddChild(new TextureString(device, Utility.Language["Filter"], 30, PPDColors.White)
            {
                Position = new Vector2(35, 30)
            });

            Inputed     += FilterControl_Inputed;
            GotFocused  += FilterControl_GotFocused;
            LostFocused += FilterControl_LostFocused;
        }