0x4CB2D6
| 9 | { |
| 10 | // 0x4CB2D6 |
| 11 | static void drawText(Gfx::DrawingContext& drawingCtx, const Widget& widget, const WidgetState& widgetStated) |
| 12 | { |
| 13 | if (widget.content == Widget::kContentNull || widget.content == Widget::kContentUnk) |
| 14 | { |
| 15 | return; |
| 16 | } |
| 17 | |
| 18 | auto colour = widgetStated.colour; |
| 19 | if (widgetStated.disabled) |
| 20 | { |
| 21 | colour = colour.inset(); |
| 22 | } |
| 23 | else |
| 24 | { |
| 25 | colour = colour.FD(); |
| 26 | } |
| 27 | |
| 28 | auto* window = widgetStated.window; |
| 29 | |
| 30 | const auto pos = window->position() + widget.position(); |
| 31 | const auto size = widget.size(); |
| 32 | |
| 33 | auto tr = Gfx::TextRenderer(drawingCtx); |
| 34 | auto formatArgs = FormatArgumentsView(widget.textArgs); |
| 35 | tr.drawStringLeftClipped(pos + Ui::Point{ 1, 1 }, size.width - 2, colour, widget.text, formatArgs); |
| 36 | } |
| 37 | |
| 38 | // 0x004CB164 |
| 39 | void ComboBox::draw(Gfx::DrawingContext& drawingCtx, const Widget& widget, const WidgetState& widgetState) |
no test coverage detected