/
end |
end |
function MultiScreenSupport:ProfessionsFrame() |
local point, relativeTo, relativePoint, xOfs, yOfs = ProfessionsFrame:GetPoint() |
if relativeTo == nil or relativeTo:GetName() == UIParent:GetName() then |
if not InCombatLockdown() and MultiScreenSupportParent and relativePoint and point then |
ProfessionsFrame:ClearAllPoints() |
ProfessionsFrame:SetPoint(point, MultiScreenSupportParent, relativePoint, xOfs, yOfs) |
end |
end |
local timer = 0.5 |
if _G['multiscreensupportsave']['ProfessionsFrameFaster'] then |
timer = 0 |
end |
C_Timer.After(timer, function() |
MultiScreenSupport:ProfessionsFrame() |
end) |
end |
function MultiScreenSupport:setSpecificParentAnchor(frame) |
if frame ~= nil then |
local point, relativeTo, relativePoint, xOfs, yOfs = frame:GetPoint() |
if not(_G['multiscreensupportsave']['MSSVersion']) or _G['multiscreensupportsave']['MSSVersion'] < '4.3' then |
_G['multiscreensupportsave']['standart']["AlliedRacesFrame"] = true |
end |
if not(_G['multiscreensupportsave']['MSSVersion']) or _G['multiscreensupportsave']['MSSVersion'] < '6.1' then |
_G['multiscreensupportsave']['ProfessionsFrame'] = true |
_G['multiscreensupportsave']['ProfessionsFrameFaster'] = true |
end |
_G['multiscreensupportsave']["MSSVersion"] = MSSVersion |
end |
local allActiveFramesOrder = {} |
local allFramesOrder = {} |
local j, eyefinity |
local Resolution = ({GetScreenResolutions()})[GetCurrentResolution()] or GetCVar("gxWindowedResolution") |
if Resolution == nil then |
print("MultiScreenSupport: The resolution for the PixelPerfect option can not be found properly. You should try to change your client to fullscreen and then back to windowed.") |
return false |
end |
local tableResolution = MSS_split(Resolution, 'x') |
local ScreenWidth, ScreenHeight = tableResolution[1]+0,tableResolution[2]+0 |
local ScreenWidth, ScreenHeight = GetScreenWidth(),GetScreenHeight() |
--Pixel Perfect scale |
local scale = 768/ScreenHeight |
-- I don't know how it really work, but i'm assuming they add pixel to width to compensate the bezel. :P |
-- HQ resolution |
if (width > 7133 and width < 7134) then width = 2866 end |
if width == 8560 then width = 3440 end |
if width >= 9840 then width = 3280 end -- WQSXGA |
if width >= 7680 and width < 9840 then width = 2560 end -- WQXGA |
if width >= 5760 and width < 7680 then width = 1920 end -- WUXGA & HDTV |
MultiScreenSupportParent:SetFrameLevel(UIParent:GetFrameLevel()) |
MultiScreenSupportParent:SetPoint('CENTER', UIParent, 'CENTER') |
MultiScreenSupportParent:SetSize(width, height) |
--MultiScreenSupportParent:SetBackdrop({bgFile = "Interface/Tooltips/UI-Tooltip-Background", |
-- edgeFile = "Interface/Tooltips/UI-Tooltip-Border", |
-- tile = true, tileSize = 16, edgeSize = 1, |
-- insets = { left = 1, right = 1, top = 1, bottom = 1 }}) |
--MultiScreenSupportParent:SetBackdrop({bgFile = "Interface/Tooltips/UI-Tooltip-Background", edgeFile = "Interface/Tooltips/UI-Tooltip-Border", tile = true, tileSize = 16, edgeSize = 1, insets = { left = 1, right = 1, top = 1, bottom = 1 }}) |
local setting = {} |
local specificSetting = {} |
i = i+1 |
end |
end |
specificSetting['ProfessionsFrame'] = { |
order = i, |
name = 'ProfessionsFrame', |
desc = 'Pofessions Frame specific hook option', |
type = "toggle", |
set = function(_,val) |
print('Reload UI is needed to update ProfessionsFrame status') |
_G['multiscreensupportsave']['ProfessionsFrame'] = val |
end, |
get = function(_) |
if _G['multiscreensupportsave']['ProfessionsFrame'] == nil then |
_G['multiscreensupportsave']['ProfessionsFrame'] = true |
end |
return _G['multiscreensupportsave']['ProfessionsFrame'] |
end |
} |
i = i+1 |
specificSetting['ProfessionsFrameFaster'] = { |
order = i, |
name = 'Faster refresh', |
desc = 'Pofessions Frame faster refresh, could be detrimental to performance.', |
type = "toggle", |
set = function(_,val) |
_G['multiscreensupportsave']['ProfessionsFrameFaster'] = val |
end, |
get = function(_) |
if _G['multiscreensupportsave']['ProfessionsFrameFaster'] == nil then |
_G['multiscreensupportsave']['ProfessionsFrameFaster'] = true |
end |
return _G['multiscreensupportsave']['ProfessionsFrameFaster'] |
end, |
disabled = function() |
return _G['multiscreensupportsave']['ProfessionsFrame'] == false |
end |
} |
i = i+1 |
local specificconfig = { |
name = "MultiScreenSupport Specific options", |
--to add specific addon frame like blizzard one. |
MultiScreenSupport:RegisterEvent("ADDON_LOADED") |
if _G['multiscreensupportsave']['ProfessionsFrame'] then |
MultiScreenSupport:ProfessionsFrame() |
end |
end |
function MultiScreenSupport:ADDON_LOADED(_, addon) |
## Interface: 90005 |
## Interface: 100200 |
## Author: Tomate |
## Version: 5.1 |
## Version: 6.1 |
## Title: MultiScreenSupport |
## Notes: Eyefinity and Surround gaming assist to anchor default UI panels to the center monitor. |
## X-Embeds: Ace3 |