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

Method drawLibrary

3ds/source/SettingsScreen.cpp:403–430  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

401}
402
403void SettingsScreen::drawLibrary(void) const
404{
405 const std::vector<Row>& rows = mLibraryRows;
406 if (rows.empty()) {
407 drawEmptyState(i18n::t("settings.library.empty.title"), i18n::t("settings.library.empty.body"));
408 }
409 else {
410 for (int i = 0; i < VISIBLE_ROWS && contentOffset + i < (int)rows.size(); i++) {
411 const Row& r = rows[contentOffset + i];
412 const int rowY = 30 + i * 34;
413 drawListRow(rowY, r.primary, r.secondary, r.pip, contentFocus && contentCursor == contentOffset + i, true);
414 }
415 drawScrollbar((int)rows.size());
416 }
417 if (!contentFocus) {
418 drawHints(320, 223, std::string(GLYPH_A) + " " + i18n::t("hint.edit"));
419 }
420 else if (rows.empty()) {
421 drawHints(320, 223,
422 std::string(GLYPH_A) + " " + i18n::t("hint.add_favorite") + " " + GLYPH_Y + " " + i18n::t("hint.hide") + " " + GLYPH_B + " " +
423 i18n::t("hint.back"));
424 }
425 else {
426 drawHints(320, 223,
427 std::string(GLYPH_A) + " " + i18n::t("hint.add_fav") + " " + GLYPH_Y + " " + i18n::t("hint.hide") + " " + GLYPH_X + " " +
428 i18n::t("hint.remove") + " " + GLYPH_B + " " + i18n::t("hint.back"));
429 }
430}
431
432void SettingsScreen::drawNetwork(void) const
433{

Callers

nothing calls this directly

Calls 4

drawHintsFunction · 0.85
stringFunction · 0.85
emptyMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected