| 48 | } |
| 49 | |
| 50 | void 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 | |
| 70 | std::string ScriptPickerOverlay::bottomHints(void) const |
| 71 | { |