44 BtnSinglePlayer = addButton(":/res/LocalPlay.png", pageLayout, 2, 0, 1, 2, true); |
44 BtnSinglePlayer = addButton(":/res/LocalPlay.png", pageLayout, 2, 0, 1, 2, true); |
45 BtnSinglePlayer->setToolTip(tr("Local Game")); |
45 BtnSinglePlayer->setToolTip(tr("Local Game")); |
46 BtnSinglePlayer->setWhatsThis(tr("Play a game on a single computer")); |
46 BtnSinglePlayer->setWhatsThis(tr("Play a game on a single computer")); |
47 pageLayout->setAlignment(BtnSinglePlayer, Qt::AlignHCenter); |
47 pageLayout->setAlignment(BtnSinglePlayer, Qt::AlignHCenter); |
48 |
48 |
|
49 //BtnNet = addButton(":/res/NetworkPlay.png", (QBoxLayout*)netLayout, 1, true); |
49 BtnNet = addButton(":/res/NetworkPlay.png", pageLayout, 2, 2, 1, 2, true); |
50 BtnNet = addButton(":/res/NetworkPlay.png", pageLayout, 2, 2, 1, 2, true); |
50 BtnNet->setToolTip(tr("Network Game")); |
51 BtnNet->setToolTip(tr("Network Game")); |
51 BtnNet->setWhatsThis(tr("Play a game across a network")); |
52 BtnNet->setWhatsThis(tr("Play a game across a network")); |
52 pageLayout->setAlignment(BtnNet, Qt::AlignHCenter); |
53 pageLayout->setAlignment(BtnNet, Qt::AlignHCenter); |
|
54 connect(BtnNet, SIGNAL(clicked()), this, SLOT(toggleNetworkChoice())); |
|
55 |
|
56 originalNetworkIcon = BtnNet->icon(); |
|
57 disabledNetworkIcon = QIcon(":/res/NetworkPlayDisabled.png"); |
|
58 |
|
59 //QWidget *netLayoutWidget = new QWidget(); |
|
60 QVBoxLayout *netLayout = new QVBoxLayout(BtnNet); |
|
61 //pageLayout->addWidget(netLayoutWidget, 2, 2, 1, 2); |
|
62 //netLayoutWidget->setStyleSheet("background: green;"); |
|
63 //netLayoutWidget->setFixedSize(314, 260); |
|
64 netLayout->setSpacing(20); |
|
65 netLayout->setAlignment(Qt::AlignHCenter); |
|
66 |
|
67 BtnNetLocal = addButton("Play local network game", (QBoxLayout*)netLayout, 0, false); |
|
68 BtnNetLocal->setToolTip(tr("Play a local network game")); |
|
69 BtnNetLocal->setWhatsThis(tr("Play a game across a local area network")); |
|
70 BtnNetLocal->setFixedSize(BtnNet->width() - 50, 60); |
|
71 BtnNetLocal->setVisible(false); |
|
72 |
|
73 BtnNetOfficial = addButton("Play official network game", (QBoxLayout*)netLayout, 0, false); |
|
74 BtnNetOfficial->setToolTip(tr("Play a network game")); |
|
75 BtnNetOfficial->setWhatsThis(tr("Play a game on an official server")); |
|
76 BtnNetOfficial->setFixedSize(BtnNet->width() - 50, 60); |
|
77 BtnNetOfficial->setVisible(false); |
53 |
78 |
54 // button order matters for overlapping (what's on top and what isn't) |
79 // button order matters for overlapping (what's on top and what isn't) |
55 BtnInfo = addButton(":/res/HedgewarsTitle.png", pageLayout, 0, 0, 1, 4, true); |
80 BtnInfo = addButton(":/res/HedgewarsTitle.png", pageLayout, 0, 0, 1, 4, true); |
56 BtnInfo->setStyleSheet("border: transparent;background: transparent;"); |
81 BtnInfo->setStyleSheet("border: transparent;background: transparent;"); |
57 //BtnInfo->setToolTip(tr("Credits")); //tooltip looks horrible with transparent background buttons |
82 //BtnInfo->setToolTip(tr("Credits")); //tooltip looks horrible with transparent background buttons |
58 BtnInfo->setWhatsThis(tr("Read about who is behind the Hedgewars Project")); |
83 BtnInfo->setWhatsThis(tr("Read about who is behind the Hedgewars Project")); |
59 pageLayout->setAlignment(BtnInfo, Qt::AlignHCenter); |
84 pageLayout->setAlignment(BtnInfo, Qt::AlignHCenter); |
60 |
85 |
61 BtnFeedback = addButton("Feedback", pageLayout, 4, 0, 1, 4, false); |
86 BtnFeedback = addButton("Feedback", pageLayout, 4, 0, 1, 4, false); |
|
87 BtnFeedback->setFixedSize(86, 27); |
62 BtnFeedback->setWhatsThis(tr("Leave a feedback here reporting issues, suggesting features or just saying how you like Hedgewars")); |
88 BtnFeedback->setWhatsThis(tr("Leave a feedback here reporting issues, suggesting features or just saying how you like Hedgewars")); |
63 pageLayout->setAlignment(BtnFeedback, Qt::AlignHCenter); |
89 pageLayout->setAlignment(BtnFeedback, Qt::AlignHCenter); |
64 |
90 |
65 BtnDataDownload = addButton(tr("Downloadable Content"), pageLayout, 5, 0, 1, 4, false); |
91 BtnDataDownload = addButton(tr("Downloadable Content"), pageLayout, 5, 0, 1, 4, false); |
|
92 BtnDataDownload->setFixedSize(176, 27); |
66 //BtnDataDownload->setToolTip(tr(Downloadable Content")); |
93 //BtnDataDownload->setToolTip(tr(Downloadable Content")); |
67 BtnDataDownload->setWhatsThis(tr("Access the user created content downloadable from our website")); |
94 BtnDataDownload->setWhatsThis(tr("Access the user created content downloadable from our website")); |
68 pageLayout->setAlignment(BtnDataDownload, Qt::AlignHCenter); |
95 pageLayout->setAlignment(BtnDataDownload, Qt::AlignHCenter); |
69 |
96 |
70 // disable exit button sound |
97 // disable exit button sound |