mirror of
https://github.com/DarkStore-3DS/DarkStore.git
synced 2026-07-03 00:39:02 +00:00
Fix a few problems.
This commit is contained in:
@@ -32,6 +32,12 @@
|
||||
|
||||
extern bool touching(touchPosition touch, Structs::ButtonPos button);
|
||||
|
||||
int selectedLang;
|
||||
|
||||
Settings::Settings() {
|
||||
selectedLang = Config::lang;
|
||||
}
|
||||
|
||||
void Settings::Draw(void) const {
|
||||
if (mode == 0) {
|
||||
DrawSubMenu();
|
||||
@@ -49,7 +55,7 @@ void Settings::DrawSubMenu(void) const {
|
||||
Gui::DrawTop();
|
||||
Gui::DrawString((400-Gui::GetStringWidth(0.8f, "Universal-Updater"))/2, 2, 0.8f, Config::TxtColor, "Universal-Updater", 400);
|
||||
Gui::DrawBottom();
|
||||
Gui::DrawArrow(0, 242, 270.0);
|
||||
Gui::DrawArrow(0, 218, 0, 1);
|
||||
|
||||
for (int i = 0; i < 3; i++) {
|
||||
if (Selection == i) {
|
||||
@@ -68,7 +74,7 @@ void Settings::DrawLanguageSelection(void) const {
|
||||
Gui::DrawTop();
|
||||
Gui::DrawString((400-Gui::GetStringWidth(0.8f, Lang::get("SELECT_LANG")))/2, 2, 0.8f, Config::TxtColor, Lang::get("SELECT_LANG"), 400);
|
||||
Gui::DrawBottom();
|
||||
Gui::DrawArrow(0, 242, 270.0);
|
||||
Gui::DrawArrow(0, 218, 0, 1);
|
||||
|
||||
for (int language = 0; language < 10; language++) {
|
||||
if (Config::lang == language) {
|
||||
@@ -111,10 +117,10 @@ void Settings::DrawColorChanging(void) const {
|
||||
|
||||
|
||||
Gui::DrawBottom();
|
||||
Gui::DrawArrow(0, 242, 270.0);
|
||||
Gui::DrawArrow(0, 218, 0, 1);
|
||||
|
||||
Gui::DrawArrow(0, 21, 270.0);
|
||||
Gui::DrawArrow(320, -5, 90.0);
|
||||
Gui::DrawArrow(0, 0, 0, 1);
|
||||
Gui::DrawArrow(318, 22, 180.0, 1);
|
||||
|
||||
for (int i = 0; i < 7; i++) {
|
||||
if (colorMode == i) {
|
||||
@@ -186,7 +192,7 @@ void Settings::DrawCreditsScreen(void) const {
|
||||
currentVersion += V_STRING;
|
||||
Gui::DrawString(395-Gui::GetStringWidth(0.72f, currentVersion), 218, 0.72f, Config::TxtColor, currentVersion, 400);
|
||||
Gui::DrawBottom();
|
||||
Gui::DrawArrow(0, 242, 270.0);
|
||||
Gui::DrawArrow(0, 218, 0, 1);
|
||||
Gui::DrawString((320-Gui::GetStringWidth(0.7f, Lang::get("MANY_THANKS")))/2, 1, 0.8f, Config::TxtColor, Lang::get("MANY_THANKS"), 320);
|
||||
Gui::DrawString((320-Gui::GetStringWidth(0.7f, Lang::get("TRANSLATORS")))/2, 40, 0.7f, Config::TxtColor, Lang::get("TRANSLATORS"), 320);
|
||||
Gui::DrawString((320-Gui::GetStringWidth(0.5f, Lang::get("HELP_TRANSLATE")))/2, 70, 0.5f, Config::TxtColor, Lang::get("HELP_TRANSLATE"), 320);
|
||||
@@ -201,7 +207,7 @@ void Settings::DrawCreditsScreen(void) const {
|
||||
Gui::sprite(sprites_discord_idx, 115, 35);
|
||||
Gui::DrawBottom();
|
||||
Gui::Draw_Rect(0, 0, 320, 240, C2D_Color32(0, 0, 0, 190));
|
||||
Gui::DrawArrow(0, 242, 270.0);
|
||||
Gui::DrawArrow(0, 218, 0, 1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -251,15 +257,50 @@ void Settings::SubMenuLogic(u32 hDown, u32 hHeld, touchPosition touch) {
|
||||
}
|
||||
|
||||
void Settings::LanguageSelection(u32 hDown, touchPosition touch) {
|
||||
|
||||
if (hDown & KEY_TOUCH) {
|
||||
for (int language = 0; language < 10; language++) {
|
||||
if (touching(touch, langBlocks[language])) {
|
||||
selectedLang = language;
|
||||
Config::lang = language;
|
||||
Lang::load(Config::lang);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (hDown & KEY_UP) {
|
||||
if(selectedLang > 0) {
|
||||
selectedLang--;
|
||||
Config::lang = selectedLang;
|
||||
Lang::load(Config::lang);
|
||||
}
|
||||
}
|
||||
|
||||
if (hDown & KEY_DOWN) {
|
||||
if(selectedLang < 9) {
|
||||
selectedLang++;
|
||||
Config::lang = selectedLang;
|
||||
Lang::load(Config::lang);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (hDown & KEY_LEFT) {
|
||||
if (selectedLang > 4) {
|
||||
selectedLang -= 5;
|
||||
Config::lang = selectedLang;
|
||||
Lang::load(Config::lang);
|
||||
}
|
||||
}
|
||||
|
||||
if (hDown & KEY_RIGHT) {
|
||||
if (selectedLang < 5) {
|
||||
selectedLang += 5;
|
||||
Config::lang = selectedLang;
|
||||
Lang::load(Config::lang);
|
||||
}
|
||||
}
|
||||
|
||||
if (hDown & KEY_B) {
|
||||
mode = 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user