| 123 | } |
| 124 | |
| 125 | void 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 | } |
no test coverage detected