using System;
using ComponentFramework;
using ComponentFramework.Modules;
using MTV3D65;

namespace FullScreenShaders.Components.Controllers
{
    //[AutoLoad]
    class ScreenModeControl : Component
    {
        public ScreenModeControl(ICore core) : base(core) {}

        public override void Update(TimeSpan elapsedTime)
        {
            if (!Core.Settings.Fullscreen && InputEngine.IsKeyPressed(CONST_TV_KEY.TV_KEY_F1))
                Core.SwitchFullscreen();

            else if (Core.Settings.Fullscreen && InputEngine.IsKeyPressed(CONST_TV_KEY.TV_KEY_F2))
                Core.SwitchWindowed();
        }

        public override int Order
        {
            get { return -10; }
        }
    }
}
