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

Method drawListRow

3ds/source/SettingsScreen.cpp:253–268  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

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