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

Method drawListRow

3ds/source/SettingsScreen.cpp:250–265  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

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