mirror of
https://github.com/rwengine/openrw.git
synced 2024-11-22 10:22:52 +01:00
Merge pull request #464 from husho/patch-1
Debug menu off by 1 error fix
This commit is contained in:
commit
03784a2a41
@ -212,9 +212,9 @@ std::shared_ptr<Menu> DebugState::createWeatherMenu() {
|
|||||||
Menu::create({{"Back", [=] { this->enterMenu(createDebugMenu()); }}},
|
Menu::create({{"Back", [=] { this->enterMenu(createDebugMenu()); }}},
|
||||||
kDebugFont, kDebugEntryHeight);
|
kDebugFont, kDebugEntryHeight);
|
||||||
|
|
||||||
std::string w[4]{"Sunny", "Cloudy", "Rainy", "Foggy"};
|
const std::array<std::string, 4> w {"Sunny", "Cloudy", "Rainy", "Foggy"};
|
||||||
|
|
||||||
for (int i = 0; i < 4; ++i) {
|
for (int i = 0; i < w.size(); ++i) {
|
||||||
menu->lambda(w[i],
|
menu->lambda(w[i],
|
||||||
[=] { game->getWorld()->state->basic.nextWeather = i; });
|
[=] { game->getWorld()->state->basic.nextWeather = i; });
|
||||||
}
|
}
|
||||||
@ -228,7 +228,7 @@ std::shared_ptr<Menu> DebugState::createMissionsMenu() {
|
|||||||
Menu::create({{"Back", [=] { this->enterMenu(createDebugMenu()); }}},
|
Menu::create({{"Back", [=] { this->enterMenu(createDebugMenu()); }}},
|
||||||
kDebugFont, kDebugEntryHeightMissions);
|
kDebugFont, kDebugEntryHeightMissions);
|
||||||
|
|
||||||
std::string w[80]{
|
const std::array<std::string, 80> w {
|
||||||
"Intro Movie",
|
"Intro Movie",
|
||||||
"Hospital Info Scene",
|
"Hospital Info Scene",
|
||||||
"Police Station Info Scene",
|
"Police Station Info Scene",
|
||||||
@ -311,7 +311,7 @@ std::shared_ptr<Menu> DebugState::createMissionsMenu() {
|
|||||||
"The Exchange",
|
"The Exchange",
|
||||||
};
|
};
|
||||||
|
|
||||||
for (int i = 0; i < 79; ++i) {
|
for (int i = 0; i < w.size(); ++i) {
|
||||||
menu->lambda(w[i], [=] {
|
menu->lambda(w[i], [=] {
|
||||||
ScriptMachine* vm = game->getScriptVM();
|
ScriptMachine* vm = game->getScriptVM();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user