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

Function drawHints

3ds/source/MainScreen.cpp:94–99  ·  view source on GitHub ↗

Draws a single button-glyph footer hint line, centered on `screenW`. The line shrinks rather than truncates: drawCentered() would ellipsize a hint that overflows, and a footer that silently drops its last hint is worse than one set a couple of points smaller.

Source from the content-addressed store, hash-verified

92 // overflows, and a footer that silently drops its last hint is worse than one
93 // set a couple of points smaller.
94 void drawHints(int screenW, int y, const std::string& text)
95 {
96 TextPool& pool = TextPool::get();
97 const float scale = pool.fitScale(text, (float)screenW - 8.0f, 0.47f, 0.40f);
98 pool.drawCentered(text, 0, screenW, y, scale, COLOR_MUTED);
99 }
100
101 // Layout of the Save / Extdata segmented control in the bottom header. Both
102 // drawBottom() and the touch hit-test derive from this so the box and the

Callers 8

drawTopMethod · 0.85
drawGeneralMethod · 0.85
drawFoldersMethod · 0.85
drawLibraryMethod · 0.85
drawNetworkMethod · 0.85
drawAboutMethod · 0.85
drawTopMethod · 0.85
drawBottomMethod · 0.85

Calls 3

getFunction · 0.85
fitScaleMethod · 0.80
drawCenteredMethod · 0.80

Tested by

no test coverage detected