Added tranliterate into the icon tooltip

This commit is contained in:
Tercio Jose
2024-06-01 12:52:52 -03:00
parent cd16ce7590
commit 9605299be0
5 changed files with 17 additions and 4 deletions
+1 -1
View File
@@ -301,7 +301,7 @@
---@field ParseTexture fun(self:table, texture:texturepath|textureid|atlasname|atlasinfo, width: number?, height: number?, leftTexCoord: number?, rightTexCoord: number?, topTexCoord: number?, bottomTexCoord: number?, vertexRed:number|string?, vertexGreenvertexRed:number?, vertexBluevertexRed:number?, vertexAlphavertexRed:number?) : any, number?, number?, number?, number?, number?, number?, number?, number?, number?, number?, number?, number?
---@field IsTexture fun(self:table, texture:any, bCheckTextureObject: boolean?) : boolean
---@field CreateAtlasString fun(self:table, atlas:atlasinfo|atlasname, textureHeight:number?, textureWidth:number?) : string
---@field SetMask fun(self:table, texture:texture, maskTexture:atlasname|texturepath|textureid|table) : nil
---@field SetMask fun(self:table, texture:texture, maskTexture:atlasname|texturepath|textureid|table|string) : nil
---@field GetClientRegion fun(self:table) : string
---@field GetBestFontPathForLanguage fun(self:table, languageId:string) : string
---@field SetTemplate fun(self:table, frame:uiobject, template:string)
+2 -1
View File
@@ -1,6 +1,6 @@
local dversion = 537
local dversion = 538
local major, minor = "DetailsFramework-1.0", dversion
local DF, oldminor = LibStub:NewLibrary(major, minor)
@@ -2865,6 +2865,7 @@ end
--DF.font_templates ["OPTIONS_FONT_TEMPLATE"] = {color = "yellow", size = 12, font = "Accidental Presidency"}
DF.font_templates["ORANGE_FONT_TEMPLATE"] = {color = "orange", size = 10, font = DF:GetBestFontForLanguage()}
DF.font_templates["OPTIONS_FONT_TEMPLATE"] = {color = "yellow", size = 9.6, font = DF:GetBestFontForLanguage()}
DF.font_templates["SMALL_SILVER"] = {color = "silver", size = 9, font = DF:GetBestFontForLanguage()}
--dropdowns
DF.dropdown_templates = DF.dropdown_templates or {}
+5
View File
@@ -408,6 +408,11 @@ function detailsFramework:NewLabel(parent, container, name, member, text, font,
--if template has been passed as the third parameter
if (size and type(size) == "table") then
labelObject:SetTemplate(size)
--check if a template was passed as the 3rd argument
elseif (size and type(size) == "string") then
local template = detailsFramework:ParseTemplate(labelObject.type, size)
labelObject:SetTemplate(template)
end
return labelObject
+1 -1
View File
@@ -716,7 +716,7 @@ function detailsFramework:SetMask(texture, maskTexture)
if (not texture.MaskTexture) then
local parent = texture:GetParent()
local maskTextureObject = parent:CreateMaskTexture(nil, "artwork")
maskTextureObject:SetAllPoints(texture)
maskTextureObject:SetAllPoints(texture.widget or texture)
texture:AddMaskTexture(maskTextureObject)
texture.MaskTexture = maskTextureObject
end
+8 -1
View File
@@ -2106,7 +2106,14 @@ local iconFrame_OnEnter = function(self)
end
end
GameCooltip:AddLine(name, specName)
if (instance.row_info.textL_translit_text) then
--translate cyrillic alphabet to western alphabet by Vardex (https://github.com/Vardex May 22, 2019)
local Translit = LibStub("LibTranslit-1.0")
GameCooltip:AddLine(Translit:Transliterate(name, "!"), specName)
else
GameCooltip:AddLine(name, specName)
end
if (class == "UNKNOW" or class == "UNGROUPPLAYER") then
GameCooltip:AddIcon([[Interface\AddOns\Details\images\classes_small_alpha]], 1, 1, iconSize, iconSize, 0, 0.25, 0.75, 1)
else