Пример #1
0
        public TextInputComponent(uint locX, uint locY, uint sizeX, uint sizeY) : base(locX, locY, sizeX, sizeY)
        {
            BackgroundColorComponent       = new ColorRectComponent(locX, locY, sizeX, sizeY);
            BackgroundColorComponent.Color = Color.White;
            Components.Add(BackgroundColorComponent);

            BlinkVerticalLineComponent = new VerticalLineComponent(locX, locY, sizeY, Color.Black);
            Components.Add(BlinkVerticalLineComponent);

            DisplayedTextComponent = new TextComponent(0, 0, sizeX, sizeY);
            Components.Add(DisplayedTextComponent);
        }
Пример #2
0
        public AudioPlayerWindow(string filename)
        {
            SfmlWindow.SetActive(true);
            WaveformComponent waveformComponent = new CpuWaveformComponent(0, 0, Width, Height);

            AddComponent(waveformComponent);

            var musicComponent = new MusicComponent(filename);

            AddComponent(musicComponent);

            waveformComponent.MusicComponent = musicComponent;

            PlaybackTimeTextComponent textComponent = new PlaybackTimeTextComponent(0, 0, 150, 24);

            textComponent.MusicComponent = musicComponent;
            AddComponent(textComponent);

            VerticalLineComponent verticalLineComponent = new VerticalLineComponent(0, 0, Width, Color.Yellow);

            AddComponent(verticalLineComponent);
            SfmlWindow.SetActive(false);
        }