Added experimental frame to the main menu
authorIngo Ruhnke <grumbel@gmx.de>
Mon, 5 May 2008 19:03:41 +0000 (19:03 +0000)
committerIngo Ruhnke <grumbel@gmx.de>
Mon, 5 May 2008 19:03:41 +0000 (19:03 +0000)
SVN-Revision: 5419

data/images/engine/menu/frame.png [new file with mode: 0644]
src/title.cpp
src/title.hpp

diff --git a/data/images/engine/menu/frame.png b/data/images/engine/menu/frame.png
new file mode 100644 (file)
index 0000000..9eede6f
Binary files /dev/null and b/data/images/engine/menu/frame.png differ
index b43e09c..6127663 100644 (file)
@@ -373,6 +373,8 @@ TitleScreen::TitleScreen()
   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 @@ TitleScreen::draw(DrawingContext& context)
   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,
index 75d3430..25d6882 100644 (file)
@@ -72,6 +72,7 @@ private:
   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;
 };