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

Method drawEmptyState

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

Source from the content-addressed store, hash-verified

268}
269
270void SettingsScreen::drawEmptyState(const std::string& title, const std::string& body) const
271{
272 C2D_DrawRectSolid(140, 74, 0.5f, 40, 40, COLOR_CARD);
273 Gui::drawOutline(140, 74, 40, 40, 1, COLOR_LINE);
274 const float gw = TextPool::get().width(GLYPH_EMPTY, 0.7f);
275 const float lf = fontGetInfo(NULL)->lineFeed;
276 TextPool::get().draw(GLYPH_EMPTY, 140 + (40 - gw) / 2, 74 + (40 - 0.7f * lf) / 2, 0.7f, COLOR_FAINT);
277 float w = TextPool::get().width(title, 0.5f);
278 TextPool::get().draw(title, ceilf((320 - w) / 2), 124, 0.5f, COLOR_MUTED);
279 TextPool::get().drawWrapped(body, 160, 146, 0.4f, COLOR_FAINT, 240.0f, 0.5f, C2D_AlignCenter);
280}
281
282void SettingsScreen::drawTop(void) const
283{

Callers

nothing calls this directly

Calls 5

drawOutlineFunction · 0.85
getFunction · 0.85
drawWrappedMethod · 0.80
widthMethod · 0.45
drawMethod · 0.45

Tested by

no test coverage detected