[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Stratagus-CVS] stratagus/src/ui menu_proc.c menus.c
From: |
Nehal Mistry |
Subject: |
[Stratagus-CVS] stratagus/src/ui menu_proc.c menus.c |
Date: |
Mon, 17 Nov 2003 19:48:17 -0500 |
CVSROOT: /cvsroot/stratagus
Module name: stratagus
Branch:
Changes by: Nehal Mistry <address@hidden> 03/11/17 19:48:17
Modified files:
src/ui : menu_proc.c menus.c
Log message:
more menu fixes
Patches:
Index: stratagus/src/ui/menu_proc.c
diff -u stratagus/src/ui/menu_proc.c:1.111 stratagus/src/ui/menu_proc.c:1.112
--- stratagus/src/ui/menu_proc.c:1.111 Mon Nov 17 14:14:40 2003
+++ stratagus/src/ui/menu_proc.c Mon Nov 17 19:48:16 2003
@@ -26,7 +26,7 @@
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
// 02111-1307, USA.
//
-// $Id: menu_proc.c,v 1.111 2003/11/17 19:14:40 nehalmistry Exp $
+// $Id: menu_proc.c,v 1.112 2003/11/18 00:48:16 nehalmistry Exp $
//@{
@@ -2385,9 +2385,13 @@
}
ButtonUnderCursor = -1;
+#ifdef USE_SDL_SURFACE
+ HideAnyCursor();
+#else
VideoLockScreen();
HideAnyCursor();
VideoUnlockScreen();
+#endif
DestroyCursorBackground();
MustRedraw |= RedrawCursor;
CursorState = CursorStatePoint;
Index: stratagus/src/ui/menus.c
diff -u stratagus/src/ui/menus.c:1.591 stratagus/src/ui/menus.c:1.592
--- stratagus/src/ui/menus.c:1.591 Mon Nov 17 18:39:54 2003
+++ stratagus/src/ui/menus.c Mon Nov 17 19:48:16 2003
@@ -26,7 +26,7 @@
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
// 02111-1307, USA.
//
-// $Id: menus.c,v 1.591 2003/11/17 23:39:54 nehalmistry Exp $
+// $Id: menus.c,v 1.592 2003/11/18 00:48:16 nehalmistry Exp $
//@{
@@ -1775,9 +1775,13 @@
(*menu->Items[i].initfunc)(menu->Items + i);
}
}
+#ifdef USE_SDL_SURFACE
+ DrawMenu(menu);
+#else
VideoLockScreen();
DrawMenu(menu);
VideoUnlockScreen();
+#endif
}
GlobalOptionsInit(NULL);
}
@@ -2815,6 +2819,7 @@
#ifdef USE_SDL_SURFACE
MenusSetBackground();
+ Invalidate();
#else
VideoLockScreen();
MenusSetBackground();
@@ -2870,6 +2875,7 @@
{
#ifdef USE_SDL_SURFACE
MenusSetBackground();
+ Invalidate();
#else
VideoLockScreen();
MenusSetBackground();
@@ -3016,6 +3022,7 @@
#ifdef USE_SDL_SURFACE
VideoUnlockScreen();
+ Invalidate();
#else
VideoLockScreen();
MenusSetBackground();
@@ -3052,9 +3059,13 @@
ProcessMenu("menu-enter-server", 1);
+#ifdef USE_SDL_SURFACE
+ MenusSetBackground();
+#else
VideoLockScreen();
MenusSetBackground();
VideoUnlockScreen();
+#endif
if (menu->Items[1].d.input.nch == 0) {
return;
@@ -3069,9 +3080,13 @@
server_host_buffer[menu->Items[1].d.input.nch] = 0;
if (NetworkSetupServerAddress(server_host_buffer)) {
NetErrorMenu("Unable to lookup host.");
+#ifdef USE_SDL_SURFACE
+ MenusSetBackground();
+#else
VideoLockScreen();
MenusSetBackground();
VideoUnlockScreen();
+#endif
return;
}
NetworkInitClientConnect();
@@ -3091,6 +3106,7 @@
if (GuiGameStarted) {
#ifdef USE_SDL_SURFACE
MenusSetBackground();
+ Invalidate();
#else
VideoLockScreen();
MenusSetBackground();
@@ -3124,9 +3140,13 @@
*/
local void NetConnectingCancel(void)
{
+#ifdef USE_SDL_SURFACE
+ MenusSetBackground();
+#else
VideoLockScreen();
MenusSetBackground();
VideoUnlockScreen();
+#endif
NetworkExitClientConnect();
// Trigger TerminateNetConnect() to call us again and end the menu
NetLocalState = ccs_usercanceled;
@@ -3222,6 +3242,7 @@
{
#ifdef USE_SDL_SURFACE
MenusSetBackground();
+ Invalidate();
#else
VideoLockScreen();
MenusSetBackground();
@@ -3251,6 +3272,7 @@
#ifdef USE_SDL_SURFACE
MenusSetBackground();
+ Invalidate();
#else
VideoLockScreen();
MenusSetBackground();
@@ -3268,9 +3290,13 @@
ProcessMenu("menu-enter-name", 1);
+#ifdef USE_SDL_SURFACE
+ MenusSetBackground();
+#else
VideoLockScreen();
MenusSetBackground();
VideoUnlockScreen();
+#endif
if (menu->Items[1].d.input.nch == 0) {
return;
@@ -3916,9 +3942,13 @@
*/
local void GameCancel(void)
{
+#ifdef USE_SDL_SURFACE
+ MenusSetBackground();
+#else
VideoLockScreen();
MenusSetBackground();
VideoUnlockScreen();
+#endif
FreeMapInfo(MenuMapInfo);
MenuMapInfo = NULL;
EndMenu();
@@ -4899,6 +4929,7 @@
{
#ifdef USE_SDL_SURFACE
MenusSetBackground();
+ Invalidate();
#else
VideoLockScreen();
MenusSetBackground();
@@ -4969,6 +5000,7 @@
#ifdef USE_SDL_SURFACE
MenusSetBackground();
+ Invalidate();
#else
VideoLockScreen();
MenusSetBackground();
@@ -4995,9 +5027,13 @@
ProcessMenu("menu-editor-new", 1);
if (EditorCancelled) {
+#ifdef USE_SDL_SURFACE
+ MenusSetBackground();
+#else
VideoLockScreen();
MenusSetBackground();
VideoUnlockScreen();
+#endif
return;
}
@@ -5121,9 +5157,13 @@
GetInfoFromSelectPath();
if (EditorCancelled) {
+#ifdef USE_SDL_SURFACE
VideoLockScreen();
MenusSetBackground();
VideoUnlockScreen();
+#else
+ MenusSetBackground();
+#endif
return;
}
@@ -7081,6 +7121,7 @@
// EndMenu();
#ifdef USE_SDL_SURFACE
MenusSetBackground();
+ Invalidate();
#else
VideoLockScreen();
MenusSetBackground();
@@ -7102,6 +7143,7 @@
{
EndMenu();
#ifdef USE_SDL_SURFACE
+ Invalidate();
MenusSetBackground();
#else
Invalidate();
@@ -7226,6 +7268,7 @@
//EndMenu();
#ifdef USE_SDL_SURFACE
MenusSetBackground();
+ Invalidate();
#else
VideoLockScreen();
MenusSetBackground();
@@ -7249,6 +7292,7 @@
mi->menu->Items[j].d.gem.state = MI_GSTATE_UNCHECKED;
#ifdef USE_SDL_SURFACE
MenusSetBackground();
+ Invalidate();
#else
VideoLockScreen();
MenusSetBackground();
@@ -7270,9 +7314,13 @@
//server_host_buffer[menu->Items[1].d.input.nch] = 0;
if (NetworkSetupServerAddress(server_host_buffer)) {
NetErrorMenu("Unable to lookup host.");
+#ifdef USE_SDL_SURFACE
+ MenusSetBackground();
+#else
VideoLockScreen();
MenusSetBackground();
VideoUnlockScreen();
+#endif
ProcessMenu("metaserver-list", 1);
return;
}
@@ -7293,6 +7341,7 @@
if (GuiGameStarted) {
#ifdef USE_SDL_SURFACE
MenusSetBackground();
+ Invalidate();
#else
VideoLockScreen();
MenusSetBackground();
@@ -7349,6 +7398,7 @@
local int MetaServerConnectError(void)
{
#ifdef USE_SDL_SURFACE
+ Invalidate();
NetErrorMenu("Cannot Connect to Meta-Server");
MenusSetBackground();
#else
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Stratagus-CVS] stratagus/src/ui menu_proc.c menus.c,
Nehal Mistry <=