~ubuntu-branches/ubuntu/precise/widelands/precise-backports

« back to all changes in this revision

Viewing changes to src/ui/ui_fs_menus/fullscreen_menu_tutorial_select_map.cc

  • Committer: Bazaar Package Importer
  • Author(s): Martin Quinson
  • Date: 2005-02-14 10:41:12 UTC
  • Revision ID: james.westby@ubuntu.com-20050214104112-6v08iux9fptxpva9
Tags: upstream-build9
Import upstream version build9

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Copyright (C) 2002 by the Widelands Development Team
 
3
 *
 
4
 * This program is free software; you can redistribute it and/or
 
5
 * modify it under the terms of the GNU General Public License
 
6
 * as published by the Free Software Foundation; either version 2
 
7
 * of the License, or (at your option) any later version.
 
8
 *
 
9
 * This program is distributed in the hope that it will be useful,
 
10
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
11
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
12
 * GNU General Public License for more details.
 
13
 *
 
14
 * You should have received a copy of the GNU General Public License
 
15
 * along with this program; if not, write to the Free Software
 
16
 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 
17
 *
 
18
 */
 
19
 
 
20
#include "error.h"
 
21
#include "fullscreen_menu_tutorial_select_map.h"
 
22
#include "ui_button.h"
 
23
#include "ui_textarea.h"
 
24
#include "constants.h"
 
25
 
 
26
static const char* filenames[] = {
 
27
   "campaigns/t01_eyes_in_the_darkness.wmf",
 
28
   "campaigns/t02_a_place_to_call_home.wmf",
 
29
};
 
30
 
 
31
/*
 
32
 * Array with file names for this mission
 
33
 */
 
34
Fullscreen_Menu_TutorialSelectMap::Fullscreen_Menu_TutorialSelectMap()
 
35
        : Fullscreen_Menu_Base("singleplmenu.jpg")
 
36
{
 
37
        // Text
 
38
   UITextarea* title= new UITextarea(this, MENU_XRES/2, 45, "Tutorial Campaign: A new Kingdom", Align_HCenter);
 
39
   title->set_font(UI_FONT_BIG, UI_FONT_CLR_FG);
 
40
 
 
41
        // UIButtons
 
42
        UIButton* b;
 
43
 
 
44
        b = new UIButton(this, 30, 75, 580, 24, 1, 1);
 
45
        b->clickedid.set(this, &Fullscreen_Menu_TutorialSelectMap::end_modal);
 
46
        b->set_title("Mission 1: Eyes in the Darkness - Game Basics");
 
47
 
 
48
        b = new UIButton(this, 30, 105, 580, 24, 1, 2);
 
49
        b->clickedid.set(this, &Fullscreen_Menu_TutorialSelectMap::end_modal);
 
50
        b->set_title("Mission 2: A Place to call Home - Mining, Expanding, Advanced Productions");
 
51
 
 
52
        b = new UIButton(this, (get_inner_w()-120)/2, get_inner_h()-80, 120, 24, 0, 0);
 
53
        b->clickedid.set(this, &Fullscreen_Menu_TutorialSelectMap::end_modal);
 
54
        b->set_title("Back");
 
55
}
 
56
 
 
57
const char* Fullscreen_Menu_TutorialSelectMap::get_mapname( int code ) {
 
58
   return filenames[code-1];
 
59
}
 
60