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

Method drawLibrary

3ds/source/SettingsScreen.cpp:408–435  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

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