NDui

NDui

143k Downloads

objectivetracker的心能栏位置判断有问题

fafaraway opened this issue · 8 comments

commented

我的objectivetracker是在右侧的,但是心能栏点开也在右侧

Wow 2020-12-10 06-28-06

commented


你把这个frame改成ScenarioBlocksFrame看看

commented

这样不行
我自己是这样弄的

local function GetMawBuffsAnchor(frame)
	local center = frame:GetCenter()
	if center and center < C.ScreenWidth/2 * C.Mult then
		return "LEFT"
	else
		return "RIGHT"
	end
end

*C.Mult能获得真实的尺寸,然后再判断位置就正确了

commented

我这里试了都正常啊

commented

是UI缩放引起的
如果我使用正常的UI缩放,也就是那个 GetBestScale() 得到的值,就正常
但是我的分辨率是 3840*2160,默认的最佳分辨率什么都看不清,必须要 *2
然后这个位置判断就不对了

Wow 2020-12-10 20-51-15

commented

这个时候你的screenwidth是多少,以及ScenarioBlocksFrame:GetCenter的数值

commented

这是使用默认的uiscale
1

这是我用的uiscale*2
2

commented

你再看看GetScreenWidth和GetPhysicalScreenSize

commented

uiscale = 1
4

uiscale * 2
3