From c8b11158a45072245b9ab45417b0cd9f76f656d6 Mon Sep 17 00:00:00 2001 From: lL1l1 <82986251+lL1l1@users.noreply.github.com> Date: Sat, 6 Jul 2024 00:55:22 -0700 Subject: [PATCH] Do not show the radial dragger when the mouse did not move (#6312) --- changelog/snippets/features.6095.md | 1 + lua/ui/controls/draggers/radial.lua | 4 ++++ 2 files changed, 5 insertions(+) create mode 100644 changelog/snippets/features.6095.md diff --git a/changelog/snippets/features.6095.md b/changelog/snippets/features.6095.md new file mode 100644 index 0000000000..459e6a2fe1 --- /dev/null +++ b/changelog/snippets/features.6095.md @@ -0,0 +1 @@ +- (#6095, #6312) Implement a new area attack order when you left click and drag while issuing an attack command. It issues extra orders within the radius of the command which you can then distribute to spread out the attacks. diff --git a/lua/ui/controls/draggers/radial.lua b/lua/ui/controls/draggers/radial.lua index b256801b8a..1321eabe96 100644 --- a/lua/ui/controls/draggers/radial.lua +++ b/lua/ui/controls/draggers/radial.lua @@ -66,6 +66,10 @@ RadialDragger = Class(Dragger) { self.ShapeStart = trash:Add(UIRenderableCircle(view, 'rectangle-dragger-start', mouseWorldPosition[1], mouseWorldPosition[2], mouseWorldPosition[3], size, 'ffffff', thickness)) + if minimumDistance > 0 then + self.ShapeStart:Hide() + end + self.Origin = mouseWorldPosition -- register the dragger