QTfrontend/pagesingleplayer.cpp
changeset 5082 2d2422772832
child 5204 e1a5f4d5d86a
equal deleted inserted replaced
5080:2e29c1e1c9cd 5082:2d2422772832
       
     1 /*
       
     2  * Hedgewars, a free turn based strategy game
       
     3  * Copyright (c) 2006-2011 Andrey Korotaev <unC0Rr@gmail.com>
       
     4  *
       
     5  * This program is free software; you can redistribute it and/or modify
       
     6  * it under the terms of the GNU General Public License as published by
       
     7  * the Free Software Foundation; version 2 of the License
       
     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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
       
    17  */
       
    18 
       
    19 #include <QGridLayout>
       
    20 #include <QPushButton>
       
    21 
       
    22 #include "pages.h"
       
    23 #include "gamecfgwidget.h"
       
    24 
       
    25 PageSinglePlayer::PageSinglePlayer(QWidget* parent) : AbstractPage(parent)
       
    26 {
       
    27     QVBoxLayout * vLayout = new QVBoxLayout(this);
       
    28     QHBoxLayout * topLine = new QHBoxLayout();
       
    29     QHBoxLayout * middleLine = new QHBoxLayout();
       
    30     QHBoxLayout * bottomLine = new QHBoxLayout();
       
    31     vLayout->addStretch();
       
    32     vLayout->addLayout(topLine);
       
    33     vLayout->addSpacing(30);
       
    34     vLayout->addLayout(middleLine);
       
    35     vLayout->addStretch();
       
    36     vLayout->addLayout(bottomLine);
       
    37 
       
    38     topLine->addStretch();
       
    39     BtnSimpleGamePage = addButton(":/res/SimpleGame.png", topLine, 0, true);
       
    40     BtnSimpleGamePage->setToolTip(tr("Simple Game (a quick game against the computer, settings are chosen for you)"));
       
    41     topLine->addSpacing(60);
       
    42     BtnMultiplayer = addButton(":/res/Multiplayer.png", topLine, 1, true);
       
    43     BtnMultiplayer->setToolTip(tr("Multiplayer (play a hotseat game against your friends, or AI teams)"));
       
    44     topLine->addStretch();
       
    45 
       
    46 
       
    47     BtnCampaignPage = addButton(":/res/Campaign.png", middleLine, 0, true);
       
    48     BtnCampaignPage->setToolTip(tr("Campaign Mode (...). IN DEVELOPMENT"));
       
    49     //BtnCampaignPage->setVisible(false);
       
    50 
       
    51     BtnTrainPage = addButton(":/res/Trainings.png", middleLine, 1, true);
       
    52     BtnTrainPage->setToolTip(tr("Training Mode (Practice your skills in a range of training missions). IN DEVELOPMENT"));
       
    53 
       
    54     BtnBack = addButton(":/res/Exit.png", bottomLine, 0, true);
       
    55     bottomLine->addStretch();
       
    56 
       
    57     BtnDemos = addButton(":/res/Record.png", bottomLine, 1, true);
       
    58     BtnDemos->setToolTip(tr("Demos (Watch recorded demos)"));
       
    59     BtnLoad = addButton(":/res/Save.png", bottomLine, 2, true);
       
    60     BtnLoad->setStyleSheet("QPushButton{margin: 12px 0px 12px 0px;}");
       
    61     BtnLoad->setToolTip(tr("Load (Load a previously saved game)"));
       
    62     BtnBack->setFixedHeight(BtnLoad->height());
       
    63     BtnBack->setStyleSheet("QPushButton{margin-top: 31px;}");
       
    64 }