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

Method drawGeneral

3ds/source/SettingsScreen.cpp:346–375  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

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