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

Method drawValueRow

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

Source from the content-addressed store, hash-verified

238}
239
240void SettingsScreen::drawValueRow(int y, const std::string& name, const std::string& sub, const std::string& value, bool focused) const
241{
242 const int rowH = 32;
243 if (focused) {
244 C2D_DrawRectSolid(6, y, 0.5f, 308, rowH, C2D_Color32(122, 66, 196, 40));
245 Gui::drawOutline(6, y, 308, rowH, 1, COLOR_ACCENT);
246 }
247 TextPool::get().draw(name, 14, y + 4, 0.44f, COLOR_TEXT);
248 TextPool::get().draw(sub, 14, y + 18, 0.36f, COLOR_FAINT);
249
250 // Right-aligned value in the accent color, matching the toggle's right edge.
251 const float vw = TextPool::get().width(value, 0.44f);
252 TextPool::get().draw(value, 320 - 14 - vw, y + (rowH - 0.44f * fontGetInfo(NULL)->lineFeed) / 2, 0.44f, COLOR_ACCENT);
253}
254
255void SettingsScreen::drawListRow(int y, const std::string& primary, const std::string& secondary, u32 pipColor, bool focused, bool removable) const
256{

Callers

nothing calls this directly

Calls 4

drawOutlineFunction · 0.85
getFunction · 0.85
drawMethod · 0.45
widthMethod · 0.45

Tested by

no test coverage detected