Commit 32a50709 authored by Simpy's avatar Simpy 🐹

remove the ui scale popup

parent b9305e08
......@@ -633,8 +633,9 @@ local function SetPage(PageNum)
InstallSlider:SetValue(value)
InstallSlider.Cur:SetText(value)
InstallSlider:SetScript('OnValueChanged', function(self)
E.global.general.UIScale = self:GetValue()
InstallSlider.Cur:SetText(E.global.general.UIScale)
local val = E:Round(self:GetValue(), 2)
E.global.general.UIScale = val
InstallSlider.Cur:SetText(val)
end)
InstallSlider.Min:SetText(0.4)
......@@ -653,9 +654,7 @@ local function SetPage(PageNum)
InstallOption1Button:SetText(L["Auto Scale"])
InstallOption2Button:Show()
InstallOption2Button:SetScript('OnClick', function()
E:PixelScaleChanged(nil, true)
end)
InstallOption2Button:SetScript('OnClick', E.PixelScaleChanged)
InstallOption2Button:SetText(L["Preview"])
f.Desc3:SetText(L["Importance: |cff07D400High|r"])
......
local E, L, V, P, G = unpack(select(2, ...)); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
--Lua functions
local min, max, abs, floor = min, max, abs, floor
local min, max, abs, floor, format = min, max, abs, floor, format
--WoW API / Variables
local UIParent = UIParent
local GetPhysicalScreenSize = GetPhysicalScreenSize
......@@ -66,27 +66,19 @@ function E:UIScale(init)
end
function E:PixelBestSize()
return max(0.4, min(1.15, 768 / E.screenheight))
local scale = E:Round(768 / E.screenheight, 5)
return max(0.4, min(1.15, scale))
end
function E:PixelScaleChanged(event, skip)
function E:PixelScaleChanged(event)
if event == 'UI_SCALE_CHANGED' then
E.screenwidth, E.screenheight = GetPhysicalScreenSize()
end
local lastScale = E.mult
E:UIScale(true) -- repopulate variables
E:UIScale() -- setup the scale
E:UpdateConfigSize(true) -- reposition config
if skip then return end
if event == 'UISCALE_CHANGE' then
E:Delay(0.5, E.StaticPopup_Show, E, event)
elseif lastScale ~= E.mult then
E:StaticPopup_Show('UISCALE_CHANGE')
end
end
function E:Scale(x)
......
......@@ -190,18 +190,6 @@ E.PopupDialogs.INCOMPATIBLE_ADDON = {
hideOnEscape = false,
}
E.PopupDialogs.UISCALE_CHANGE = {
text = L["The UI Scale has been changed, if you would like to preview the change press the preview button. It is recommended that you reload your User Interface for the best appearance."],
OnAccept = function() ReloadUI(); end,
OnCancel = E.noop,
button1 = ACCEPT,
button2 = CANCEL,
button3 = L["Preview Changes"],
OnAlt = function() E:PixelScaleChanged('UISCALE_CHANGE') end,
whileDead = 1,
hideOnEscape = false
}
E.PopupDialogs.CONFIG_RL = {
text = L["One or more of the changes you have made require a ReloadUI."],
button1 = ACCEPT,
......
......@@ -237,7 +237,6 @@ L["Please click the button below so you can setup variables and ReloadUI."] = "B
L["Please click the button below to setup your CVars."] = "Klicke 'Installiere CVars' um die CVars einzurichten."
L["Please press the continue button to go onto the next step."] = "Bitte drücke die Weiter-Taste um zum nächsten Schritt zu gelangen."
L["Plugins"] = true -- No need to translate
L["Preview Changes"] = "Änderungsvorschau"
L["Preview"] = "Vorschau"
L["Profile download complete from %s, but the profile %s already exists. Change the name or else it will overwrite the existing profile."] = "Profil komplett heruntergeladen von %s, allerdings ist das Profil %s bereits vorhanden. Ändere den Namen oder das bereits existierende Profil wird überschrieben."
L["Profile download complete from %s, would you like to load the profile %s now?"] = "Profil komplett heruntergeladen von %s, möchtest du das Profil %s nun laden?"
......@@ -305,7 +304,6 @@ L["The focus unit can be set by typing /focus when you are targeting the unit yo
L["The in-game configuration menu can be accessed by typing the /ec command or by clicking the 'C' button on the minimap. Press the button below if you wish to skip the installation process."] = "Das ElvUI-Konfigurationsmenü kannst du entweder mit /ec oder durch das Anklicken der 'C' Taste an der Minimap aufrufen. Drücke 'Schritt überspringen' um zum nächsten Schritt zu gelangen."
L["The profile you tried to import already exists. Choose a new name or accept to overwrite the existing profile."] = "Das Profil, dass du versuchst zu importieren existiert bereits. Wähle einen neuen Namen oder aktzeptiere dass das vorhandene Profile überschrieben wird."
L["The spell '%s' has been added to the Blacklist unitframe aura filter."] = "Der Zauber '%s' wurde zur schwarzen Liste der Einheitenfenster hinzugefügt."
L["The UI Scale has been changed, if you would like to preview the change press the preview button. It is recommended that you reload your User Interface for the best appearance."] = "Die UI Skallierung hat sich verändert, wenn du die Änderungen anschauen möchtest drücke bitte den Vorschau Knopf. Es wird empfohlen dass du dein UI neulädst für die besten Ergebnise."
L["Theme Set"] = "Thema gesetzt"
L["Theme Setup"] = "Thema Setup"
L["This install process will help you learn some of the features in ElvUI has to offer and also prepare your user interface for usage."] = "Dieser Installationsprozess wird dir helfen, die Funktionen von ElvUI für deine Benutzeroberfläche besser kennenzulernen."
......
......@@ -237,7 +237,6 @@ L["Please click the button below so you can setup variables and ReloadUI."] = tr
L["Please click the button below to setup your CVars."] = true
L["Please press the continue button to go onto the next step."] = true
L["Plugins"] = true
L["Preview Changes"] = true
L["Preview"] = true
L["Profile download complete from %s, but the profile %s already exists. Change the name or else it will overwrite the existing profile."] = true
L["Profile download complete from %s, would you like to load the profile %s now?"] = true
......@@ -303,7 +302,6 @@ L["The focus unit can be set by typing /focus when you are targeting the unit yo
L["The in-game configuration menu can be accessed by typing the /ec command or by clicking the 'C' button on the minimap. Press the button below if you wish to skip the installation process."] = true
L["The profile you tried to import already exists. Choose a new name or accept to overwrite the existing profile."] = true
L["The spell '%s' has been added to the Blacklist unitframe aura filter."] = true
L["The UI Scale has been changed, if you would like to preview the change press the preview button. It is recommended that you reload your User Interface for the best appearance."] = true
L["Theme Set"] = true
L["Theme Setup"] = true
L["This install process will help you learn some of the features in ElvUI has to offer and also prepare your user interface for usage."] = true
......
......@@ -237,7 +237,6 @@ L["Please click the button below so you can setup variables and ReloadUI."] = "H
L["Please click the button below to setup your CVars."] = "Haz clic en el botón de abajo para configurar las CVars"
L["Please press the continue button to go onto the next step."] = "Presiona el botón de continuar para ir al siguiente paso"
L["Plugins"] = true
L["Preview Changes"] = true
L["Preview"] = true
L["Profile download complete from %s, but the profile %s already exists. Change the name or else it will overwrite the existing profile."] = "Descarga de perfil de %s completa, pero el perfil %s ya existe. Cámbiale el nombre o se reemplazará el perfil existente."
L["Profile download complete from %s, would you like to load the profile %s now?"] = "Descarga de perfil de %s completa ¿Quieres cargar el perfil %s ahora?"
......@@ -303,7 +302,6 @@ L["The focus unit can be set by typing /focus when you are targeting the unit yo
L["The in-game configuration menu can be accessed by typing the /ec command or by clicking the 'C' button on the minimap. Press the button below if you wish to skip the installation process."] = "El menú de configuración puede ser accedido mediante el comando /ec o haciendo clic en el botón 'C' del minimapa. Presiona el botón de abajo si deseas saltarte la instalación."
L["The profile you tried to import already exists. Choose a new name or accept to overwrite the existing profile."] = "El perfil que has intentado importar ya existe. Elige un nuevo nombre o acepta sobreescribir el perfil existente."
L["The spell '%s' has been added to the Blacklist unitframe aura filter."] = "El hechizo '%s' ha sido añadido a la Lista Negra del filtro de auras del marco de unidad."
L["The UI Scale has been changed, if you would like to preview the change press the preview button. It is recommended that you reload your User Interface for the best appearance."] = true
L["Theme Set"] = "Establecer Tema"
L["Theme Setup"] = "Configurar Tema"
L["This install process will help you learn some of the features in ElvUI has to offer and also prepare your user interface for usage."] = "El proceso de instalación te ayudará a aprender algunas de las características de ElvUI y preparará la interfaz para su uso."
......
......@@ -237,7 +237,6 @@ L["Please click the button below so you can setup variables and ReloadUI."] = "P
L["Please click the button below to setup your CVars."] = "Pour configurer les CVars, cliquez sur le bouton ci-dessous."
L["Please press the continue button to go onto the next step."] = "Pour passer à l'étape suivante, cliquez sur le bouton Continuer."
L["Plugins"] = true
L["Preview Changes"] = true
L["Preview"] = true
L["Profile download complete from %s, but the profile %s already exists. Change the name or else it will overwrite the existing profile."] = "Téléchargement du profil de %s complet, mais le profil de % existe déjà. Changez le nom ou il écrasera le profil existant."
L["Profile download complete from %s, would you like to load the profile %s now?"] = "Téléchargement du profil de %s complet, voulez-vous charger le profil %s maintenant ?"
......@@ -303,7 +302,6 @@ L["The focus unit can be set by typing /focus when you are targeting the unit yo
L["The in-game configuration menu can be accessed by typing the /ec command or by clicking the 'C' button on the minimap. Press the button below if you wish to skip the installation process."] = "Le menu de configuration est accessible en tapant la commande /ec ou en cliquant sur le bouton 'C' sur la mini-carte. Cliquez sur le bouton ci-dessous si vous voulez passer le processus d'installation."
L["The profile you tried to import already exists. Choose a new name or accept to overwrite the existing profile."] = "Le profil que vous essayez d'importer existe déjà. Choisissez un nouveau nom ou acceptez d'écraser le profil existant."
L["The spell '%s' has been added to the Blacklist unitframe aura filter."] = "Le sort '%s' a bien été ajouté à la liste noire des filtres des cadres d'unités."
L["The UI Scale has been changed, if you would like to preview the change press the preview button. It is recommended that you reload your User Interface for the best appearance."] = true
L["Theme Set"] = "Thème configuré"
L["Theme Setup"] = "Configuration du thème"
L["This install process will help you learn some of the features in ElvUI has to offer and also prepare your user interface for usage."] = "Ce programme d'installation vous aidera à découvrir quelques fonctionnalités qu'ElvUI offre et préparera également votre interface à son utilisation."
......
......@@ -237,7 +237,6 @@ L["Please click the button below so you can setup variables and ReloadUI."] = tr
L["Please click the button below to setup your CVars."] = true
L["Please press the continue button to go onto the next step."] = true
L["Plugins"] = "Plugin"
L["Preview Changes"] = true
L["Preview"] = true
L["Profile download complete from %s, but the profile %s already exists. Change the name or else it will overwrite the existing profile."] = true
L["Profile download complete from %s, would you like to load the profile %s now?"] = true
......@@ -303,7 +302,6 @@ L["The focus unit can be set by typing /focus when you are targeting the unit yo
L["The in-game configuration menu can be accessed by typing the /ec command or by clicking the 'C' button on the minimap. Press the button below if you wish to skip the installation process."] = true
L["The profile you tried to import already exists. Choose a new name or accept to overwrite the existing profile."] = true
L["The spell '%s' has been added to the Blacklist unitframe aura filter."] = true
L["The UI Scale has been changed, if you would like to preview the change press the preview button. It is recommended that you reload your User Interface for the best appearance."] = true
L["Theme Set"] = true
L["Theme Setup"] = true
L["This install process will help you learn some of the features in ElvUI has to offer and also prepare your user interface for usage."] = true
......
......@@ -237,7 +237,6 @@ L["Please click the button below so you can setup variables and ReloadUI."] = "
L["Please click the button below to setup your CVars."] = "ElvUI의 게임 인터페이스 설정을 적용하려면 아래 버튼을 클릭하세요."
L["Please press the continue button to go onto the next step."] = "|cff2eb7e4[계속]|r 버튼으로 설치를 진행하세요."
L["Plugins"] = true
L["Preview Changes"] = true
L["Preview"] = true
L["Profile download complete from %s, but the profile %s already exists. Change the name or else it will overwrite the existing profile."] = "%s 유저에게서 ElvUI 설정 다운로드가 완료되었습니다. 하지만 건네받은 프로필 이름이 이미 존재합니다. 프로필이름을 바꾸지 않으면 기존의 것에 덮어씌웁니다."
L["Profile download complete from %s, would you like to load the profile %s now?"] = "%s 유저에게서 ElvUI 설정 다운로드가 완료되었습니다. 건네받은 설정을 지금 불러올까요?"
......@@ -303,7 +302,6 @@ L["The focus unit can be set by typing /focus when you are targeting the unit yo
L["The in-game configuration menu can be accessed by typing the /ec command or by clicking the 'C' button on the minimap. Press the button below if you wish to skip the installation process."] = "게임 내 설정창은 채팅창에 /ec를 입력하시거나 미니맵 옆의 C버튼을 클릭하면 열립니다. 그냥 사용하고자 한다면 아래의 |cff2eb7e4[건너뛰기]|r 버튼을 누르세요."
L["The profile you tried to import already exists. Choose a new name or accept to overwrite the existing profile."] = "불러오려는 프로필이 이미 존재합니다. 새로운 이름을 지정하시거나 기존 프로필에 덮어쓸지를 선택하십시오."
L["The spell '%s' has been added to the Blacklist unitframe aura filter."] = "%s 주문이 차단 목록에 등록되었습니다."
L["The UI Scale has been changed, if you would like to preview the change press the preview button. It is recommended that you reload your User Interface for the best appearance."] = true
L["Theme Set"] = "테마 적용"
L["Theme Setup"] = "테마 설정"
L["This install process will help you learn some of the features in ElvUI has to offer and also prepare your user interface for usage."] = "이 설치과정을 통해 ElvUI를 좀 더 자신에게 맞게 설정하고|n몇가지 기능에 대해 알 수 있습니다."
......
......@@ -237,7 +237,6 @@ L["Please click the button below so you can setup variables and ReloadUI."] = "P
L["Please click the button below to setup your CVars."] = "Por favor, clique no botão abaixo para configurar as suas Cvars."
L["Please press the continue button to go onto the next step."] = "Por favor, pressione o botão Continuar para passar à próxima etapa."
L["Plugins"] = true
L["Preview Changes"] = true
L["Preview"] = true
L["Profile download complete from %s, but the profile %s already exists. Change the name or else it will overwrite the existing profile."] = "Baixa de perfil completada de %s, mas o perfil %s já existe. Altere o nome ou ele irá sobrescrever o perfil existente."
L["Profile download complete from %s, would you like to load the profile %s now?"] = "Baixa de perfil completada de %s, gostaria de carregar o perfil %s agora?"
......@@ -303,7 +302,6 @@ L["The focus unit can be set by typing /focus when you are targeting the unit yo
L["The in-game configuration menu can be accessed by typing the /ec command or by clicking the 'C' button on the minimap. Press the button below if you wish to skip the installation process."] = "O modo configuração em jogo pode ser acessado escrevendo o comando /ec ou clicando no botão 'C' no minimapa. Pressione o botão abaixo se desejar pular o processo de instalação"
L["The profile you tried to import already exists. Choose a new name or accept to overwrite the existing profile."] = true
L["The spell '%s' has been added to the Blacklist unitframe aura filter."] = "O feitiço \"%s\" foi adicionado à Lista Negra dos filtros das auras de unidades."
L["The UI Scale has been changed, if you would like to preview the change press the preview button. It is recommended that you reload your User Interface for the best appearance."] = true
L["Theme Set"] = "Tema configurado"
L["Theme Setup"] = "Configuração do Tema"
L["This install process will help you learn some of the features in ElvUI has to offer and also prepare your user interface for usage."] = "Este processo de instalação vai mostrar-lhe algumas das opções que a ElvUI tem para oferecer e também vai preparar a sua interface para ser usada."
......
......@@ -237,7 +237,6 @@ L["Please click the button below so you can setup variables and ReloadUI."] = "
L["Please click the button below to setup your CVars."] = "Пожалуйста, нажмите кнопку ниже для сброса настроек."
L["Please press the continue button to go onto the next step."] = "Пожалуйста, нажмите кнопку 'Продолжить' для перехода к следующему шагу"
L["Plugins"] = "Плагины"
L["Preview Changes"] = "Посмотреть изменения"
L["Preview"] = "Предпросмотр"
L["Profile download complete from %s, but the profile %s already exists. Change the name or else it will overwrite the existing profile."] = "Загрузка профиля от %s завершена, но профиль %s уже существует. Измените его название или он перезапишет уже существующий профиль."
L["Profile download complete from %s, would you like to load the profile %s now?"] = "Загрузка профиля от %s завершена, хотите загрузить профиль %s сейчас?"
......@@ -303,7 +302,6 @@ L["The focus unit can be set by typing /focus when you are targeting the unit yo
L["The in-game configuration menu can be accessed by typing the /ec command or by clicking the 'C' button on the minimap. Press the button below if you wish to skip the installation process."] = "Меню настроек можно вызвать командой /ес или кнопкой 'С' на миникарте. Нажмите кнопку ниже, если Вы хотите прервать процесс установки."
L["The profile you tried to import already exists. Choose a new name or accept to overwrite the existing profile."] = "Профиль, который вы хотите импортировать, уже существует. Задайте новой имя или примите для перезаписи существующего профиля."
L["The spell '%s' has been added to the Blacklist unitframe aura filter."] = "Заклинание \"%s\" было добавлено в фильтр \"Blacklist\" аур рамок юнитов."
L["The UI Scale has been changed, if you would like to preview the change press the preview button. It is recommended that you reload your User Interface for the best appearance."] = "Масштаб интерфейса изменен. Если вы хотите посмотреть на результат, нажмите кнопку предпросмотра. Для лучшего результата рекомендуется перезагрузить интерфейс."
L["Theme Set"] = "Тема установлена"
L["Theme Setup"] = "Тема"
L["This install process will help you learn some of the features in ElvUI has to offer and also prepare your user interface for usage."] = "Этот процесс установки поможет Вам узнать о некоторых функциях ElvUI и подготовить Ваш интерфейс к использованию."
......
......@@ -237,7 +237,6 @@ L["Please click the button below so you can setup variables and ReloadUI."] = "
L["Please click the button below to setup your CVars."] = "请按下方按钮设定参数."
L["Please press the continue button to go onto the next step."] = "请按继续按钮到下一步"
L["Plugins"] = "插件"
L["Preview Changes"] = "预览改动"
L["Preview"] = "预览"
L["Profile download complete from %s, but the profile %s already exists. Change the name or else it will overwrite the existing profile."] = "配置文件从 %s 下载完成, 但是配置文件 %s 已存在. 请更改名称, 否则它会覆盖你的现有配置文件."
L["Profile download complete from %s, would you like to load the profile %s now?"] = "配置文件从 %s 下载完成, 你是否加载配置文件 %s?"
......@@ -303,7 +302,6 @@ L["The focus unit can be set by typing /focus when you are targeting the unit yo
L["The in-game configuration menu can be accessed by typing the /ec command or by clicking the 'C' button on the minimap. Press the button below if you wish to skip the installation process."] = "若要进入内建设定选单,请输入 /ec,或者按一下小地图旁的 C 按钮。若要略过安装程序,请按下方按钮。"
L["The profile you tried to import already exists. Choose a new name or accept to overwrite the existing profile."] = "你尝试导入的配置文件已经存在。请选择一个新的名字或者确认覆盖存在的配置文件。"
L["The spell '%s' has been added to the Blacklist unitframe aura filter."] = "法术\"%s\"已经被添加到单位框架的光环过滤器中."
L["The UI Scale has been changed, if you would like to preview the change press the preview button. It is recommended that you reload your User Interface for the best appearance."] = "UI缩放已经改变, 点击'预览'按钮来预览改动. 建议你重载界面以获得最好的界面."
L["Theme Set"] = "主题设置"
L["Theme Setup"] = "主题安装"
L["This install process will help you learn some of the features in ElvUI has to offer and also prepare your user interface for usage."] = "此安装程序有助你了解 ElvUI 部份功能,并可协助你预先设定 UI。"
......
......@@ -237,7 +237,6 @@ L["Please click the button below so you can setup variables and ReloadUI."] = "
L["Please click the button below to setup your CVars."] = "請按下方按鈕設定參數."
L["Please press the continue button to go onto the next step."] = "請按「繼續」按鈕, 執行下一個步驟."
L["Plugins"] = true
L["Preview Changes"] = "預覽修改"
L["Preview"] = "預覽"
L["Profile download complete from %s, but the profile %s already exists. Change the name or else it will overwrite the existing profile."] = "設定文件從 %s 下載完成, 但是設定文件 %s 已存在. 請更改名稱, 否則它會覆蓋你的現有設定檔."
L["Profile download complete from %s, would you like to load the profile %s now?"] = "設定檔從 %s 下載完成, 你是否要加載設定檔 %s?"
......@@ -303,7 +302,6 @@ L["The focus unit can be set by typing /focus when you are targeting the unit yo
L["The in-game configuration menu can be accessed by typing the /ec command or by clicking the 'C' button on the minimap. Press the button below if you wish to skip the installation process."] = "若要進入內建設定選單, 請輸入/ec, 或者按一下小地圖旁的「C」按鈕.若要略過安裝程序, 請按下方按鈕."
L["The profile you tried to import already exists. Choose a new name or accept to overwrite the existing profile."] = "你嘗試導入的設定檔已存在. 選擇一個新名稱或是允許覆蓋原有設定檔"
L["The spell '%s' has been added to the Blacklist unitframe aura filter."] = "法術'%s'已經被添加到單位框架的光環過濾器中."
L["The UI Scale has been changed, if you would like to preview the change press the preview button. It is recommended that you reload your User Interface for the best appearance."] = "介面縮放比例已被更改, 如果您想預覽這個更改, 請按預覽按鈕. 同時建議您為了最好的顯示效果重載用戶介面."
L["Theme Set"] = "主題設定"
L["Theme Setup"] = "主題安裝"
L["This install process will help you learn some of the features in ElvUI has to offer and also prepare your user interface for usage."] = "此安裝程序有助你瞭解ElvUI 部份功能, 並可協助你預先設定UI."
......
......@@ -9,6 +9,7 @@ local AFK = E:GetModule('AFK')
local _G = _G
local IsAddOnLoaded = IsAddOnLoaded
local IsMouseButtonDown = IsMouseButtonDown
local FCF_GetNumActiveChatFrames = FCF_GetNumActiveChatFrames
local function GetChatWindowInfo()
......@@ -55,7 +56,7 @@ E.Options.args.general = {
name = L["Auto Scale"],
func = function()
E.global.general.UIScale = E:PixelBestSize()
E:StaticPopup_Show("UISCALE_CHANGE")
E:PixelScaleChanged()
end,
},
UIScale = {
......@@ -67,7 +68,9 @@ E.Options.args.general = {
get = function(info) return E.global.general.UIScale end,
set = function(info, value)
E.global.general.UIScale = value
E:StaticPopup_Show("UISCALE_CHANGE")
if not IsMouseButtonDown() then
E:PixelScaleChanged()
end
end
},
pixelPerfect = {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment