예제 #1
0
        public VideoPreferencesPanel()
        {
            this.Build();

            if (Config.FPS_N == 30000)
            {
                fpscombobox.Active = 1;
            }
            else
            {
                fpscombobox.Active = 0;
            }
            fpscombobox.Changed += HandleFPSChanged;
            Misc.FillImageFormat(renderimagecombo, Config.RenderVideoStandard);
            Misc.FillEncodingFormat(renderenccombo, Config.RenderEncodingProfile);
            Misc.FillQuality(renderqualcombo, Config.RenderEncodingQuality);

            Misc.FillImageFormat(captureimagecombo, Config.CaptureVideoStandard);
            Misc.FillEncodingFormat(captureenccombo, Config.CaptureEncodingProfile);
            Misc.FillQuality(capturequalcombo, Config.CaptureEncodingQuality);

            renderimagecombo.Changed  += HandleImageChanged;
            captureimagecombo.Changed += HandleImageChanged;

            renderenccombo.Changed  += HandleEncodingChanged;
            captureenccombo.Changed += HandleEncodingChanged;

            renderqualcombo.Changed   += HandleQualityChanged;
            captureimagecombo.Changed += HandleImageChanged;

            enableSound = new CheckButton();
            rendertable.Attach(enableSound, 1, 2, 3, 4,
                               AttachOptions.Fill,
                               AttachOptions.Fill, 0, 0);
            enableSound.CanFocus = false;
            enableSound.Show();
            enableSound.Active   = Config.EnableAudio;
            enableSound.Toggled += (sender, e) => { Config.EnableAudio = enableSound.Active; };

            overlayTitle = new CheckButton();
            rendertable.Attach(overlayTitle, 1, 2, 4, 5,
                               AttachOptions.Fill,
                               AttachOptions.Fill, 0, 0);
            overlayTitle.CanFocus = false;
            overlayTitle.Show();
            overlayTitle.Active   = Config.OverlayTitle;
            overlayTitle.Toggled += (sender, e) => { Config.OverlayTitle = overlayTitle.Active; };
        }
예제 #2
0
        public VideoPreferencesPanel()
        {
            this.Build();

            if (Config.FPS_N == 30)
            {
                fpscombobox.Active = 1;
            }
            else if (Config.FPS_N == 50)
            {
                fpscombobox.Active = 2;
            }
            else if (Config.FPS_N == 60)
            {
                fpscombobox.Active = 3;
            }
            else
            {
                fpscombobox.Active = 0;
            }
            fpscombobox.Changed += HandleFPSChanged;
            Misc.FillImageFormat(renderimagecombo, VideoStandards.Rendering, Config.RenderVideoStandard);
            Misc.FillEncodingFormat(renderenccombo, Config.RenderEncodingProfile);
            Misc.FillQuality(renderqualcombo, Config.RenderEncodingQuality);

            Misc.FillImageFormat(captureimagecombo, VideoStandards.Capture, Config.CaptureVideoStandard);
            Misc.FillEncodingFormat(captureenccombo, Config.CaptureEncodingProfile);
            Misc.FillQuality(capturequalcombo, Config.CaptureEncodingQuality);

            renderimagecombo.Changed  += HandleImageChanged;
            captureimagecombo.Changed += HandleImageChanged;

            renderenccombo.Changed  += HandleEncodingChanged;
            captureenccombo.Changed += HandleEncodingChanged;

            renderqualcombo.Changed  += HandleQualityChanged;
            capturequalcombo.Changed += HandleQualityChanged;

            enableSound = new CheckButton();
            rendertable.Attach(enableSound, 1, 2, 3, 4,
                               AttachOptions.Fill,
                               AttachOptions.Fill, 0, 0);
            enableSound.CanFocus = false;
            enableSound.Show();
            enableSound.Active   = Config.EnableAudio;
            enableSound.Toggled += (sender, e) => {
                Config.EnableAudio = enableSound.Active;
            };

            overlayTitle = new CheckButton();
            rendertable.Attach(overlayTitle, 1, 2, 4, 5,
                               AttachOptions.Fill,
                               AttachOptions.Fill, 0, 0);
            overlayTitle.CanFocus = false;
            overlayTitle.Show();
            overlayTitle.Active   = Config.OverlayTitle;
            overlayTitle.Toggled += (sender, e) => {
                Config.OverlayTitle = overlayTitle.Active;
            };

            SizeGroup sgroup = new SizeGroup(SizeGroupMode.Horizontal);

            foreach (Widget w in capturetable)
            {
                if (w is Label)
                {
                    sgroup.AddWidget(w);
                }
            }
            foreach (Widget w in rendertable)
            {
                if (w is Label)
                {
                    sgroup.AddWidget(w);
                }
            }
            sgroup.AddWidget(fameratelabel);
        }