stratagus-cvs
[Top][All Lists]
Advanced

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

[Stratagus-CVS] stratagus/src/ui menus.c


From: Nehal Mistry
Subject: [Stratagus-CVS] stratagus/src/ui menus.c
Date: Mon, 17 Nov 2003 18:24:08 -0500

CVSROOT:        /cvsroot/stratagus
Module name:    stratagus
Branch:         
Changes by:     Nehal Mistry <address@hidden>   03/11/17 18:24:07

Modified files:
        src/ui         : menus.c 

Log message:
        more menu fixes

Patches:
Index: stratagus/src/ui/menus.c
diff -u stratagus/src/ui/menus.c:1.589 stratagus/src/ui/menus.c:1.590
--- stratagus/src/ui/menus.c:1.589      Mon Nov 17 18:13:55 2003
+++ stratagus/src/ui/menus.c    Mon Nov 17 18:24:05 2003
@@ -26,7 +26,7 @@
 //      Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 //      02111-1307, USA.
 //
-//     $Id: menus.c,v 1.589 2003/11/17 23:13:55 nehalmistry Exp $
+//     $Id: menus.c,v 1.590 2003/11/17 23:24:05 nehalmistry Exp $
 
 //@{
 
@@ -2868,10 +2868,14 @@
 */
 local void StartCampaignFromMenu(int number)
 {
+#ifdef USE_SDL_SURFACE
+    MenusSetBackground();
+#else
     VideoLockScreen();
     MenusSetBackground();
     VideoUnlockScreen();
     Invalidate();
+#endif
 
 #if 0
     // JOHNS: this is currently not needed:
@@ -2886,11 +2890,15 @@
     PlayCampaign(Campaigns[number].Ident);
     GuiGameStarted = 1;
 
+#ifdef USE_SDL_SURFACE
+    MenusSetBackground();
+#else
     VideoLockScreen();
     MenusSetBackground();
     VideoClearScreen();
     VideoUnlockScreen();
     Invalidate();
+#endif
 
     // FIXME: johns otherwise crash in UpdateDisplay -> DrawMinimapCursor
     EndMenu();
@@ -3004,10 +3012,14 @@
     char *port;
     Menu *menu;
 
+#ifdef USE_SDL_SURFACE
+    VideoUnlockScreen();
+#else
     VideoLockScreen();
     MenusSetBackground();
     VideoUnlockScreen();
     Invalidate();
+#endif
 
     //
     //  Prepare enter ip/hostname menu
@@ -3075,10 +3087,14 @@
     ProcessMenu("menu-net-connecting", 1);
 
     if (GuiGameStarted) {
+#ifdef USE_SDL_SURFACE
+       MenusSetBackground();
+#else
        VideoLockScreen();
        MenusSetBackground();
        VideoUnlockScreen();
        Invalidate();
+#endif
        EndMenu();
     }
 }
@@ -3202,10 +3218,14 @@
 */
 local void MultiGameStart(void)
 {
+#ifdef USE_SDL_SURFACE
+    MenusSetBackground();
+#else
     VideoLockScreen();
     MenusSetBackground();
     VideoUnlockScreen();
     Invalidate();
+#endif
 
     if (MetaServerInUse) {
        SendMetaCommand("StartGame","");
@@ -3227,10 +3247,14 @@
     char NameBuf[32];
     Menu *menu;
 
+#ifdef USE_SDL_SURFACE
+    MenusSetBackground();
+#else
     VideoLockScreen();
     MenusSetBackground();
     VideoUnlockScreen();
     Invalidate();
+#endif
 
     menu = FindMenu("menu-enter-name");
     menu->Items[1].d.input.buffer = NameBuf;
@@ -4871,11 +4895,14 @@
 */
 local void StartEditor(void)
 {
-
+#ifdef USE_SDL_SURFACE
+    MenusSetBackground();
+#else
     VideoLockScreen();
     MenusSetBackground();
     VideoUnlockScreen();
     Invalidate();
+#endif
 
     SetupEditor();
 
@@ -4938,10 +4965,14 @@
     char height[10];
     char description[36];
 
+#ifdef USE_SDL_SURFACE
+    MenusSetBackground();
+#else
     VideoLockScreen();
     MenusSetBackground();
     VideoUnlockScreen();
     Invalidate();
+#endif
 
     EditorCancelled = 0;
 
@@ -6473,11 +6504,16 @@
 #endif
     *ScenSelectDisplayPath = '\0';
 
+#ifdef USE_SDL_SURFACE
+    VideoClearScreen();
+    MenusSetBackground();
+#else
     VideoLockScreen();
     VideoClearScreen();
     MenusSetBackground();
     VideoUnlockScreen();
     Invalidate();
+#endif
 
     GuiGameStarted = 0;
     ProcessMenu("menu-replay-game", 1);
@@ -7028,10 +7064,14 @@
 local void MultiGameMasterReport(void)
 {
 //     EndMenu();
+#ifdef USE_SDL_SURFACE
+    MenusSetBackground();
+#else
     VideoLockScreen();
     MenusSetBackground();
     VideoUnlockScreen();
     Invalidate();
+#endif
 
     ProcessMenu("metaserver-list", 1);
     if (GuiGameStarted) {
@@ -7046,10 +7086,14 @@
 local void ShowMetaServerList(void)
 {
     EndMenu();
+#ifdef USE_SDL_SURFACE
+    MenusSetBackground();
+#else
     Invalidate();
     VideoLockScreen();
     MenusSetBackground();
     VideoUnlockScreen();
+#endif
 
     DestroyCursorBackground();
     GuiGameStarted = 0;
@@ -7165,10 +7209,14 @@
 {
        //TODO: how to free stuff?
     //EndMenu();       
+#ifdef USE_SDL_SURFACE
+    MenusSetBackground();
+#else
     VideoLockScreen();
     MenusSetBackground();
     VideoUnlockScreen();
     Invalidate();
+#endif
     //EndMenu();
 }
 
@@ -7184,10 +7232,14 @@
 
     j = mi - mi->menu->Items;
     mi->menu->Items[j].d.gem.state = MI_GSTATE_UNCHECKED;
+#ifdef USE_SDL_SURFACE
+    MenusSetBackground();
+#else
     VideoLockScreen();
     MenusSetBackground();
     VideoUnlockScreen();
     Invalidate();
+#endif
     EndMenu();
 
     strcpy(server_host_buffer, mi->menu->Items[j - 4].d.text.text);
@@ -7224,10 +7276,14 @@
     ProcessMenu("menu-net-connecting", 1);
 
     if (GuiGameStarted) {
+#ifdef USE_SDL_SURFACE
+       MenusSetBackground();
+#else
        VideoLockScreen();
        MenusSetBackground();
        VideoUnlockScreen();
        Invalidate();
+#endif
        EndMenu();
     }
 
@@ -7277,13 +7333,17 @@
 
 local int MetaServerConnectError(void)
 {
+#ifdef USE_SDL_SURFACE
+    NetErrorMenu("Cannot Connect to Meta-Server");
+    MenusSetBackground();
+#else
     Invalidate();
     NetErrorMenu("Cannot Connect to Meta-Server");
     VideoLockScreen();
     MenusSetBackground();
     VideoUnlockScreen();
+#endif
     return 0;
-
 }
 /**
 **  Close MetaServer connection




reply via email to

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