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

Method drawEmptyState

3ds/source/SettingsScreen.cpp:267–277  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

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