git repos / blockattack-game

blame: source/code/menudef.cpp

normal view · raw

593aeae4 sago007 2011-06-25 22:42 1
/*
af35c39d sago007 2013-11-16 16:37 2
===========================================================================
af35c39d sago007 2013-11-16 16:37 3
blockattack - Block Attack - Rise of the Blocks
af35c39d sago007 2013-11-16 16:37 4
Copyright (C) 2005-2013 Poul Sander
af35c39d sago007 2013-11-16 16:37 5
af35c39d sago007 2013-11-16 16:37 6
This program is free software: you can redistribute it and/or modify
af35c39d sago007 2013-11-16 16:37 7
it under the terms of the GNU General Public License as published by
af35c39d sago007 2013-11-16 16:37 8
the Free Software Foundation, either version 2 of the License, or
af35c39d sago007 2013-11-16 16:37 9
(at your option) any later version.
af35c39d sago007 2013-11-16 16:37 10
af35c39d sago007 2013-11-16 16:37 11
This program is distributed in the hope that it will be useful,
af35c39d sago007 2013-11-16 16:37 12
but WITHOUT ANY WARRANTY; without even the implied warranty of
af35c39d sago007 2013-11-16 16:37 13
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
af35c39d sago007 2013-11-16 16:37 14
GNU General Public License for more details.
af35c39d sago007 2013-11-16 16:37 15
af35c39d sago007 2013-11-16 16:37 16
You should have received a copy of the GNU General Public License
af35c39d sago007 2013-11-16 16:37 17
along with this program.  If not, see http://www.gnu.org/licenses/
af35c39d sago007 2013-11-16 16:37 18
af35c39d sago007 2013-11-16 16:37 19
Source information and contacts persons can be found at
021de090 sago007 2015-12-30 18:56 20
http://blockattack.net
af35c39d sago007 2013-11-16 16:37 21
===========================================================================
593aeae4 sago007 2011-06-25 22:42 22
*/
26ddb424 sago007 2011-06-09 20:06 23
#include "global.hpp"
26ddb424 sago007 2011-06-09 20:06 24
#include <iostream>
26ddb424 sago007 2011-06-09 20:06 25
#include <stdlib.h>
26ddb424 sago007 2011-06-09 20:06 26
#include "MenuSystem.h"
c9dd376f sago007 2012-01-20 17:13 27
#include "common.h"
d8fe60bd sago007 2018-04-02 16:15 28
#include "HelpHowtoState.hpp"
54d2d583 sago007 2018-04-05 17:52 29
#include "HelpGamepadState.hpp"
5147de4e Poul Sander 2018-05-06 12:59 30
#include "HelpAboutState.hpp"
0471a1d3 sago007 2018-05-19 10:26 31
#include "ShowFileState.hpp"
3affd2d6 Poul Sander 2020-12-27 15:56 32
#include "ModConfigMenuState.hpp"
26ddb424 sago007 2011-06-09 20:06 33
26ddb424 sago007 2011-06-09 20:06 34
3838c95c sago007 2016-01-23 10:47 35
#if 0
26ddb424 sago007 2011-06-09 20:06 36
//Menu
ecef5838 sago007 2015-11-24 20:01 37
static void PrintHi(Button* b) {
161a010c sago007 2016-05-06 14:00 38
	cout << "Hi" <<"\n";
26ddb424 sago007 2011-06-09 20:06 39
}
3838c95c sago007 2016-01-23 10:47 40
#endif
26ddb424 sago007 2011-06-09 20:06 41
593aeae4 sago007 2011-06-25 22:42 42
//Stores the controls
ecef5838 sago007 2015-11-24 20:01 43
struct control {
1d2e2129 sago007 2015-12-23 15:41 44
	SDL_Keycode up;
1d2e2129 sago007 2015-12-23 15:41 45
	SDL_Keycode down;
1d2e2129 sago007 2015-12-23 15:41 46
	SDL_Keycode left;
1d2e2129 sago007 2015-12-23 15:41 47
	SDL_Keycode right;
1d2e2129 sago007 2015-12-23 15:41 48
	SDL_Keycode change;
1d2e2129 sago007 2015-12-23 15:41 49
	SDL_Keycode push;
593aeae4 sago007 2011-06-25 22:42 50
};
593aeae4 sago007 2011-06-25 22:42 51
26ddb424 sago007 2011-06-09 20:06 52
void OpenScoresDisplay();
593aeae4 sago007 2011-06-25 22:42 53
extern control keySettings[3];
593aeae4 sago007 2011-06-25 22:42 54
593aeae4 sago007 2011-06-25 22:42 55
//Function to return the name of a key, to be displayed...
97546fef Poul Sander 2020-08-08 17:21 56
std::string getKeyName(SDL_Keycode key) {
97546fef Poul Sander 2020-08-08 17:21 57
	std::string keyname(SDL_GetKeyName(key));
d82fedb9 Poul Sander 2018-06-20 16:48 58
	if (key == SDLK_UP) {
d82fedb9 Poul Sander 2018-06-20 16:48 59
		keyname = _("Up arrow");
d82fedb9 Poul Sander 2018-06-20 16:48 60
	}
d82fedb9 Poul Sander 2018-06-20 16:48 61
	if (key == SDLK_DOWN) {
d82fedb9 Poul Sander 2018-06-20 16:48 62
		keyname = _("Down arrow");
d82fedb9 Poul Sander 2018-06-20 16:48 63
	}
d82fedb9 Poul Sander 2018-06-20 16:48 64
	if (key == SDLK_LEFT) {
d82fedb9 Poul Sander 2018-06-20 16:48 65
		keyname = _("Left arrow");
d82fedb9 Poul Sander 2018-06-20 16:48 66
	}
d82fedb9 Poul Sander 2018-06-20 16:48 67
	if (key == SDLK_RIGHT) {
d82fedb9 Poul Sander 2018-06-20 16:48 68
		keyname = _("Right arrow");
d82fedb9 Poul Sander 2018-06-20 16:48 69
	}
d82fedb9 Poul Sander 2018-06-20 16:48 70
	if (key == SDLK_RCTRL) {
d82fedb9 Poul Sander 2018-06-20 16:48 71
		keyname = _("Right Ctrl");
d82fedb9 Poul Sander 2018-06-20 16:48 72
	}
d82fedb9 Poul Sander 2018-06-20 16:48 73
	if (key == SDLK_LCTRL) {
d82fedb9 Poul Sander 2018-06-20 16:48 74
		keyname = _("Left Ctrl");
d82fedb9 Poul Sander 2018-06-20 16:48 75
	}
d82fedb9 Poul Sander 2018-06-20 16:48 76
	if (key == SDLK_RSHIFT) {
d82fedb9 Poul Sander 2018-06-20 16:48 77
		keyname = _("Right shift");
d82fedb9 Poul Sander 2018-06-20 16:48 78
	}
d82fedb9 Poul Sander 2018-06-20 16:48 79
	if (key == SDLK_LSHIFT) {
d82fedb9 Poul Sander 2018-06-20 16:48 80
		keyname = _("Left shift");
d82fedb9 Poul Sander 2018-06-20 16:48 81
	}
d82fedb9 Poul Sander 2018-06-20 16:48 82
	if (key == SDLK_RALT) {
d82fedb9 Poul Sander 2018-06-20 16:48 83
		keyname = _("Right alt");
d82fedb9 Poul Sander 2018-06-20 16:48 84
	}
d82fedb9 Poul Sander 2018-06-20 16:48 85
	if (key == SDLK_LALT) {
d82fedb9 Poul Sander 2018-06-20 16:48 86
		keyname = _("Left alt");
d82fedb9 Poul Sander 2018-06-20 16:48 87
	}
d82fedb9 Poul Sander 2018-06-20 16:48 88
	if (key == SDLK_RETURN) {
d82fedb9 Poul Sander 2018-06-20 16:48 89
		keyname = _("Return");
d82fedb9 Poul Sander 2018-06-20 16:48 90
	}
d82fedb9 Poul Sander 2018-06-20 16:48 91
	if (key == SDLK_SPACE) {
d82fedb9 Poul Sander 2018-06-20 16:48 92
		keyname = _("Space");
d82fedb9 Poul Sander 2018-06-20 16:48 93
	}
72383a9e sago007 2016-10-30 11:56 94
	if (globalData.verboseLevel) {
b1f06489 Poul Sander 2020-08-08 17:19 95
		std::cout << key << " translated to " << keyname << "\n";
acd79baf sago007 2015-11-22 19:37 96
	}
c53e6443 sago007 2012-04-17 11:04 97
	return keyname;
593aeae4 sago007 2011-06-25 22:42 98
}
593aeae4 sago007 2011-06-25 22:42 99
ecef5838 sago007 2015-11-24 20:01 100
class Button_changekey : public Button {
593aeae4 sago007 2011-06-25 22:42 101
private:
1d2e2129 sago007 2015-12-23 15:41 102
	SDL_Keycode* m_key2change;
97546fef Poul Sander 2020-08-08 17:21 103
	std::string m_keyname;
593aeae4 sago007 2011-06-25 22:42 104
public:
7192940a Poul Sander 2020-08-08 17:18 105
	Button_changekey(SDL_Keycode* key, const char* keyname);
5f8ce673 Poul Sander 2021-06-05 22:18 106
	virtual void doAction() override;
593aeae4 sago007 2011-06-25 22:42 107
};
593aeae4 sago007 2011-06-25 22:42 108
6710d462 sago007 2012-05-12 17:23 109
7192940a Poul Sander 2020-08-08 17:18 110
Button_changekey::Button_changekey(SDL_Keycode* key, const char* keyname)
3674f7f0 sago007 2020-07-12 12:16 111
	: m_key2change{key}, m_keyname{keyname} {
c53e6443 sago007 2012-04-17 11:04 112
	setLabel(m_keyname+" : "+getKeyName(*m_key2change));
593aeae4 sago007 2011-06-25 22:42 113
}
593aeae4 sago007 2011-06-25 22:42 114
ecef5838 sago007 2015-11-24 20:01 115
void Button_changekey::doAction() {
c53e6443 sago007 2012-04-17 11:04 116
	SDL_Event event;
c53e6443 sago007 2012-04-17 11:04 117
c53e6443 sago007 2012-04-17 11:04 118
	bool finnish = false;
ecef5838 sago007 2015-11-24 20:01 119
	while (!finnish) {
c53e6443 sago007 2012-04-17 11:04 120
		SDL_Delay(10);
ecef5838 sago007 2015-11-24 20:01 121
		while ( SDL_PollEvent(&event) ) {
ecef5838 sago007 2015-11-24 20:01 122
			if (event.type == SDL_KEYDOWN) {
acd79baf sago007 2015-11-22 19:37 123
				if (event.key.keysym.sym != SDLK_ESCAPE) {
c53e6443 sago007 2012-04-17 11:04 124
					*m_key2change = event.key.keysym.sym;
acd79baf sago007 2015-11-22 19:37 125
				}
c53e6443 sago007 2012-04-17 11:04 126
				finnish = true;
c53e6443 sago007 2012-04-17 11:04 127
			}
c53e6443 sago007 2012-04-17 11:04 128
		}
c53e6443 sago007 2012-04-17 11:04 129
	}
c53e6443 sago007 2012-04-17 11:04 130
	setLabel(m_keyname+" : "+getKeyName(*m_key2change));
593aeae4 sago007 2011-06-25 22:42 131
}
26ddb424 sago007 2011-06-09 20:06 132
5f8ce673 Poul Sander 2021-06-05 22:18 133
5f8ce673 Poul Sander 2021-06-05 22:18 134
class Button_changeVolume : public Button {
5f8ce673 Poul Sander 2021-06-05 22:18 135
	private:
5f8ce673 Poul Sander 2021-06-05 22:18 136
	std::string cvar = "";
5f8ce673 Poul Sander 2021-06-05 22:18 137
	int newVolume = 0;
5f8ce673 Poul Sander 2021-06-05 22:18 138
	public:
5f8ce673 Poul Sander 2021-06-05 22:18 139
	Button_changeVolume(const char* cvar, int newVolume);
5f8ce673 Poul Sander 2021-06-05 22:18 140
	virtual void doAction() override;
5f8ce673 Poul Sander 2021-06-05 22:18 141
};
5f8ce673 Poul Sander 2021-06-05 22:18 142
5f8ce673 Poul Sander 2021-06-05 22:18 143
Button_changeVolume::Button_changeVolume(const char* cvar, int newVolume)
5f8ce673 Poul Sander 2021-06-05 22:18 144
	: cvar{cvar}, newVolume{newVolume} {
5f8ce673 Poul Sander 2021-06-05 22:18 145
	int volumePct = newVolume*100.0/MIX_MAX_VOLUME;
5f8ce673 Poul Sander 2021-06-05 22:18 146
	if (newVolume == 0) {
5f8ce673 Poul Sander 2021-06-05 22:18 147
		setLabel(_("Volume: Off") );
5f8ce673 Poul Sander 2021-06-05 22:18 148
	}
5f8ce673 Poul Sander 2021-06-05 22:18 149
	else {
5f8ce673 Poul Sander 2021-06-05 22:18 150
		setLabel(std::string(_("Volume: "))+ std::to_string(volumePct)+"%" );
5f8ce673 Poul Sander 2021-06-05 22:18 151
	}
5f8ce673 Poul Sander 2021-06-05 22:18 152
	this->setPopOnRun(true);
5f8ce673 Poul Sander 2021-06-05 22:18 153
}
5f8ce673 Poul Sander 2021-06-05 22:18 154
5f8ce673 Poul Sander 2021-06-05 22:18 155
void Button_changeVolume::doAction() {
5f8ce673 Poul Sander 2021-06-05 22:18 156
	Config::getInstance()->setInt(cvar, newVolume);
5f8ce673 Poul Sander 2021-06-05 22:18 157
	ResetFullscreen();
5f8ce673 Poul Sander 2021-06-05 22:18 158
}
5f8ce673 Poul Sander 2021-06-05 22:18 159
ecef5838 sago007 2015-11-24 20:01 160
void InitMenues() {
094b2dfe sago007 2016-06-12 10:50 161
	standardButton.setSurfaces();
26ddb424 sago007 2011-06-09 20:06 162
}
26ddb424 sago007 2011-06-09 20:06 163
4379ec19 Poul Sander 2019-01-30 18:27 164
static void runSinglePlayerEndless0() {
de81e07d sago007 2016-07-10 20:22 165
	runGame(Gametype::SinglePlayerEndless, 0);
26ddb424 sago007 2011-06-09 20:06 166
}
26ddb424 sago007 2011-06-09 20:06 167
4379ec19 Poul Sander 2019-01-30 18:27 168
static void runSinglePlayerEndless1() {
4379ec19 Poul Sander 2019-01-30 18:27 169
	runGame(Gametype::SinglePlayerEndless, 1);
4379ec19 Poul Sander 2019-01-30 18:27 170
}
4379ec19 Poul Sander 2019-01-30 18:27 171
4379ec19 Poul Sander 2019-01-30 18:27 172
static void runSinglePlayerEndless2() {
4379ec19 Poul Sander 2019-01-30 18:27 173
	runGame(Gametype::SinglePlayerEndless, 2);
4379ec19 Poul Sander 2019-01-30 18:27 174
}
4379ec19 Poul Sander 2019-01-30 18:27 175
4379ec19 Poul Sander 2019-01-30 18:27 176
static void runSinglePlayerEndless3() {
4379ec19 Poul Sander 2019-01-30 18:27 177
	runGame(Gametype::SinglePlayerEndless, 3);
4379ec19 Poul Sander 2019-01-30 18:27 178
}
4379ec19 Poul Sander 2019-01-30 18:27 179
4379ec19 Poul Sander 2019-01-30 18:27 180
static void runSinglePlayerEndless4() {
4379ec19 Poul Sander 2019-01-30 18:27 181
	runGame(Gametype::SinglePlayerEndless, 4);
4379ec19 Poul Sander 2019-01-30 18:27 182
}
4379ec19 Poul Sander 2019-01-30 18:27 183
4379ec19 Poul Sander 2019-01-30 18:27 184
static void runSinglePlayerEndless() {
4379ec19 Poul Sander 2019-01-30 18:27 185
	Menu sp(globalData.screen,_("Single Player Endless"),true);
4379ec19 Poul Sander 2019-01-30 18:27 186
	Button d0,d1,d2,d3,d4;
4379ec19 Poul Sander 2019-01-30 18:27 187
	d0.setPopOnRun(true);
4379ec19 Poul Sander 2019-01-30 18:27 188
	d1.setPopOnRun(true);
4379ec19 Poul Sander 2019-01-30 18:27 189
	d2.setPopOnRun(true);
4379ec19 Poul Sander 2019-01-30 18:27 190
	d3.setPopOnRun(true);
4379ec19 Poul Sander 2019-01-30 18:27 191
	d4.setPopOnRun(true);
4379ec19 Poul Sander 2019-01-30 18:27 192
	d0.setLabel(_("Slow"));
4379ec19 Poul Sander 2019-01-30 18:27 193
	d1.setLabel(_("Fast"));
4379ec19 Poul Sander 2019-01-30 18:27 194
	d2.setLabel(_("Faster"));
4379ec19 Poul Sander 2019-01-30 18:27 195
	d3.setLabel(_("Even faster"));
4379ec19 Poul Sander 2019-01-30 18:27 196
	d4.setLabel(_("Fastest"));
4379ec19 Poul Sander 2019-01-30 18:27 197
	d0.setAction(runSinglePlayerEndless0);
4379ec19 Poul Sander 2019-01-30 18:27 198
	d1.setAction(runSinglePlayerEndless1);
4379ec19 Poul Sander 2019-01-30 18:27 199
	d2.setAction(runSinglePlayerEndless2);
4379ec19 Poul Sander 2019-01-30 18:27 200
	d3.setAction(runSinglePlayerEndless3);
4379ec19 Poul Sander 2019-01-30 18:27 201
	d4.setAction(runSinglePlayerEndless4);
4379ec19 Poul Sander 2019-01-30 18:27 202
	sp.addButton(&d0);
4379ec19 Poul Sander 2019-01-30 18:27 203
	sp.addButton(&d1);
4379ec19 Poul Sander 2019-01-30 18:27 204
	sp.addButton(&d2);
4379ec19 Poul Sander 2019-01-30 18:27 205
	sp.addButton(&d3);
4379ec19 Poul Sander 2019-01-30 18:27 206
	sp.addButton(&d4);
4379ec19 Poul Sander 2019-01-30 18:27 207
	RunGameState(sp);
4379ec19 Poul Sander 2019-01-30 18:27 208
}
4379ec19 Poul Sander 2019-01-30 18:27 209
29edda2d sago007 2016-10-08 18:06 210
static void runSinglePlayerTimeTrial() {
de81e07d sago007 2016-07-10 20:22 211
	runGame(Gametype::SinglePlayerTimeTrial, 0);
26ddb424 sago007 2011-06-09 20:06 212
}
26ddb424 sago007 2011-06-09 20:06 213
29edda2d sago007 2016-10-08 18:06 214
static void runStageClear() {
de81e07d sago007 2016-07-10 20:22 215
	runGame(Gametype::StageClear, 0);
aede0664 sago007 2012-04-19 19:45 216
}
aede0664 sago007 2012-04-19 19:45 217
29edda2d sago007 2016-10-08 18:06 218
static void runSinglePlayerPuzzle() {
de81e07d sago007 2016-07-10 20:22 219
	runGame(Gametype::Puzzle, 0);
26ddb424 sago007 2011-06-09 20:06 220
}
26ddb424 sago007 2011-06-09 20:06 221
29edda2d sago007 2016-10-08 18:06 222
class RunSinglePlayerVsButton : public Button {
29edda2d sago007 2016-10-08 18:06 223
	virtual void doAction() override {
29edda2d sago007 2016-10-08 18:06 224
		runGame(Gametype::SinglePlayerVs, iGeneric1);
29edda2d sago007 2016-10-08 18:06 225
	}
29edda2d sago007 2016-10-08 18:06 226
};
26ddb424 sago007 2011-06-09 20:06 227
29edda2d sago007 2016-10-08 18:06 228
static void runTwoPlayerTimeTrial() {
de81e07d sago007 2016-07-10 20:22 229
	runGame(Gametype::TwoPlayerTimeTrial, 0);
b0222eff sago007 2012-04-22 15:06 230
}
b0222eff sago007 2012-04-22 15:06 231
29edda2d sago007 2016-10-08 18:06 232
static void runTwoPlayerVs() {
de81e07d sago007 2016-07-10 20:22 233
	runGame(Gametype::TwoPlayerVs, 0);
b0222eff sago007 2012-04-22 15:06 234
}
b0222eff sago007 2012-04-22 15:06 235
1029dfed Poul Sander 2019-03-13 17:22 236
static void SetAlwaysSoftwareLabel(Button* b) {
1029dfed Poul Sander 2019-03-13 17:22 237
	b->setLabel(Config::getInstance()->getInt("always-software")?
9c7fa9a1 sago007 2020-06-27 22:09 238
	            _("Always use software render: On")
9c7fa9a1 sago007 2020-06-27 22:09 239
	            : _("Always use software render: Off"));
1029dfed Poul Sander 2019-03-13 17:22 240
}
1029dfed Poul Sander 2019-03-13 17:22 241
5f8ce673 Poul Sander 2021-06-05 22:18 242
static void runSetMusicVolume(const char* cvar, const char* header) {
5f8ce673 Poul Sander 2021-06-05 22:18 243
	Menu volumeMenu(globalData.screen, header, true);
5f8ce673 Poul Sander 2021-06-05 22:18 244
	std::vector<Button_changeVolume> v;
5f8ce673 Poul Sander 2021-06-05 22:18 245
	v.emplace_back(cvar, 16);
5f8ce673 Poul Sander 2021-06-05 22:18 246
	v.emplace_back(cvar, 32);
5f8ce673 Poul Sander 2021-06-05 22:18 247
	v.emplace_back(cvar, 48);
5f8ce673 Poul Sander 2021-06-05 22:18 248
	v.emplace_back(cvar, 64);
5f8ce673 Poul Sander 2021-06-05 22:18 249
	v.emplace_back(cvar, 96);
5f8ce673 Poul Sander 2021-06-05 22:18 250
	v.emplace_back(cvar, 128);
5f8ce673 Poul Sander 2021-06-05 22:18 251
	v.emplace_back(cvar, 0);
5f8ce673 Poul Sander 2021-06-05 22:18 252
	for (Button_changeVolume& b : v) {
5f8ce673 Poul Sander 2021-06-05 22:18 253
		volumeMenu.addButton(&b);
5f8ce673 Poul Sander 2021-06-05 22:18 254
	}
5f8ce673 Poul Sander 2021-06-05 22:18 255
	RunGameState(volumeMenu);
5f8ce673 Poul Sander 2021-06-05 22:18 256
}
5f8ce673 Poul Sander 2021-06-05 22:18 257
e17d4be2 Poul Sander 2019-03-13 17:29 258
static void SetMusicLabel (Button* b) {
4482071a Poul Sander 2021-06-05 15:07 259
	if (globalData.MusicEnabled) {
4482071a Poul Sander 2021-06-05 15:07 260
		double volume = Config::getInstance()->getInt("volume_music");
4482071a Poul Sander 2021-06-05 15:07 261
		int volumePct = volume*100.0/MIX_MAX_VOLUME;
4482071a Poul Sander 2021-06-05 15:07 262
		b->setLabel(std::string(_("Music: "))+ std::to_string(volumePct)+"%" );
4482071a Poul Sander 2021-06-05 15:07 263
	}
4482071a Poul Sander 2021-06-05 15:07 264
	else {
4482071a Poul Sander 2021-06-05 15:07 265
		b->setLabel(_("Music: Off") );
4482071a Poul Sander 2021-06-05 15:07 266
	}
e17d4be2 Poul Sander 2019-03-13 17:29 267
}
e17d4be2 Poul Sander 2019-03-13 17:29 268
e17d4be2 Poul Sander 2019-03-13 17:29 269
static void SetSoundLabel (Button* b) {
4482071a Poul Sander 2021-06-05 15:07 270
	if (globalData.SoundEnabled) {
4482071a Poul Sander 2021-06-05 15:07 271
		double volume = Config::getInstance()->getInt("volume_sound");
4482071a Poul Sander 2021-06-05 15:07 272
		int volumePct = volume*100.0/MIX_MAX_VOLUME;
4482071a Poul Sander 2021-06-05 15:07 273
		b->setLabel(std::string(_("Sound: "))+ std::to_string(volumePct)+"%" );
4482071a Poul Sander 2021-06-05 15:07 274
	}
4482071a Poul Sander 2021-06-05 15:07 275
	else {
4482071a Poul Sander 2021-06-05 15:07 276
		b->setLabel(_("Sound: Off") );
4482071a Poul Sander 2021-06-05 15:07 277
	}
e17d4be2 Poul Sander 2019-03-13 17:29 278
}
e17d4be2 Poul Sander 2019-03-13 17:29 279
e17d4be2 Poul Sander 2019-03-13 17:29 280
static void SetFullscreenLabel (Button* b) {
e17d4be2 Poul Sander 2019-03-13 17:29 281
	b->setLabel(globalData.bFullscreen? _("Fullscreen: On") : _("Fullscreen: Off") );
e17d4be2 Poul Sander 2019-03-13 17:29 282
}
e17d4be2 Poul Sander 2019-03-13 17:29 283
1029dfed Poul Sander 2019-03-13 17:22 284
class AlwaysSoftwareRenderButton : public Button {
1029dfed Poul Sander 2019-03-13 17:22 285
	virtual void doAction() override {
1029dfed Poul Sander 2019-03-13 17:22 286
		Config::getInstance()->setInt("always-software", !Config::getInstance()->getInt("always-software"));
1029dfed Poul Sander 2019-03-13 17:22 287
		SetAlwaysSoftwareLabel(this);
1029dfed Poul Sander 2019-03-13 17:22 288
	}
1029dfed Poul Sander 2019-03-13 17:22 289
};
1029dfed Poul Sander 2019-03-13 17:22 290
29edda2d sago007 2016-10-08 18:06 291
class MusicButton : public Button {
29edda2d sago007 2016-10-08 18:06 292
	virtual void doAction() override {
5f8ce673 Poul Sander 2021-06-05 22:18 293
		runSetMusicVolume("volume_music", _("Music volume"));
5f8ce673 Poul Sander 2021-06-05 22:18 294
		globalData.MusicEnabled = (Config::getInstance()->getInt("volume_music") != 0);
e17d4be2 Poul Sander 2019-03-13 17:29 295
		SetMusicLabel(this);
29edda2d sago007 2016-10-08 18:06 296
	}
29edda2d sago007 2016-10-08 18:06 297
};
26ddb424 sago007 2011-06-09 20:06 298
29edda2d sago007 2016-10-08 18:06 299
class SoundButton : public Button {
29edda2d sago007 2016-10-08 18:06 300
	virtual void doAction() override {
5f8ce673 Poul Sander 2021-06-05 22:18 301
		runSetMusicVolume("volume_sound", _("Sound volume"));
5f8ce673 Poul Sander 2021-06-05 22:18 302
		globalData.MusicEnabled = (Config::getInstance()->getInt("volume_sound") != 0);
e17d4be2 Poul Sander 2019-03-13 17:29 303
		SetSoundLabel(this);
29edda2d sago007 2016-10-08 18:06 304
	}
29edda2d sago007 2016-10-08 18:06 305
};
29edda2d sago007 2016-10-08 18:06 306
29edda2d sago007 2016-10-08 18:06 307
class FullscreenButton : public Button {
29edda2d sago007 2016-10-08 18:06 308
	virtual void doAction() override {
72383a9e sago007 2016-10-30 11:56 309
		globalData.bFullscreen = !globalData.bFullscreen;
e17d4be2 Poul Sander 2019-03-13 17:29 310
		SetFullscreenLabel(this);
29edda2d sago007 2016-10-08 18:06 311
		ResetFullscreen();
29edda2d sago007 2016-10-08 18:06 312
	}
29edda2d sago007 2016-10-08 18:06 313
};
26ddb424 sago007 2011-06-09 20:06 314
29edda2d sago007 2016-10-08 18:06 315
static void buttonActionPlayer1Name() {
72383a9e sago007 2016-10-30 11:56 316
	if ( OpenDialogbox(200, 100, globalData.player1name, _("Enter player 1 name:")) ) {
acd79baf sago007 2015-11-22 19:37 317
		return;    //must save if true
acd79baf sago007 2015-11-22 19:37 318
	}
26ddb424 sago007 2011-06-09 20:06 319
}
26ddb424 sago007 2011-06-09 20:06 320
29edda2d sago007 2016-10-08 18:06 321
static void buttonActionPlayer2Name() {
72383a9e sago007 2016-10-30 11:56 322
	if ( OpenDialogbox(200, 100, globalData.player2name, _("Enter player 2 name:")) ) {
acd79baf sago007 2015-11-22 19:37 323
		return;    //must save if true
acd79baf sago007 2015-11-22 19:37 324
	}
26ddb424 sago007 2011-06-09 20:06 325
}
26ddb424 sago007 2011-06-09 20:06 326
29edda2d sago007 2016-10-08 18:06 327
static void buttonActionHighscores() {
c53e6443 sago007 2012-04-17 11:04 328
	OpenScoresDisplay();
26ddb424 sago007 2011-06-09 20:06 329
}
26ddb424 sago007 2011-06-09 20:06 330
ecef5838 sago007 2015-11-24 20:01 331
static void ChangeKeysMenu(long playernumber) {
72383a9e sago007 2016-10-30 11:56 332
	Menu km(globalData.screen,_("Change key bindings"),true);
c53e6443 sago007 2012-04-17 11:04 333
	Button_changekey bLeft(&keySettings[playernumber].left,_("Left") );
c53e6443 sago007 2012-04-17 11:04 334
	Button_changekey bRight(&keySettings[playernumber].right,_("Right") );
c53e6443 sago007 2012-04-17 11:04 335
	Button_changekey bUp(&keySettings[playernumber].up,_("Up") );
c53e6443 sago007 2012-04-17 11:04 336
	Button_changekey bDown(&keySettings[playernumber].down,_("Down") );
c53e6443 sago007 2012-04-17 11:04 337
	Button_changekey bPush(&keySettings[playernumber].push,_("Push") );
c53e6443 sago007 2012-04-17 11:04 338
	Button_changekey bSwitch(&keySettings[playernumber].change,_("Change") );
c53e6443 sago007 2012-04-17 11:04 339
	km.addButton(&bLeft);
c53e6443 sago007 2012-04-17 11:04 340
	km.addButton(&bRight);
c53e6443 sago007 2012-04-17 11:04 341
	km.addButton(&bUp);
c53e6443 sago007 2012-04-17 11:04 342
	km.addButton(&bDown);
c53e6443 sago007 2012-04-17 11:04 343
	km.addButton(&bPush);
c53e6443 sago007 2012-04-17 11:04 344
	km.addButton(&bSwitch);
20d77c6e sago007 2016-11-12 16:28 345
	RunGameState(km);
c53e6443 sago007 2012-04-17 11:04 346
}
c53e6443 sago007 2012-04-17 11:04 347
29edda2d sago007 2016-10-08 18:06 348
static void ChangeKeysMenu1() {
c53e6443 sago007 2012-04-17 11:04 349
	ChangeKeysMenu(0);
593aeae4 sago007 2011-06-25 22:42 350
}
593aeae4 sago007 2011-06-25 22:42 351
29edda2d sago007 2016-10-08 18:06 352
static void ChangeKeysMenu2() {
c53e6443 sago007 2012-04-17 11:04 353
	ChangeKeysMenu(2);
593aeae4 sago007 2011-06-25 22:42 354
}
fc8e3d6a sago007 2011-06-25 16:31 355
3affd2d6 Poul Sander 2020-12-27 15:56 356
static void PlayerConfigMenu() {
3affd2d6 Poul Sander 2020-12-27 15:56 357
	Menu pcm(globalData.screen,_("Player configuration"),true);
3affd2d6 Poul Sander 2020-12-27 15:56 358
	Button bPlayer1Name, bPlayer2Name;
3affd2d6 Poul Sander 2020-12-27 15:56 359
	Button bPlayer1Keys, bPlayer2Keys;
3affd2d6 Poul Sander 2020-12-27 15:56 360
	bPlayer1Name.setAction(buttonActionPlayer1Name);
3affd2d6 Poul Sander 2020-12-27 15:56 361
	bPlayer1Name.setLabel(_("Change player 1's name") );
3affd2d6 Poul Sander 2020-12-27 15:56 362
	bPlayer2Name.setAction(buttonActionPlayer2Name);
3affd2d6 Poul Sander 2020-12-27 15:56 363
	bPlayer2Name.setLabel(_("Change player 2's name") );
3affd2d6 Poul Sander 2020-12-27 15:56 364
	bPlayer1Keys.setAction(ChangeKeysMenu1);
3affd2d6 Poul Sander 2020-12-27 15:56 365
	bPlayer1Keys.setLabel(_("Change player 1's keys") );
3affd2d6 Poul Sander 2020-12-27 15:56 366
	bPlayer2Keys.setAction(ChangeKeysMenu2);
3affd2d6 Poul Sander 2020-12-27 15:56 367
	bPlayer2Keys.setLabel(_("Change player 2's keys") );
3affd2d6 Poul Sander 2020-12-27 15:56 368
	pcm.addButton(&bPlayer1Name);
3affd2d6 Poul Sander 2020-12-27 15:56 369
	pcm.addButton(&bPlayer2Name);
3affd2d6 Poul Sander 2020-12-27 15:56 370
	pcm.addButton(&bPlayer1Keys);
3affd2d6 Poul Sander 2020-12-27 15:56 371
	pcm.addButton(&bPlayer2Keys);
3affd2d6 Poul Sander 2020-12-27 15:56 372
	RunGameState(pcm);
3affd2d6 Poul Sander 2020-12-27 15:56 373
}
3affd2d6 Poul Sander 2020-12-27 15:56 374
3affd2d6 Poul Sander 2020-12-27 15:56 375
static void runModConfigMenu() {
3affd2d6 Poul Sander 2020-12-27 15:56 376
	ModConfigMenuState modmenu;
3affd2d6 Poul Sander 2020-12-27 15:56 377
	RunGameState(modmenu);
3affd2d6 Poul Sander 2020-12-27 15:56 378
}
3affd2d6 Poul Sander 2020-12-27 15:56 379
29edda2d sago007 2016-10-08 18:06 380
static void ConfigureMenu() {
72383a9e sago007 2016-10-30 11:56 381
	Menu cm(globalData.screen,_("Configuration"),true);
1029dfed Poul Sander 2019-03-13 17:22 382
	AlwaysSoftwareRenderButton bSoftware;
29edda2d sago007 2016-10-08 18:06 383
	MusicButton bMusic;
29edda2d sago007 2016-10-08 18:06 384
	SoundButton bSound;
29edda2d sago007 2016-10-08 18:06 385
	FullscreenButton buttonFullscreen;
3affd2d6 Poul Sander 2020-12-27 15:56 386
	Button bPlayerConfig;
3affd2d6 Poul Sander 2020-12-27 15:56 387
	Button bModConfig;
3affd2d6 Poul Sander 2020-12-27 15:56 388
	bPlayerConfig.setLabel(_("Player configuration") );
3affd2d6 Poul Sander 2020-12-27 15:56 389
	bPlayerConfig.setAction(PlayerConfigMenu);
3affd2d6 Poul Sander 2020-12-27 15:56 390
	bModConfig.setLabel(_("Configure mods"));
3affd2d6 Poul Sander 2020-12-27 15:56 391
	bModConfig.setAction(&runModConfigMenu);
1029dfed Poul Sander 2019-03-13 17:22 392
	SetAlwaysSoftwareLabel(&bSoftware);
e17d4be2 Poul Sander 2019-03-13 17:29 393
	SetMusicLabel(&bMusic);
e17d4be2 Poul Sander 2019-03-13 17:29 394
	SetSoundLabel(&bSound);
e17d4be2 Poul Sander 2019-03-13 17:29 395
	SetFullscreenLabel(&buttonFullscreen);
c53e6443 sago007 2012-04-17 11:04 396
	cm.addButton(&bMusic);
c53e6443 sago007 2012-04-17 11:04 397
	cm.addButton(&bSound);
1029dfed Poul Sander 2019-03-13 17:22 398
	cm.addButton(&bSoftware);
c53e6443 sago007 2012-04-17 11:04 399
	cm.addButton(&buttonFullscreen);
3affd2d6 Poul Sander 2020-12-27 15:56 400
	cm.addButton(&bPlayerConfig);
3affd2d6 Poul Sander 2020-12-27 15:56 401
	cm.addButton(&bModConfig);
20d77c6e sago007 2016-11-12 16:28 402
	RunGameState(cm);
26ddb424 sago007 2011-06-09 20:06 403
}
26ddb424 sago007 2011-06-09 20:06 404
29edda2d sago007 2016-10-08 18:06 405
static void SinglePlayerVsMenu() {
72383a9e sago007 2016-10-30 11:56 406
	Menu spvs(globalData.screen,_("Single player VS"),true);
29edda2d sago007 2016-10-08 18:06 407
	RunSinglePlayerVsButton d1,d2,d3,d4,d5,d6,d7;
67a32395 sago007 2012-04-19 18:40 408
	d1.setPopOnRun(true);
67a32395 sago007 2012-04-19 18:40 409
	d2.setPopOnRun(true);
67a32395 sago007 2012-04-19 18:40 410
	d3.setPopOnRun(true);
67a32395 sago007 2012-04-19 18:40 411
	d4.setPopOnRun(true);
67a32395 sago007 2012-04-19 18:40 412
	d5.setPopOnRun(true);
67a32395 sago007 2012-04-19 18:40 413
	d6.setPopOnRun(true);
67a32395 sago007 2012-04-19 18:40 414
	d7.setPopOnRun(true);
e68d08eb sago007 2013-11-15 22:33 415
	d1.iGeneric1 = 0;
e68d08eb sago007 2013-11-15 22:33 416
	d2.iGeneric1 = 1;
e68d08eb sago007 2013-11-15 22:33 417
	d3.iGeneric1 = 2;
e68d08eb sago007 2013-11-15 22:33 418
	d4.iGeneric1 = 3;
e68d08eb sago007 2013-11-15 22:33 419
	d5.iGeneric1 = 4;
e68d08eb sago007 2013-11-15 22:33 420
	d6.iGeneric1 = 5;
e68d08eb sago007 2013-11-15 22:33 421
	d7.iGeneric1 = 6;
67a32395 sago007 2012-04-19 18:40 422
	d1.setLabel(_("Very easy"));
67a32395 sago007 2012-04-19 18:40 423
	d2.setLabel(_("Easy"));
67a32395 sago007 2012-04-19 18:40 424
	d3.setLabel(_("Below normal"));
67a32395 sago007 2012-04-19 18:40 425
	d4.setLabel(_("Normal"));
67a32395 sago007 2012-04-19 18:40 426
	d5.setLabel(_("Above normal"));
67a32395 sago007 2012-04-19 18:40 427
	d6.setLabel(_("Hard"));
67a32395 sago007 2012-04-19 18:40 428
	d7.setLabel(_("Hardest"));
67a32395 sago007 2012-04-19 18:40 429
	spvs.addButton(&d1);
67a32395 sago007 2012-04-19 18:40 430
	spvs.addButton(&d2);
67a32395 sago007 2012-04-19 18:40 431
	spvs.addButton(&d3);
67a32395 sago007 2012-04-19 18:40 432
	spvs.addButton(&d4);
67a32395 sago007 2012-04-19 18:40 433
	spvs.addButton(&d5);
67a32395 sago007 2012-04-19 18:40 434
	spvs.addButton(&d6);
67a32395 sago007 2012-04-19 18:40 435
	spvs.addButton(&d7);
20d77c6e sago007 2016-11-12 16:28 436
	RunGameState(spvs);
67a32395 sago007 2012-04-19 18:40 437
}
67a32395 sago007 2012-04-19 18:40 438
29edda2d sago007 2016-10-08 18:06 439
static void MultiplayerMenu() {
72383a9e sago007 2016-10-30 11:56 440
	Menu mm(globalData.screen,_("Multiplayer"),true);
de81e07d sago007 2016-07-10 20:22 441
	Button bTT, bVs;
b0222eff sago007 2012-04-22 15:06 442
	bTT.setLabel(_("Two player - time trial"));
b0222eff sago007 2012-04-22 15:06 443
	bTT.setAction(runTwoPlayerTimeTrial);
b0222eff sago007 2012-04-22 15:06 444
	bVs.setLabel(_("Two player - vs"));
b0222eff sago007 2012-04-22 15:06 445
	bVs.setAction(runTwoPlayerVs);
b0222eff sago007 2012-04-22 15:06 446
	mm.addButton(&bTT);
b0222eff sago007 2012-04-22 15:06 447
	mm.addButton(&bVs);
20d77c6e sago007 2016-11-12 16:28 448
	RunGameState(mm);
b0222eff sago007 2012-04-22 15:06 449
}
b0222eff sago007 2012-04-22 15:06 450
d8fe60bd sago007 2018-04-02 16:15 451
static void runHowto() {
d8fe60bd sago007 2018-04-02 16:15 452
	HelpHowtoState howto;
d8fe60bd sago007 2018-04-02 16:15 453
	RunGameState(howto);
d8fe60bd sago007 2018-04-02 16:15 454
}
d8fe60bd sago007 2018-04-02 16:15 455
54d2d583 sago007 2018-04-05 17:52 456
static void runHelpGamepad() {
54d2d583 sago007 2018-04-05 17:52 457
	HelpGamepadState helpGamepad;
54d2d583 sago007 2018-04-05 17:52 458
	RunGameState(helpGamepad);
54d2d583 sago007 2018-04-05 17:52 459
}
54d2d583 sago007 2018-04-05 17:52 460
5147de4e Poul Sander 2018-05-06 12:59 461
static void runHelpAbout() {
5147de4e Poul Sander 2018-05-06 12:59 462
	HelpAboutState helpAbout;
5147de4e Poul Sander 2018-05-06 12:59 463
	RunGameState(helpAbout);
5147de4e Poul Sander 2018-05-06 12:59 464
}
5147de4e Poul Sander 2018-05-06 12:59 465
0471a1d3 sago007 2018-05-19 10:26 466
static void runCredits() {
0471a1d3 sago007 2018-05-19 10:26 467
	ShowFileState creditsFile;
0471a1d3 sago007 2018-05-19 10:26 468
	creditsFile.SetData("misc/AUTHORS", _("Credits"));
0471a1d3 sago007 2018-05-19 10:26 469
	RunGameState(creditsFile);
0471a1d3 sago007 2018-05-19 10:26 470
}
0471a1d3 sago007 2018-05-19 10:26 471
d8fe60bd sago007 2018-04-02 16:15 472
static void HelpMenu() {
d8fe60bd sago007 2018-04-02 16:15 473
	Menu m(globalData.screen, _("Help"), true);
d8fe60bd sago007 2018-04-02 16:15 474
	Button bHowto;
d8fe60bd sago007 2018-04-02 16:15 475
	bHowto.setLabel(_("How to"));
d8fe60bd sago007 2018-04-02 16:15 476
	bHowto.setAction(runHowto);
d8fe60bd sago007 2018-04-02 16:15 477
	m.addButton(&bHowto);
54d2d583 sago007 2018-04-05 17:52 478
	Button bGamepad;
54d2d583 sago007 2018-04-05 17:52 479
	bGamepad.setLabel(_("Gamepad"));
54d2d583 sago007 2018-04-05 17:52 480
	bGamepad.setAction(runHelpGamepad);
54d2d583 sago007 2018-04-05 17:52 481
	m.addButton(&bGamepad);
0471a1d3 sago007 2018-05-19 10:26 482
	Button bCredits;
0471a1d3 sago007 2018-05-19 10:26 483
	bCredits.setLabel(_("Credits"));
0471a1d3 sago007 2018-05-19 10:26 484
	bCredits.setAction(runCredits);
0471a1d3 sago007 2018-05-19 10:26 485
	m.addButton(&bCredits);
5147de4e Poul Sander 2018-05-06 12:59 486
	Button bAbout;
5147de4e Poul Sander 2018-05-06 12:59 487
	bAbout.setLabel(_("About"));
5147de4e Poul Sander 2018-05-06 12:59 488
	bAbout.setAction(runHelpAbout);
5147de4e Poul Sander 2018-05-06 12:59 489
	m.addButton(&bAbout);
d8fe60bd sago007 2018-04-02 16:15 490
	RunGameState(m);
d8fe60bd sago007 2018-04-02 16:15 491
}
d8fe60bd sago007 2018-04-02 16:15 492
2f331f0c sago007 2017-08-19 16:17 493
static void SinglePlayerMenu() {
2f331f0c sago007 2017-08-19 16:17 494
	Menu m(globalData.screen, _("Single player"), true);
2f331f0c sago007 2017-08-19 16:17 495
	Button bHi,bTimetrial1, bStageClear, bPuzzle, bVs1;
c53e6443 sago007 2012-04-17 11:04 496
	bHi.setLabel(_("Single player - endless") );
c53e6443 sago007 2012-04-17 11:04 497
	bHi.setAction(runSinglePlayerEndless);
c53e6443 sago007 2012-04-17 11:04 498
	bTimetrial1.setLabel(_("Single player - time trial") );
c53e6443 sago007 2012-04-17 11:04 499
	bTimetrial1.setAction(runSinglePlayerTimeTrial);
aede0664 sago007 2012-04-19 19:45 500
	bStageClear.setLabel(_("Single player - stage clear") );
aede0664 sago007 2012-04-19 19:45 501
	bStageClear.setAction(runStageClear);
c53e6443 sago007 2012-04-17 11:04 502
	bPuzzle.setLabel(_("Single player - puzzle mode") );
c53e6443 sago007 2012-04-17 11:04 503
	bPuzzle.setAction(runSinglePlayerPuzzle);
c53e6443 sago007 2012-04-17 11:04 504
	bVs1.setLabel(_("Single player - vs") );
67a32395 sago007 2012-04-19 18:40 505
	bVs1.setAction(SinglePlayerVsMenu);
2f331f0c sago007 2017-08-19 16:17 506
	m.addButton(&bHi);
2f331f0c sago007 2017-08-19 16:17 507
	m.addButton(&bTimetrial1);
2f331f0c sago007 2017-08-19 16:17 508
	m.addButton(&bStageClear);
2f331f0c sago007 2017-08-19 16:17 509
	m.addButton(&bPuzzle);
2f331f0c sago007 2017-08-19 16:17 510
	m.addButton(&bVs1);
2f331f0c sago007 2017-08-19 16:17 511
	RunGameState(m);
2f331f0c sago007 2017-08-19 16:17 512
}
2f331f0c sago007 2017-08-19 16:17 513
ccee1ad0 Poul Sander 2019-03-13 18:39 514
void SafeModeMenu() {
ccee1ad0 Poul Sander 2019-03-13 18:39 515
	if (Config::getInstance()->getInt("always-software")) {
ccee1ad0 Poul Sander 2019-03-13 18:39 516
		return;
ccee1ad0 Poul Sander 2019-03-13 18:39 517
	}
ccee1ad0 Poul Sander 2019-03-13 18:39 518
	InitMenues();
ccee1ad0 Poul Sander 2019-03-13 18:39 519
	Menu safeMode(globalData.screen, _("Game did not shutdown as it should"), true);
ccee1ad0 Poul Sander 2019-03-13 18:39 520
	Button bOnce;
ccee1ad0 Poul Sander 2019-03-13 18:39 521
	Button bAlways;
ccee1ad0 Poul Sander 2019-03-13 18:39 522
	bOnce.setLabel(_("Use software renderer this time"));
ccee1ad0 Poul Sander 2019-03-13 18:39 523
	bAlways.setLabel(_("Always use software renderer"));
ccee1ad0 Poul Sander 2019-03-13 18:39 524
	bOnce.setPopOnRun(true);
9c7fa9a1 sago007 2020-06-27 22:09 525
	bAlways.setAction([]() {
9c7fa9a1 sago007 2020-06-27 22:09 526
		Config::getInstance()->setInt("always-software", 1);
9c7fa9a1 sago007 2020-06-27 22:09 527
	});
ccee1ad0 Poul Sander 2019-03-13 18:39 528
	bAlways.setPopOnRun(true);
ccee1ad0 Poul Sander 2019-03-13 18:39 529
	safeMode.addButton(&bOnce);
ccee1ad0 Poul Sander 2019-03-13 18:39 530
	safeMode.addButton(&bAlways);
ccee1ad0 Poul Sander 2019-03-13 18:39 531
	RunGameState(safeMode);
ccee1ad0 Poul Sander 2019-03-13 18:39 532
}
ccee1ad0 Poul Sander 2019-03-13 18:39 533
2f331f0c sago007 2017-08-19 16:17 534
void MainMenu() {
2f331f0c sago007 2017-08-19 16:17 535
	InitMenues();
2f331f0c sago007 2017-08-19 16:17 536
	Menu m(globalData.screen,_("Block Attack - Rise of the blocks"),false);
d8fe60bd sago007 2018-04-02 16:15 537
	Button bHi, bMulti, bConfigure, bHighscore, bHelp;
2f331f0c sago007 2017-08-19 16:17 538
	bHi.setLabel(_("Single player") );
2f331f0c sago007 2017-08-19 16:17 539
	bHi.setAction(SinglePlayerMenu);
b0222eff sago007 2012-04-22 15:06 540
	bMulti.setLabel(_("Multi player") );
b0222eff sago007 2012-04-22 15:06 541
	bMulti.setAction(MultiplayerMenu);
c53e6443 sago007 2012-04-17 11:04 542
	bConfigure.setLabel(_("Configure") );
c53e6443 sago007 2012-04-17 11:04 543
	bConfigure.setAction(ConfigureMenu);
c53e6443 sago007 2012-04-17 11:04 544
	bHighscore.setLabel(_("Highscores") );
c53e6443 sago007 2012-04-17 11:04 545
	bHighscore.setAction(buttonActionHighscores);
d8fe60bd sago007 2018-04-02 16:15 546
	bHelp.setLabel(_("Help"));
d8fe60bd sago007 2018-04-02 16:15 547
	bHelp.setAction(HelpMenu);
c53e6443 sago007 2012-04-17 11:04 548
	m.addButton(&bHi);
b0222eff sago007 2012-04-22 15:06 549
	m.addButton(&bMulti);
c53e6443 sago007 2012-04-17 11:04 550
	m.addButton(&bConfigure);
c53e6443 sago007 2012-04-17 11:04 551
	m.addButton(&bHighscore);
d8fe60bd sago007 2018-04-02 16:15 552
	m.addButton(&bHelp);
95ab6b0d sago007 2016-11-12 16:11 553
	RunGameState(m);
593aeae4 sago007 2011-06-25 22:42 554
}
1970-01-01 00:00 555