()
| 3618 | func (c *UIClock) Update() {} |
| 3619 | |
| 3620 | func (c *UIClock) Draw() { |
| 3621 | |
| 3622 | rect := c.Rect |
| 3623 | if c.WorldSpace { |
| 3624 | rect = globals.Project.Camera.TranslateRect(rect) |
| 3625 | } |
| 3626 | |
| 3627 | center := Vector{ |
| 3628 | rect.X + (rect.W / 2), |
| 3629 | rect.Y + (rect.H / 2), |
| 3630 | } |
| 3631 | |
| 3632 | radius := rect.W / 2 |
| 3633 | |
| 3634 | end := center.Add(Vector{0, -radius + 8}.Rotate(c.Rotation * math.Pi * 2)) |
| 3635 | |
| 3636 | FilledCircleColor(int32(rect.X+(rect.W/2)), int32(rect.Y+(rect.H/2)), int32(radius-4), c.EdgeColor) |
| 3637 | FilledCircleColor(int32(rect.X+(rect.W/2)), int32(rect.Y+(rect.H/2)), int32(radius-8), c.FillColor) |
| 3638 | ThickLine(center, end, 4, getThemeColor(GUIFontColor)) |
| 3639 | |
| 3640 | } |
| 3641 | |
| 3642 | func (c *UIClock) Rectangle() *sdl.FRect { |
| 3643 | return c.Rect |
nothing calls this directly
no test coverage detected