Skip to content
This repository has been archived by the owner on Nov 24, 2023. It is now read-only.

Commit

Permalink
Default selected word list will be english 200
Browse files Browse the repository at this point in the history
  • Loading branch information
siddharthroy12 committed Aug 31, 2022
1 parent ddf0704 commit 066f628
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion src/Context.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#include <algorithm>
#include "Context.hpp"
#include "helpers.hpp"
#include "../libs/raylib/src/raylib.h"
Expand Down Expand Up @@ -66,7 +67,18 @@ void Context::load() {
}

this->selectedTheme = loadStorageValue(0, 0);
this->selectedWordList = loadStorageValue(1, 0);
this->selectedWordList = loadStorageValue(1, -1);
if (this->selectedWordList == -1) {
int index;

for (int i = 0; i < this->wordsLists.size(); i++) {
if (this->wordsLists[i].name == "English 200") {
index = i;
break;
}
}
this->selectedWordList = index;
}
this->testSettings.selectedAmount = loadStorageValue(2, 1);
this->testSettings.usePunctuation = loadStorageValue(3, 0);
this->testSettings.useNumbers = loadStorageValue(4, 0);
Expand Down

0 comments on commit 066f628

Please sign in to comment.