Quantcast
WoWInterface - View Single Post - How to make pixel-accurate interface?
View Single Post
08-28-18, 09:21 AM   #6
p3lim
A Pyroguard Emberseer
 
p3lim's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 1,698
From https://github.com/p3lim-wow/Inomena...er/scaling.lua

Lua Code:
  1. function E:PLAYER_LOGIN()
  2.     local width, height = GetPhysicalScreenSize()
  3.     if((768 / height) < (768 / 1200)) then
  4.         -- Game can't scale further than 0.64
  5.         -- Instead we change the UI scale to 1 and the UIParent scale to the correct one
  6.         SetCVar('useuiscale', 1)
  7.         SetCVar('uiscale', 1)
  8.         UIParent:SetScale(768 / height)
  9.     else
  10.         SetCVar('useuiscale', 0)
  11.     end
  12. end
  Reply With Quote