Skip to content

Commit

Permalink
rename to RadialDragger
Browse files Browse the repository at this point in the history
  • Loading branch information
clyfordv committed Apr 19, 2024
1 parent e52d22f commit 9e031d4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ local Dragger = import('/lua/maui/dragger.lua').Dragger
---@param eventKey string -- button code for the dragger, dragger will watch for this button to be released
---@param callbackTable table -- should be of the form {Func = function, Args = {}} or {Func = "$simCallbackString", Args = {}}
---@param minRadius? number -- optional radius, smaller than this will cancel the drag and do nothing
function AreaDragger(eventKey, callbackTable, minRadius)
function RadialDragger(eventKey, callbackTable, minRadius)

local view = import("/lua/ui/game/worldview.lua").viewLeft
if not view then
Expand Down
6 changes: 3 additions & 3 deletions lua/ui/game/commandmode.lua
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ local EnhancementQueueFile = import("/lua/ui/notify/enhancementqueue.lua")

local WorldView = import("/lua/ui/controls/worldview.lua")
local GameMain = import("/lua/ui/game/gamemain.lua")
local AreaDragger = import("/lua/ui/controls/draggers/areareclaim.lua").AreaDragger
local RadialDragger = import("/lua/ui/controls/draggers/radial.lua").RadialDragger

-- upvalue globals for performance
local IsKeyDown = IsKeyDown
Expand Down Expand Up @@ -501,9 +501,9 @@ end
function OnCommandIssued(command)

-- Area reclaim dragger, command mode only
--
-- '1' is the left mouse button KeyCode
if command.CommandType == 'Reclaim' and command.Target.EntityId and modeData.name == "RULEUCC_Reclaim" then
AreaDragger("1", { Func = 'ExtendReclaimOrder', Args = {} })
RadialDragger('1', { Func = 'ExtendReclaimOrder', Args = {} })
end

-- if we're trying to upgrade hives then this allows us to force the upgrade to happen immediately
Expand Down

0 comments on commit 9e031d4

Please sign in to comment.