Skip to content

Commit

Permalink
fixup! feat(ui): add keybinding for target radial
Browse files Browse the repository at this point in the history
  • Loading branch information
mwerle committed Nov 12, 2024
1 parent c4a7479 commit 894b7ad
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions data/pigui/modules/flight-ui/reticule.lua
Original file line number Diff line number Diff line change
Expand Up @@ -322,8 +322,9 @@ local function displayDetailData(target, radius, colorLight, colorDark, tooltip,
local uiPos = ui.pointOnClock(center, radius, 2.46)
-- label of target
local nameSize = ui.addStyledText(uiPos, ui.anchor.left, ui.anchor.baseline, target.label, colorDark, pionillium.medium, tooltip, colors.lightBlackBackground)
if ui.isMouseHoveringRect(uiPos - Vector2(0, pionillium.medium.size), uiPos + nameSize - Vector2(0, pionillium.medium.size)) and ui.isMouseClicked(1) and ui.noModifierHeld()
or bindings.targetRadial.action:IsJustActive() then
local isHovered = ui.isMouseHoveringRect(uiPos - Vector2(0, pionillium.medium.size), uiPos + nameSize - Vector2(0, pionillium.medium.size))
and ui.isMouseClicked(1) and ui.noModifierHeld()
if isHovered or bindings.targetRadial.action:IsJustActive() then
local action_binding = bindings.targetRadial.action:IsActive() and bindings.targetRadial.action
ui.openDefaultRadialMenu("game", target, uiPos, action_binding)
end
Expand Down

0 comments on commit 894b7ad

Please sign in to comment.