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

Method drawListRow

3ds/source/SettingsScreen.cpp:255–270  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

253}
254
255void SettingsScreen::drawListRow(int y, const std::string& primary, const std::string& secondary, u32 pipColor, bool focused, bool removable) const
256{
257 const int rowH = 32;
258 if (focused) {
259 C2D_DrawRectSolid(6, y, 0.5f, 308, rowH, C2D_Color32(122, 66, 196, 40));
260 Gui::drawOutline(6, y, 308, rowH, 1, COLOR_ACCENT);
261 }
262 C2D_DrawRectSolid(14, y + (rowH - 7) / 2, 0.5f, 7, 7, pipColor);
263 TextPool::get().draw(TextPool::get().truncate(primary, 250, 0.44f), 28, y + 4, 0.44f, COLOR_TEXT);
264 TextPool::get().draw(TextPool::get().truncate(secondary, 270, 0.36f), 28, y + 18, 0.36f, COLOR_FAINT);
265 if (removable && focused) {
266 std::string tag = std::string(GLYPH_X);
267 float w = TextPool::get().width(tag, 0.44f);
268 TextPool::get().draw(tag, 320 - 14 - w, y + 8, 0.44f, COLOR_DANGER);
269 }
270}
271
272void SettingsScreen::drawEmptyState(const std::string& title, const std::string& body) const
273{

Callers

nothing calls this directly

Calls 6

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

Tested by

no test coverage detected