Basic prototype of requesting the user to click on stuff.
| 146 | |
| 147 | // Basic prototype of requesting the user to click on stuff. |
| 148 | static void drawInteractionRequest(Gfx::DrawingContext& drawingCtx, const Widget& widget, WidgetState& state) |
| 149 | { |
| 150 | auto* window = state.window; |
| 151 | |
| 152 | Ui::Point localPos = {}; |
| 153 | |
| 154 | // Center of widget. |
| 155 | localPos.x = widget.left + ((widget.right - widget.left) / 2); |
| 156 | localPos.y = widget.top + ((widget.bottom - widget.top) / 2); |
| 157 | |
| 158 | auto radius = 4; |
| 159 | radius += (window->frameNo / 4) % 12; |
| 160 | |
| 161 | Ui::Point windowPos = state.window->position(); |
| 162 | drawingCtx.drawCircle(windowPos + localPos, radius, 2, PaletteIndex::red5); |
| 163 | } |
| 164 | |
| 165 | static void onUpdate(Ui::Window& window) |
| 166 | { |
no test coverage detected