[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Pingus-CVS] CVS: Games/Pingus/src pingus_main.cxx,1.58,1.59 result_scre
From: |
grumbel |
Subject: |
[Pingus-CVS] CVS: Games/Pingus/src pingus_main.cxx,1.58,1.59 result_screen.cxx,1.7,1.8 start_screen.cxx,1.6,1.7 |
Date: |
30 Mar 2003 16:51:45 -0000 |
Update of /var/lib/cvs/Games/Pingus/src
In directory dark:/tmp/cvs-serv14713/src
Modified Files:
pingus_main.cxx result_screen.cxx start_screen.cxx
Log Message:
- some more stuff for the result/start screens
Index: pingus_main.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/pingus_main.cxx,v
retrieving revision 1.58
retrieving revision 1.59
diff -u -d -r1.58 -r1.59
--- pingus_main.cxx 30 Mar 2003 15:34:57 -0000 1.58
+++ pingus_main.cxx 30 Mar 2003 16:51:43 -0000 1.59
@@ -336,7 +336,7 @@
<< std::endl;
std::cout << _("\n\
-Copyright (C) 1998 Ingo Ruhnke <address@hidden>\n\
+Copyright (C) 2003 Ingo Ruhnke <address@hidden>\n\
There is NO warranty. You may redistribute this software\n\
under the terms of the GN General Public License.\n\
For more information about these matters, see the files named COPYING.\
Index: result_screen.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/result_screen.cxx,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- result_screen.cxx 30 Mar 2003 15:34:57 -0000 1.7
+++ result_screen.cxx 30 Mar 2003 16:51:43 -0000 1.8
@@ -65,6 +65,26 @@
}
};
+class ResultScreenAbortButton
+ : public GUI::SurfaceButton
+{
+private:
+ ResultScreen* parent;
+public:
+ ResultScreenAbortButton(ResultScreen* p)
+ : GUI::SurfaceButton(122, 444,
+ ResDescriptor("start/back", "core",
ResDescriptor::RD_RESOURCE),
+ ResDescriptor("start/back_clicked", "core",
ResDescriptor::RD_RESOURCE),
+ ResDescriptor("start/back_hover", "core",
ResDescriptor::RD_RESOURCE)),
+ parent(p)
+ {
+ }
+
+ void on_click() {
+ parent->close_screen();
+ }
+};
+
class ResultScreenRetryButton
: public GUI::SurfaceButton
{
@@ -72,10 +92,10 @@
ResultScreen* parent;
public:
ResultScreenRetryButton(ResultScreen* p)
- : GUI::SurfaceButton(500, 500,
- ResDescriptor("result/retry", "core",
ResDescriptor::RD_RESOURCE),
- ResDescriptor("result/retry", "core",
ResDescriptor::RD_RESOURCE),
- ResDescriptor("result/retry", "core",
ResDescriptor::RD_RESOURCE)),
+ : GUI::SurfaceButton(625, 425,
+ ResDescriptor("start/ok", "core",
ResDescriptor::RD_RESOURCE),
+ ResDescriptor("start/ok_clicked", "core",
ResDescriptor::RD_RESOURCE),
+ ResDescriptor("start/ok_hover", "core",
ResDescriptor::RD_RESOURCE)),
parent(p)
{
}
@@ -101,8 +121,24 @@
ResultScreenComponent::draw(GraphicContext& gc)
{
gc.draw(background, 0, 0);
+
+ if (!result.success())
+ gc.print_left(Fonts::chalk_small, 635, 415, "Retry?");
+
gc.print_center(Fonts::chalk_large, gc.get_width()/2, 100,
System::translate(result.plf->get_levelname()));
- gc.print_left(Fonts::chalk_large, 150, 180, _("Results:"));
+
+ if (result.success())
+ {
+ gc.print_left(Fonts::chalk_large, 150, 180, _("Result: Success!"));
+ gc.print_center(Fonts::pingus_small, gc.get_width()/2,
gc.get_height()-30,
+ "..:: Press Space to continue ::..");
+ }
+ else
+ {
+ gc.print_left(Fonts::chalk_large, 150, 180, _("Result: Failure! :("));
+ gc.print_center(Fonts::pingus_small, gc.get_width()/2,
gc.get_height()-30,
+ "..:: Press Space to retry the level ::..");
+ }
gc.print_left(Fonts::chalk_small, 150, 280, "Saved: ");
for (int i = 0; i < result.saved; ++i)
@@ -123,19 +159,6 @@
gc.print_left(Fonts::chalk_small, 250, 370, "-");
else
gc.print_left(Fonts::chalk_small, 250, 370, to_string(result.max_time -
result.used_time));
-
- if (result.success())
- {
- gc.print_center(Fonts::chalk_large, gc.get_width()/2, 450, "Success!
=:-)");
- gc.print_center(Fonts::pingus_small, gc.get_width()/2,
gc.get_height()-30,
- "..:: Press Space to continue ::..");
- }
- else
- {
- gc.print_center(Fonts::chalk_large, gc.get_width()/2, 450, "Failure!
:-(");
- gc.print_center(Fonts::pingus_small, gc.get_width()/2,
gc.get_height()-30,
- "..:: Press Space to retry the level ::..");
- }
}
ResultScreen::ResultScreen(Result arg_result)
@@ -148,9 +171,14 @@
gui_manager->add(comp);
if (result.success())
- gui_manager->add(new ResultScreenOkButton(this));
+ {
+ gui_manager->add(new ResultScreenOkButton(this));
+ }
else
- gui_manager->add(new ResultScreenRetryButton(this));
+ {
+ gui_manager->add(new ResultScreenAbortButton(this));
+ gui_manager->add(new ResultScreenRetryButton(this));
+ }
//gui_manager->add(new GUI::SurfaceButton(500, 500, cancel_desc,
cancel_desc, cancel_desc));
}
Index: start_screen.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/start_screen.cxx,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- start_screen.cxx 30 Mar 2003 14:49:49 -0000 1.6
+++ start_screen.cxx 30 Mar 2003 16:51:43 -0000 1.7
@@ -66,7 +66,26 @@
}
};
-//cancel button 122, 444
+
+class StartScreenAbortButton
+ : public GUI::SurfaceButton
+{
+private:
+ StartScreen* parent;
+public:
+ StartScreenAbortButton(StartScreen* p)
+ : GUI::SurfaceButton(122, 444,
+ ResDescriptor("start/back", "core",
ResDescriptor::RD_RESOURCE),
+ ResDescriptor("start/back_clicked", "core",
ResDescriptor::RD_RESOURCE),
+ ResDescriptor("start/back_hover", "core",
ResDescriptor::RD_RESOURCE)),
+ parent(p)
+ {
+ }
+
+ void on_click() {
+ parent->cancel_game();
+ }
+};
StartScreen::~StartScreen()
{
@@ -122,7 +141,7 @@
{
}*/
- gc.print_left(Fonts::chalk_small, 110, 460, _("Author: ") +
plf->get_author());
+ gc.print_center(Fonts::chalk_small, 400, 470, _("Author: ") +
plf->get_author());
if (maintainer_mode)
gc.print_left(Fonts::chalk_small, 110, 430, _("Filename: ") +
plf->get_filename());
@@ -134,6 +153,7 @@
StartScreenComponent* comp = new StartScreenComponent(plf);
gui_manager->add(comp);
gui_manager->add(new StartScreenOkButton(this));
+ gui_manager->add(new StartScreenAbortButton(this));
}
void
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Pingus-CVS] CVS: Games/Pingus/src pingus_main.cxx,1.58,1.59 result_screen.cxx,1.7,1.8 start_screen.cxx,1.6,1.7,
grumbel <=
- Prev by Date:
[Pingus-CVS] CVS: Games/Pingus/data/images/core/misc start_back.png,NONE,1.1 start_back_clicked.png,NONE,1.1 start_back_hover.png,NONE,1.1
- Next by Date:
[Pingus-CVS] CVS: Games/Pingus/data/images Makefile.am,1.43,1.44
- Previous by thread:
[Pingus-CVS] CVS: Games/Pingus/data/images/core/misc start_back.png,NONE,1.1 start_back_clicked.png,NONE,1.1 start_back_hover.png,NONE,1.1
- Next by thread:
[Pingus-CVS] CVS: Games/Pingus/data/images Makefile.am,1.43,1.44
- Index(es):