[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Pingus-CVS] CVS: Games/Pingus/src/gui screen_manager.cxx,1.5,1.6
From: |
grumbel |
Subject: |
[Pingus-CVS] CVS: Games/Pingus/src/gui screen_manager.cxx,1.5,1.6 |
Date: |
6 Apr 2003 12:40:49 -0000 |
Update of /var/lib/cvs/Games/Pingus/src/gui
In directory dark:/tmp/cvs-serv23697/src/gui
Modified Files:
screen_manager.cxx
Log Message:
- added next button to story screen
Index: screen_manager.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/gui/screen_manager.cxx,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- screen_manager.cxx 3 Apr 2003 17:03:24 -0000 1.5
+++ screen_manager.cxx 6 Apr 2003 12:40:47 -0000 1.6
@@ -77,21 +77,23 @@
if (screens.empty ())
continue;
- switch (cached_action)
+ while (cached_action != CA_NONE)
{
- case CA_POP:
- real_pop_screen ();
- break;
- case CA_REPLACE:
- real_replace_screen (replace_screen_arg);
- break;
- case CA_CLEAR:
- real_clear();
- break;
- default:
- break;
+ switch (cached_action)
+ {
+ case CA_POP:
+ real_pop_screen ();
+ break;
+ case CA_REPLACE:
+ real_replace_screen (replace_screen_arg);
+ break;
+ case CA_CLEAR:
+ real_clear();
+ break;
+ default:
+ break;
+ }
}
- cached_action = CA_NONE;
// FIXME: is there a more gentel way to do that instead of spreading the
checks all around here?
// Last screen has poped, so we are going to end here
@@ -139,8 +141,8 @@
screens.back ()->on_shutdown ();
}
- screen->on_startup ();
screens.push_back (ScreenPtr(screen, delete_screen));
+ screen->on_startup ();
}
void
@@ -161,6 +163,7 @@
void
ScreenManager::real_replace_screen (const ScreenPtr& ptr)
{
+ cached_action = CA_NONE;
screens.back ()->on_shutdown ();
screens.back () = ptr;
screens.back ()->on_startup ();
@@ -169,9 +172,10 @@
void
ScreenManager::real_pop_screen ()
{
- screens.back ()->on_shutdown ();
-
- screens.pop_back ();
+ cached_action = CA_NONE;
+ ScreenPtr back = screens.back ();
+ screens.pop_back();
+ back->on_shutdown();
if (!screens.empty ())
{
@@ -188,6 +192,7 @@
void
ScreenManager::real_clear()
{
+ cached_action = CA_NONE;
screens.clear();
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Pingus-CVS] CVS: Games/Pingus/src/gui screen_manager.cxx,1.5,1.6,
grumbel <=
- Prev by Date:
[Pingus-CVS] CVS: Games/Pingus/data/images/story credits1.png,NONE,1.1 credits2.png,NONE,1.1 credits3.png,NONE,1.1 credits4.png,NONE,1.1
- Next by Date:
[Pingus-CVS] CVS: Games/Pingus/src story.cxx,1.16,1.17 story.hxx,1.12,1.13 story_screen.cxx,1.12,1.13 story_screen.hxx,1.4,1.5
- Previous by thread:
[Pingus-CVS] CVS: Games/Pingus/data/images/story credits1.png,NONE,1.1 credits2.png,NONE,1.1 credits3.png,NONE,1.1 credits4.png,NONE,1.1
- Next by thread:
[Pingus-CVS] CVS: Games/Pingus/src story.cxx,1.16,1.17 story.hxx,1.12,1.13 story_screen.cxx,1.12,1.13 story_screen.hxx,1.4,1.5
- Index(es):