1
// $Id: pingus_menu.cxx,v 1.19 2003/04/10 16:01:02 grumbel Exp $
3
// Pingus - A free Lemmings clone
4
// Copyright (C) 1999 Ingo Ruhnke <grumbel@gmx.de>
6
// This program is free software; you can redistribute it and/or
7
// modify it under the terms of the GNU General Public License
8
// as published by the Free Software Foundation; either version 2
9
// of the License, or (at your option) any later version.
11
// This program is distributed in the hope that it will be useful,
12
// but WITHOUT ANY WARRANTY; without even the implied warranty of
13
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
// GNU General Public License for more details.
16
// You should have received a copy of the GNU General Public License
17
// along with this program; if not, write to the Free Software
18
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20
#include <ClanLib/Display/Display/display.h>
22
#include "menu_button.hxx"
23
#include "pingus_resource.hxx"
25
#include "pingus_menu_manager.hxx"
26
#include "gui/gui_manager.hxx"
28
PingusMenu::PingusMenu (PingusMenuManager* m)
35
PingusMenu::preload ()
39
//pout << "PingusMenu::init ()" << std::endl;
40
//event_enabled = true;
43
background = PingusResource::load_surface("misc/logo", "core");
45
//gui_manager->add(new OptionsButton(this));
47
gui_manager->add(new CreditButton(this));*/
48
//gui_manager->add(new MultiplayerButton(this));
49
//gui_manager->add(new ThemeButton(this));
51
gui_manager->add(new QuitButton(this));
52
gui_manager->add(new StoryButton(this));
53
gui_manager->add(new EditorButton (this));
57
PingusMenu::~PingusMenu()
62
PingusMenu::on_resize(int w, int h)
64
pout << "Width: " << w << " Height: " << h << std::endl;
68
PingusMenu::on_escape_press ()
70
get_manager ()->show_exit_menu ();
74
PingusMenu::draw_foreground(GraphicContext& gc)
76
if (gc.get_height() == 480)
79
(gc.get_width()/2) - (background.get_width()/2),
84
gc.draw(background, (gc.get_width()/2) - (background.get_width()/2),
85
CL_Display::get_height()/10);
87
#ifdef OFFICIAL_PINGUS_BUILD
88
gc.print_left(Fonts::pingus_small, 20, CL_Display::get_height()-100,
89
"Pingus version "VERSION", Copyright (C) 2003 Ingo Ruhnke <grumbel@gmx.de>\n");
91
gc.print_left(Fonts::pingus_small, 20, CL_Display::get_height()-100,
92
"Pingus version "VERSION" (debian build), Copyright (C) 2003 Ingo Ruhnke <grumbel@gmx.de>\n");
94
gc.print_left(Fonts::pingus_small, 20, CL_Display::get_height()-70,
95
"Pingus comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome\n"
96
"to redistribute it under certain conditions; see the file COPYING for details.\n");