Skip to content
Snippets Groups Projects
Commit a3fdf481 authored by HoelShare's avatar HoelShare
Browse files

GPN

parent 15d17c47
No related branches found
No related tags found
No related merge requests found
...@@ -46,6 +46,8 @@ unsigned long lastChange = 0; ...@@ -46,6 +46,8 @@ unsigned long lastChange = 0;
unsigned long lastNotificationPull = 0; unsigned long lastNotificationPull = 0;
void setup() { void setup() {
SPIFFS.begin();
badge.init(); badge.init();
char *nickname = loadNick(); char *nickname = loadNick();
player = new Player(&badge, nickname); player = new Player(&badge, nickname);
...@@ -60,7 +62,6 @@ void setup() { ...@@ -60,7 +62,6 @@ void setup() {
role_menu->addMenuItem(new MenuItem("Join", joinGame)); role_menu->addMenuItem(new MenuItem("Join", joinGame));
ui->draw(); ui->draw();
rboot_config rboot_config = rboot_get_config(); rboot_config rboot_config = rboot_get_config();
SPIFFS.begin();
File f = SPIFFS.open("/rom" + String(rboot_config.current_rom), "w"); File f = SPIFFS.open("/rom" + String(rboot_config.current_rom), "w");
f.println("Lasertag\n"); f.println("Lasertag\n");
connectBadge(); connectBadge();
......
...@@ -14,7 +14,7 @@ void GameClient::createUIGameStart() { ...@@ -14,7 +14,7 @@ void GameClient::createUIGameStart() {
Serial.println("GameClient::createUIGameStart - new PlayerListMenu"); Serial.println("GameClient::createUIGameStart - new PlayerListMenu");
playerList->setLeftAction([=]() { this->player->prevWeapon(); }); playerList->setLeftAction([=]() { this->player->prevWeapon(); });
playerList->setRightAction([=]() { this->player->nextWeapon(); }); playerList->setRightAction([=]() { this->player->nextWeapon(); });
playerList->setDownAction([=]() { this->player->reload(); }); // playerList->setDownAction([=]() { this->player->reload(); });
playerList->setEnterAction([=]() { this->player->shot(); }); playerList->setEnterAction([=]() { this->player->shot(); });
Serial.println("GameClient::createUIGameStart - set Lambdas"); Serial.println("GameClient::createUIGameStart - set Lambdas");
MenuItem *healthMI = new MenuItem("100%", []() {}); MenuItem *healthMI = new MenuItem("100%", []() {});
...@@ -31,6 +31,7 @@ void GameClient::createUIGameStart() { ...@@ -31,6 +31,7 @@ void GameClient::createUIGameStart() {
playerList->addMenuItem(nameMI); playerList->addMenuItem(nameMI);
Serial.println("GameClient::createUIGameStart - added Lambdas"); Serial.println("GameClient::createUIGameStart - added Lambdas");
ui->open(playerList); ui->open(playerList);
playerList->setDirty();
Serial.println("GameClient::createUIGameStart - Ende"); Serial.println("GameClient::createUIGameStart - Ende");
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment