| 244 | } |
| 245 | |
| 246 | void Button::DrawButtonLabel(surface_t* surface, bool white){ |
| 247 | rgba_colour_t colour; |
| 248 | vector2i_t btnPos = fixedBounds.pos; |
| 249 | |
| 250 | if(white){ |
| 251 | colour = colours[Colour::TextAlternate]; |
| 252 | } else { |
| 253 | colour = colours[Colour::Text]; |
| 254 | } |
| 255 | |
| 256 | if(labelAlignment == TextAlignment::Centre){ |
| 257 | Graphics::DrawString(label.c_str(), btnPos.x + (fixedBounds.size.x / 2) - (labelLength / 2), btnPos.y + (bounds.size.y / 2 - 8), colour.r, colour.g, colour.b, surface); |
| 258 | } else { |
| 259 | Graphics::DrawString(label.c_str(), btnPos.x + 2, btnPos.y + (fixedBounds.size.y / 2 - 6), colour.r, colour.g, colour.b, surface); |
| 260 | } |
| 261 | } |
| 262 | |
| 263 | void Button::Paint(surface_t* surface){ |
| 264 | vector2i_t btnPos = fixedBounds.pos; |
nothing calls this directly
no test coverage detected