MCPcopy Create free account
hub / github.com/bfbbdecomp/bfbb / RenderText

Function RenderText

src/SB/Core/x/xTRC.cpp:125–143  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

123}
124
125void RenderText(const char* text, bool enabled)
126{
127 static xtextbox tb =
128 xtextbox::create(xfont::create(1, NSCREENX(19.0f), NSCREENY(22.0f), 0.0f,
129 xColorFromRGBA(0xFF, 0xE6, 0x00, 0xFF), screen_bounds),
130 screen_bounds, 0x2, 0.0f, 0.0f, 0.0f, 0.0f);
131
132 tb.set_text(enabled ? text : "");
133 tb.bounds = screen_bounds;
134 tb.bounds.contract(0.1f);
135 tb.bounds.h = tb.yextent(true);
136 tb.bounds.y = -(0.5f * tb.bounds.h - 0.5f);
137 tb.render(true);
138
139 if (!enabled)
140 {
141 render_fill_rect(tb.font.clip, xColorFromRGBA(0, 0, 0, 0xC8));
142 }
143}

Callers 2

render_mem_card_no_spaceFunction · 0.70
zMainMemCardRenderTextFunction · 0.50

Calls 8

NSCREENXFunction · 0.85
NSCREENYFunction · 0.85
xColorFromRGBAFunction · 0.85
render_fill_rectFunction · 0.70
createFunction · 0.50
set_textMethod · 0.45
yextentMethod · 0.45
renderMethod · 0.45

Tested by

no test coverage detected