pingus-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Pingus-Devel] Re: [Pingus-CVS] r2871 - in branches/pingus_sdl: . src


From: Tomas Blaha
Subject: [Pingus-Devel] Re: [Pingus-CVS] r2871 - in branches/pingus_sdl: . src
Date: Sun, 12 Aug 2007 22:58:00 +0200 (CEST)

Hi, right alt is (at least at my keyboard) altgr, which is SDLK_MODE:

--- global_event.cpp.orig       2007-08-12 22:49:42.000000000 +0200
+++ global_event.cpp    2007-08-12 22:50:53.000000000 +0200
@@ -49,7 +49,7 @@
       break;

     case SDLK_RETURN:
-      if (!keystate[SDLK_LALT] && !keystate[SDLK_RALT])
+      if (!keystate[SDLK_LALT] && !keystate[SDLK_RALT] && !keystate[SDLK_MODE])
         break;
       // FALL THROUGH
     case SDLK_F11:

Bye
Tomas

On Sun, 12 Aug 2007 address@hidden wrote:

> Author: jsalmon3
> Date: 2007-08-12 22:15:32 +0200 (Sun, 12 Aug 2007)
> New Revision: 2871
> 
> Modified:
>    branches/pingus_sdl/TODO
>    branches/pingus_sdl/src/global_event.cpp
> Log:
> Added alt-enter to toggle full screen and ctrl-g to grab input
> 
> 
> 
> Modified: branches/pingus_sdl/TODO
> ===================================================================
> --- branches/pingus_sdl/TODO  2007-08-12 20:11:41 UTC (rev 2870)
> +++ branches/pingus_sdl/TODO  2007-08-12 20:15:32 UTC (rev 2871)
> @@ -42,10 +42,6 @@
>  
>  - exit wrong at data/levels/tutorial/snow12-grumbel.scm (colmap removal 
> buggy?)
>  
> -- add [Ctrl]+g to grab the mouse (according to Darklock that is common for 
> SDL apps)
> -
> -- add Alt-Enter for fullscreen toggling
> -
>  - Font::draw() origin only works properly for left, right and center break 
> with multiline text
>  
>  - nuke button is unclean, other buttons not so great either -> repaint
> 
> Modified: branches/pingus_sdl/src/global_event.cpp
> ===================================================================
> --- branches/pingus_sdl/src/global_event.cpp  2007-08-12 20:11:41 UTC (rev 
> 2870)
> +++ branches/pingus_sdl/src/global_event.cpp  2007-08-12 20:15:32 UTC (rev 
> 2871)
> @@ -48,6 +48,10 @@
>        console << "Toggling fps counter display" << std::endl;
>        break;
>  
> +    case SDLK_RETURN:
> +      if (!keystate[SDLK_LALT] && !keystate[SDLK_RALT])
> +        break;
> +      // FALL THROUGH
>      case SDLK_F11:
>        fullscreen_enabled = !fullscreen_enabled;
>        // re-initialize the screen
> @@ -79,6 +83,22 @@
>          }
>        break;
>  
> +    case SDLK_g:
> +      if (keystate[SDLK_LCTRL] || keystate[SDLK_RCTRL])
> +        {
> +          if (SDL_WM_GrabInput(SDL_GRAB_QUERY) == SDL_GRAB_ON)
> +            {
> +              SDL_WM_GrabInput(SDL_GRAB_OFF);
> +              console << "Grab input off" << std::endl;
> +            }
> +          else
> +            {
> +              SDL_WM_GrabInput(SDL_GRAB_ON);
> +              console << "Grab input on" << std::endl;
> +            }
> +        }
> +      break;
> +
>      default:
>        // console << "GlobalEvent: Unknown key pressed: " << key.id;
>        break;
> 
> 
> 
> _______________________________________________
> pingus-cvs mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/pingus-cvs
> 


--

Tomáš Bláha

e-mail:   tomas.blaha at kapsa.cz
JabberID: tomiiik at jabber.cz
ICQ:      76239430

reply via email to

[Prev in Thread] Current Thread [Next in Thread]