| 341 | } |
| 342 | |
| 343 | void SettingsScreen::drawGeneral(void) const |
| 344 | { |
| 345 | Configuration& cfg = Configuration::getInstance(); |
| 346 | const bool vals[GENERAL_COUNT] = {cfg.theme() == "light", cfg.shouldScanCard(), cfg.nandSaves(), cfg.dsiwareSaves(), cfg.transferEnabled(), |
| 347 | cfg.confirmRestore(), cfg.quickBackup()}; |
| 348 | // Windowed like the Library/Folders lists: more rows than fit scroll under a |
| 349 | // right-edge scrollbar. Stride 34 matches drawScrollbar's track geometry. |
| 350 | for (int i = 0; i < VISIBLE_ROWS && contentOffset + i < (int)GENERAL_ROW_TOTAL; i++) { |
| 351 | const int idx = contentOffset + i; |
| 352 | const int rowY = 30 + i * 34; |
| 353 | if (idx == LANGUAGE_ROW) { |
| 354 | drawValueRow(rowY, i18n::t("settings.general.language"), i18n::t("settings.general.language.sub"), languageName(i18n::language()), |
| 355 | contentFocus && contentCursor == idx); |
| 356 | } |
| 357 | else { |
| 358 | // Toggles follow the language row, so shift by one into the toggle arrays. |
| 359 | const int g = idx - 1; |
| 360 | drawToggleRow(rowY, i18n::t(GENERAL_ROWS[g].nameKey), i18n::t(GENERAL_ROWS[g].subKey), vals[g], contentFocus && contentCursor == idx); |
| 361 | } |
| 362 | } |
| 363 | drawScrollbar((int)GENERAL_ROW_TOTAL); |
| 364 | if (contentFocus) { |
| 365 | drawHints(320, 223, |
| 366 | std::string(GLYPH_DPAD) + " " + i18n::t("hint.move") + " " + GLYPH_A + " " + i18n::t("hint.toggle") + " " + GLYPH_B + " " + |
| 367 | i18n::t("hint.back")); |
| 368 | } |
| 369 | else { |
| 370 | drawHints(320, 223, std::string(GLYPH_A) + " " + i18n::t("hint.edit")); |
| 371 | } |
| 372 | } |
| 373 | |
| 374 | void SettingsScreen::drawFolders(void) const |
| 375 | { |
nothing calls this directly
no test coverage detected