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

Method drawEmptyState

3ds/source/SettingsScreen.cpp:272–282  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

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