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

Method drawValueRow

3ds/source/SettingsScreen.cpp:235–248  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

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