MCPcopy Create free account
hub / github.com/BernardoGiordano/Checkpoint / drawGeneral

Method drawGeneral

3ds/source/SettingsScreen.cpp:343–372  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

341}
342
343void 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
374void SettingsScreen::drawFolders(void) const
375{

Callers

nothing calls this directly

Calls 10

drawHintsFunction · 0.85
stringFunction · 0.85
shouldScanCardMethod · 0.80
nandSavesMethod · 0.80
dsiwareSavesMethod · 0.80
transferEnabledMethod · 0.80
confirmRestoreMethod · 0.80
quickBackupMethod · 0.80
languageNameFunction · 0.70
themeMethod · 0.45

Tested by

no test coverage detected