Пример #1
0
 private void GameFormSDL_KeyDownActions(SDL.SDL_KeyboardEvent e)
 {
     if ((e.keysym.sym == SDL.SDL_Keycode.SDLK_RETURN) && ((e.keysym.mod & SDL.SDL_Keymod.KMOD_ALT) != 0))
     {
         FullscreenToggle?.Invoke(this, EventArgs.Empty);
     }
 }
Пример #2
0
        private void GameFormSDL_KeyDownActions(SDL.SDL_KeyboardEvent e)
        {
            var altReturn = (e.keysym.sym == SDL.SDL_Keycode.SDLK_RETURN) && ((e.keysym.mod & SDL.SDL_Keymod.KMOD_ALT) != 0);
            var altEnter  = (e.keysym.sym == SDL.SDL_Keycode.SDLK_KP_ENTER) && ((e.keysym.mod & SDL.SDL_Keymod.KMOD_ALT) != 0);

            if (altReturn || altEnter)
            {
                FullscreenToggle?.Invoke(this, EventArgs.Empty);
            }
        }
Пример #3
0
        private void GameFormSDL_KeyDownActions(KeyboardEvent e)
        {
            var altReturn = ((KeyCode)e.Keysym.Sym == KeyCode.KReturn) && (((Keymod)e.Keysym.Mod & Keymod.KmodAlt) != 0);
            var altEnter  = ((KeyCode)e.Keysym.Sym == KeyCode.KKPEnter) && (((Keymod)e.Keysym.Mod & Keymod.KmodAlt) != 0);

            if (altReturn || altEnter)
            {
                FullscreenToggle?.Invoke(this, EventArgs.Empty);
            }
        }
Пример #4
0
 /// <summary>
 /// Raises the FullScreenToggle event
 /// </summary>
 /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
 private void OnFullscreenToggle(EventArgs e)
 {
     FullscreenToggle?.Invoke(this, e);
 }