Ejemplo n.º 1
0
        public TextSearch(SongList sl, Font font)
        {
            songList = sl;
            text     = new Text("", font);
            Program.Window.TextEntered += (o, e) => TextEntered(e);

            //Timer for song search text reset.
            inputTimer          = new Timer(1800);
            inputTimer.Elapsed += (o, e) =>
            {
                if (Keyboard.IsKeyPressed(Keyboard.Key.Back))
                {
                    return;
                }
                inputText            = "";
                text.Color           = Config.Colors["text"];
                text.DisplayedString = "";
            };

            //Formatting.
            text.CharacterSize = 26;
            text.Font.GetTexture(26).Smooth = false;

            var tex = new Texture(Program.AssPath + "/Resources/Textures/blank.png");

            backgroundSprite = new Sprite(tex)
            {
                Color = new Color(0, 0, 0, 200)
            };

            text.DisplayedString = "a";
            charHeight           = (int)text.GetLocalBounds().Height;
            text.DisplayedString = "";
        }
Ejemplo n.º 2
0
 public HotKeys(ProgressBar progressBar, SongList songList, VolumeControl volumeControl)
 {
     this.progressBar           = progressBar;
     this.songList              = songList;
     this.volumeControl         = volumeControl;
     Program.Window.KeyPressed += (s, e) => ArrowKeys(e);
 }