Пример #1
0
        static void ShowScreensaver()
        {
            ContextSettings contextSettings = new ContextSettings()
            {
                AntialiasingLevel = 8
            };
            RenderWindow window = new RenderWindow(new VideoMode(), "Ustawienia pokazu slajdów", Styles.Fullscreen, contextSettings);

            window.SetFramerateLimit(20);
            window.SetMouseCursorVisible(false);
            window.Closed += (object sender, EventArgs e) => { window.Close(); };

            Theme.Load(PATH + "theme.ini", "light");
            HlyssApp app = new HlyssApp(window);

            app.Root.Children.Add(new SlideShow());

            while (window.IsOpen)
            {
                window.Clear();
                window.DispatchEvents();

                app.Update();
                app.Draw();

                window.Display();
            }
        }
Пример #2
0
        static void ShowSettings()
        {
            ContextSettings contextSettings = new ContextSettings()
            {
                AntialiasingLevel = 8
            };
            RenderWindow window = new RenderWindow(new VideoMode(400, 230), "Ustawienia pokazu slajdów", Styles.Close, contextSettings);

            window.SetFramerateLimit(60);
            window.Closed += (object sender, EventArgs e) => { window.Close(); };

            Theme.Load(PATH + "theme.ini", "light");
            HlyssApp app = new HlyssApp(window);

            app.Root.Children.Add(new SettingsComponent());

            while (window.IsOpen)
            {
                window.Clear(Theme.GetColor("primary"));
                window.DispatchEvents();

                app.Update();
                app.Draw();

                window.Display();
            }
        }
Пример #3
0
        public override void Update()
        {
            base.Update();

            if (IsOpen)
            {
                Window.Clear(Theme.GetColor("primary"));
                Window.DispatchEvents();

                _internalApp.Update();
                _internalApp.Draw();

                Window.Display();

                if (_shouldClose)
                {
                    Close();
                    _shouldClose = false;
                }
            }
        }