| 85 | } |
| 86 | |
| 87 | void xhud::text_widget::update(F32 dt) |
| 88 | { |
| 89 | updater(dt); |
| 90 | |
| 91 | tb.set_text(text); |
| 92 | tb.bounds.x = rc.loc.x; |
| 93 | tb.bounds.y = rc.loc.y; |
| 94 | tb.bounds.w = rc.size.x; |
| 95 | tb.bounds.h = rc.size.y; |
| 96 | tb.font.clip = tb.bounds; |
| 97 | |
| 98 | tb.font.color.r = (rc.r * 255.0f) + 0.5f; |
| 99 | tb.font.color.g = (rc.g * 255.0f) + 0.5f; |
| 100 | tb.font.color.b = (rc.b * 255.0f) + 0.5f; |
| 101 | tb.font.color.a = (rc.a * 255.0f) + 0.5f; |
| 102 | } |
| 103 | |
| 104 | void xhud::text_widget::render() |
| 105 | { |