0x004CB164
| 103 | |
| 104 | // 0x004CB164 |
| 105 | void ImageButton::draw(Gfx::DrawingContext& drawingCtx, const Widget& widget, const WidgetState& widgetState) |
| 106 | { |
| 107 | if (!widgetState.disabled && widgetState.hovered) |
| 108 | { |
| 109 | // TODO: Fix mixed windows |
| 110 | draw_3(drawingCtx, widget, widgetState); |
| 111 | return; |
| 112 | } |
| 113 | |
| 114 | auto* window = widgetState.window; |
| 115 | |
| 116 | const auto pos = window->position() + widget.position(); |
| 117 | const auto size = widget.size(); |
| 118 | |
| 119 | if (widgetState.activated) |
| 120 | { |
| 121 | auto flags = widgetState.flags; |
| 122 | flags |= Gfx::RectInsetFlags::borderInset; |
| 123 | if (widget.content == Widget::kContentUnk) |
| 124 | { |
| 125 | // 0x004CABE8 |
| 126 | |
| 127 | flags |= Gfx::RectInsetFlags::fillNone; |
| 128 | drawingCtx.fillRectInset(pos, size, widgetState.colour, flags); |
| 129 | |
| 130 | return; |
| 131 | } |
| 132 | |
| 133 | drawingCtx.fillRectInset(pos, size, widgetState.colour, flags); |
| 134 | } |
| 135 | |
| 136 | if (widget.content == Widget::kContentNull) |
| 137 | { |
| 138 | return; |
| 139 | } |
| 140 | |
| 141 | drawImage(drawingCtx, widget, widgetState); |
| 142 | } |
| 143 | } |
nothing calls this directly
no test coverage detected