Пример #1
0
        public void Run(IGuiExternalInterface IGuiExternalInterface)
        {
            CommonGuiDisplayOpengl = new CommonGuiDisplayOpengl(IGuiExternalInterface, this);
            CommonGuiInput = new CommonGuiInput(IGuiExternalInterface);
            this.IGuiExternalInterface = IGuiExternalInterface;
            //var Window = new Window("Hello world!");
            Application.Init();
            Window = new Window("Soywiz's Psp Emulator");
            this.GLWidget = new GLWidget(OpenglGpuImpl.UsedGraphicsMode);
            Window.WindowPosition = WindowPosition.Center;
            Window.SetSizeRequest(480, 272);
            Window.Child = GLWidget;
            GLWidget.RenderFrame += GLWidget_RenderFrame;
            GLWidget.SetSizeRequest(480, 272);
            //GLWidget.ShowAll();
            Window.Removed += Window_Removed;
            Window.KeyPressEvent += Window_KeyPressEvent;
            Window.KeysChanged += Window_KeysChanged;
            Window.KeyReleaseEvent += Window_KeyReleaseEvent;

            Window.ShowAll();

            //GLWidget.KeyPressEvent += Window_KeyPressEvent;
            //GLWidget.KeyReleaseEvent += Window_KeyReleaseEvent;

            PspDisplay.DrawEvent += PspDisplay_DrawEvent;

            OpenOpenDialog();
            CommonGuiInput.ReLoadControllerConfig();

            Application.Run();
        }