/trunk/Core
if not _G['SC'].SET or _G['SC'].SET.PixelPerfect then |
local resolution = ({GetScreenResolutions()})[GetCurrentResolution()] |
if resolution == nil then |
SliceCommander:StaticPopup_Show('FAILED_UISCALERESOLUTION') |
resolution = _G['SC'].SET.fixedResolution |
if resolution == nil then |
SliceCommander:StaticPopup_Show('FAILED_UISCALERESOLUTION') |
end |
return false |
end |
local screenwidth, screenheight = DecodeResolution(resolution) |
} |
SC.PopupDialogs["FAILED_UISCALERESOLUTION"] = { |
text = L["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."], |
text = L["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. If does not fix the issue you can force the resolution for SliceCommander with the following macro '/sc resolution 1920x1080' (replace 1920x1080 by your resolution)."], |
button1 = ACCEPT, |
OnAccept = function() GameMenuButtonOptions:Click(); end, |
timeout = 0, |
return nil; |
end |
print(dialog:GetName().."Text"); |
local text = _G[dialog:GetName().."Text"]; |
local editBox = _G[dialog:GetName().."EditBox"]; |
local button1 = _G[dialog:GetName().."Button1"]; |
local maxHeightSoFar, maxWidthSoFar = (dialog.maxHeightSoFar or 0), (dialog.maxWidthSoFar or 0); |
local width = 320; |
local width = 500; |
text:SCWidth(470); |
text:SCHeight(90); |
if ( dialog.numButtons == 3 ) then |
width = 440; |
dialog.maxWidthSoFar = width; |
end |
local height = 32 + text:GetHeight() + 8 + button1:GetHeight(); |
local height = 55 + text:GetHeight() + 8 + button1:GetHeight(); |
if ( info.hasEditBox ) then |
height = height + 8 + editBox:GetHeight(); |
elseif ( info.hasMoneyFrame ) then |