[Supertux-Commit] r5419 - in trunk/supertux: data/images/engine/menu src

grumbel at millhouse.dreamhost.com grumbel at millhouse.dreamhost.com
Mon May 5 12:03:42 PDT 2008


Author: grumbel
Date: 2008-05-05 12:03:41 -0700 (Mon, 05 May 2008)
New Revision: 5419

Added:
   trunk/supertux/data/images/engine/menu/frame.png
Modified:
   trunk/supertux/src/title.cpp
   trunk/supertux/src/title.hpp
Log:
Added experimental frame to the main menu

Added: trunk/supertux/data/images/engine/menu/frame.png
===================================================================
(Binary files differ)


Property changes on: trunk/supertux/data/images/engine/menu/frame.png
___________________________________________________________________
Name: svn:mime-type
   + image/png

Modified: trunk/supertux/src/title.cpp
===================================================================
--- trunk/supertux/src/title.cpp	2008-05-05 18:03:37 UTC (rev 5418)
+++ trunk/supertux/src/title.cpp	2008-05-05 19:03:41 UTC (rev 5419)
@@ -373,6 +373,8 @@
   player->set_speedlimit(230); //MAX_WALK_XM
 
   generate_main_menu();
+
+  frame = std::auto_ptr<Surface>(new Surface("images/engine/menu/frame.png"));
 }
 
 void
@@ -420,6 +422,9 @@
   Sector* sector  = titlesession->get_current_sector();
   sector->draw(context);
 
+  // FIXME: Add something to scale the frame to the resolution of the screen
+  context.draw_surface(frame.get(), Vector(0,0),LAYER_FOREGROUND1);
+
   context.draw_text(white_small_text, "SuperTux " PACKAGE_VERSION "\n",
       Vector(5, SCREEN_HEIGHT - 50), ALIGN_LEFT, LAYER_FOREGROUND1);
   context.draw_text(white_small_text,

Modified: trunk/supertux/src/title.hpp
===================================================================
--- trunk/supertux/src/title.hpp	2008-05-05 18:03:37 UTC (rev 5418)
+++ trunk/supertux/src/title.hpp	2008-05-05 19:03:41 UTC (rev 5419)
@@ -72,6 +72,7 @@
   std::vector<Addon> installed_addons; /**< list of currently installed Add-ons */
   World* current_world;
 
+  std::auto_ptr<Surface> frame;
   std::auto_ptr<CodeController> controller;
   std::auto_ptr<GameSession> titlesession;
 };




More information about the Supertux-Commit mailing list