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

Method drawRowContent

3ds/source/ScriptPickerOverlay.cpp:50–68  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

48}
49
50void ScriptPickerOverlay::drawRowContent(int k, int rowY, bool selected) const
51{
52 TextPool& text = TextPool::get();
53 const ScriptCatalog::Entry& entry = mEntries[k];
54 const std::string tag = entry.universal ? i18n::t("scripts.universal_tag") : mTitleTag;
55 const float tagW = text.width(tag, 0.42f);
56 const float tagX = 364 - tagW;
57
58 // "override" marker (an SD file shadowing a bundled one), left of the tag.
59 float ovrW = 0;
60 if (entry.overridden) {
61 const std::string ovr = i18n::t("scripts.overridden_tag");
62 ovrW = text.width(ovr, 0.42f) + 10;
63 text.draw(ovr, tagX - ovrW, rowY + 6, 0.42f, COLOR_GOLD, OVERLAY_Z);
64 }
65
66 text.draw(text.truncate(entry.name, 320 - (int)tagW - (int)ovrW, 0.46f), 40, rowY + 5, 0.46f, selected ? COLOR_TEXT : COLOR_MUTED, OVERLAY_Z);
67 text.draw(tag, tagX, rowY + 6, 0.42f, COLOR_FAINT, OVERLAY_Z);
68}
69
70std::string ScriptPickerOverlay::bottomHints(void) const
71{

Callers

nothing calls this directly

Calls 4

getFunction · 0.85
truncateMethod · 0.80
widthMethod · 0.45
drawMethod · 0.45

Tested by

no test coverage detected