AnySCT 0.3.0
This commit is contained in:
+13
-1
@@ -221,7 +221,7 @@ function P.PlatePosition(plate)
|
||||
return cx, cy, UIParent:GetWidth(), UIParent:GetHeight()
|
||||
end
|
||||
|
||||
-- Decide the display mode. opt needs: placement ("clamp" | "anchorOff" | "anchor"), noPlate
|
||||
-- Decide the display mode. opt needs: placement ("clamp" | "anchorOff" | "anchor" | "both"), noPlate
|
||||
-- ("anchor" | "hide"), edgeMargin. Returns mode, x, y, screenW, screenH (x, y only for mode 1/2).
|
||||
function P.Select(plate, opt)
|
||||
if opt.placement == "anchor" then return 3 end
|
||||
@@ -237,6 +237,18 @@ function P.Select(plate, opt)
|
||||
end
|
||||
AnySCT_SelectMode = P.Select
|
||||
|
||||
-- Placement "both": the plate rules of "clamp" (modes 1/2) plus a copy at the fixed anchor. Without a
|
||||
-- usable plate (none found, off screen with hide, or hidden) the anchor shows it once, whatever the
|
||||
-- no-plate setting says. Returns mode, x, y, screenW, screenH, alsoAnchor.
|
||||
function P.Places(plate, opt)
|
||||
local mode, x, y, w, h = P.Select(plate, opt)
|
||||
if opt.placement == "both" then
|
||||
if mode == 1 or mode == 2 then return mode, x, y, w, h, true end
|
||||
return 3
|
||||
end
|
||||
return mode, x, y, w, h, false
|
||||
end
|
||||
|
||||
-- Does the plate still show the mob? Uses the last scan only (no per-frame GetName).
|
||||
function P.PlateMatches(plate, guidNorm)
|
||||
if not plate:IsVisible() then return false end
|
||||
|
||||
Reference in New Issue
Block a user