Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 9 additions & 10 deletions Bars/Abstract/Bar.lua
Original file line number Diff line number Diff line change
Expand Up @@ -911,16 +911,15 @@ function BarMixin:ApplyForegroundSettings(layoutName, data)

local resource = self:GetResource()
local color = self:GetBarColor(resource)
if data.useResourceAtlas == true and (color.atlasElementName or color.atlas) then
if color.atlasElementName then
if color.hasClassResourceVariant then
fgTexture = "UI-HUD-UnitFrame-Player-PortraitOn-ClassResource-Bar-"..color.atlasElementName
else
fgTexture = "UI-HUD-UnitFrame-Player-PortraitOn-Bar-"..color.atlasElementName
end
elseif color.atlas then
fgTexture = color.atlas

if data.useResourceAtlas == "Resource" and color.atlasElementName then
if color.hasClassResourceVariant then
fgTexture = "UI-HUD-UnitFrame-Player-PortraitOn-ClassResource-Bar-"..color.atlasElementName
else
fgTexture = "UI-HUD-UnitFrame-Player-PortraitOn-Bar-"..color.atlasElementName
end
elseif (data.useResourceAtlas == "Resource" or data.useResourceAtlas == "SpecialOnly") and color.atlas then
fgTexture = color.atlas
end

if fgTexture then
Expand All @@ -931,7 +930,7 @@ function BarMixin:ApplyForegroundSettings(layoutName, data)
end
end

if data.useResourceAtlas == true and (color.atlasElementName or color.atlas) then
if (data.useResourceAtlas == "Resource" and (color.atlasElementName or color.atlas)) or (data.useResourceAtlas == "SpecialOnly" and color.atlas) then
self.StatusBar:SetStatusBarColor(1, 1, 1, color.a or 1);
else
self.StatusBar:SetStatusBarColor(color.r or 1, color.g or 1, color.b or 1, color.a or 1);
Expand Down
8 changes: 5 additions & 3 deletions Bars/PrimaryResourceBar.lua
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ addonTable.RegisteredBar.PrimaryResourceBar = {
showTicks = true,
tickColor = {r = 0, g = 0, b = 0, a = 1},
tickThickness = 1,
useResourceAtlas = false,
useResourceAtlas = "Custom",
},
lemSettings = function(bar, defaults)
local dbName = bar:GetConfig().dbName
Expand All @@ -132,9 +132,11 @@ addonTable.RegisteredBar.PrimaryResourceBar = {
{
parentId = L["CATEGORY_BAR_STYLE"],
order = 401,
name = L["USE_RESOURCE_TEXTURE_AND_COLOR"],
kind = LEM.SettingType.Checkbox,
name = L["BAR_TEXTURE_AND_COLOR_MODE"],
kind = LEM.SettingType.Dropdown,
default = defaults.useResourceAtlas,
values = addonTable.availableResourceTextureOptions,
useOldStyle = true,
get = function(layoutName)
local data = SenseiClassResourceBarDB[dbName][layoutName]
if data and data.useResourceAtlas ~= nil then
Expand Down
8 changes: 5 additions & 3 deletions Bars/SecondaryResourceBar.lua
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ addonTable.RegisteredBar.SecondaryResourceBar = {
showTicks = true,
tickColor = {r = 0, g = 0, b = 0, a = 1},
tickThickness = 1,
useResourceAtlas = false,
useResourceAtlas = "Custom",
},
lemSettings = function(bar, defaults)
local config = bar:GetConfig()
Expand Down Expand Up @@ -391,9 +391,11 @@ addonTable.RegisteredBar.SecondaryResourceBar = {
{
parentId = L["CATEGORY_BAR_STYLE"],
order = 401,
name = L["USE_RESOURCE_TEXTURE_AND_COLOR"],
kind = LEM.SettingType.Checkbox,
name = L["BAR_TEXTURE_AND_COLOR_MODE"],
kind = LEM.SettingType.Dropdown,
default = defaults.useResourceAtlas,
values = addonTable.availableResourceTextureOptions,
useOldStyle = true,
get = function(layoutName)
local data = SenseiClassResourceBarDB[dbName][layoutName]
if data and data.useResourceAtlas ~= nil then
Expand Down
8 changes: 5 additions & 3 deletions Bars/TertiaryResourceBar.lua
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ addonTable.RegisteredBar.TertiaryResourceBar = {
point = "CENTER",
x = 0,
y = -80,
useResourceAtlas = false,
useResourceAtlas = "Custom",
},
allowEditPredicate = function()
local spec = C_SpecializationInfo.GetSpecialization()
Expand All @@ -104,9 +104,11 @@ addonTable.RegisteredBar.TertiaryResourceBar = {
{
parentId = L["CATEGORY_BAR_STYLE"],
order = 401,
name = L["USE_RESOURCE_TEXTURE_AND_COLOR"],
kind = LEM.SettingType.Checkbox,
name = L["BAR_TEXTURE_AND_COLOR_MODE"],
kind = LEM.SettingType.Dropdown,
default = defaults.useResourceAtlas,
values = addonTable.availableResourceTextureOptions,
useOldStyle = true,
get = function(layoutName)
local data = SenseiClassResourceBarDB[dbName][layoutName]
if data and data.useResourceAtlas ~= nil then
Expand Down
6 changes: 6 additions & 0 deletions Constants.lua
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,12 @@ addonTable.availableHealAbsorbBarPositions = {
{ text = L["BAR_POSITION_ATTACH_HEALTH"], value = "Attach To Health" },
}

addonTable.availableResourceTextureOptions = {
{ text = L["USE_CUSTOM_TEXTURE_AND_COLOR"], value = "Custom" },
{ text = L["USE_RESOURCE_TEXTURE_AND_COLOR"], value = "Resource" },
{ text = L["USE_RESOURCE_TEXTURE_SPECIAL_ONLY"], value = "SpecialOnly" },
}

-- Power types that should show discrete ticks
addonTable.tickedPowerTypes = {
[Enum.PowerType.ArcaneCharges] = true,
Expand Down
2 changes: 1 addition & 1 deletion Helpers/LEMSettingsLoader.lua
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@ local function BuildLemSettings(bar, defaults)
end,
isEnabled = function(layoutName)
local data = SenseiClassResourceBarDB[config.dbName][layoutName]
return not data.useResourceAtlas
return data.useResourceAtlas ~= "Resource"
end,
},
{
Expand Down
3 changes: 3 additions & 0 deletions Locales/deDE.lua
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,10 @@ local baseLocale = {
-- Bar style category - Edit Mode
["CATEGORY_BAR_STYLE"] = "Stil der Leiste",
["USE_CLASS_COLOR"] = "Klassenfarbe nutzen",
["BAR_TEXTURE_AND_COLOR_MODE"] = "Leistenmodus",
["USE_CUSTOM_TEXTURE_AND_COLOR"] = "Eigene Textur und Farbe verwenden",
["USE_RESOURCE_TEXTURE_AND_COLOR"] = "Ressourcentextur und -farbe verwenden",
["USE_RESOURCE_TEXTURE_SPECIAL_ONLY"] = "Nur spezielle Ressourcentexturen verwenden",
["BAR_TEXTURE"] = "Leistentextur",
["BAR_BACKGROUND"] = "Hintergrund",
["USE_BAR_COLOR_FOR_BACKGROUND_COLOR"] = "Leistenfarbe als Hintergrundfarbe nutzen",
Expand Down
5 changes: 4 additions & 1 deletion Locales/enUS.lua
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,10 @@ local baseLocale = {
-- Bar style category - Edit Mode
["CATEGORY_BAR_STYLE"] = "Bar Style",
["USE_CLASS_COLOR"] = "Use Class Color",
["USE_RESOURCE_TEXTURE_AND_COLOR"] = "Use Resource Texture And Color",
["BAR_TEXTURE_AND_COLOR_MODE"] = "Bar Mode",
["USE_CUSTOM_TEXTURE_AND_COLOR"] = "Use Custom Textures and Color",
["USE_RESOURCE_TEXTURE_AND_COLOR"] = "Use Resource Textures and Color",
["USE_RESOURCE_TEXTURE_SPECIAL_ONLY"] = "Use Special Resource Textures only",
["BAR_TEXTURE"] = "Bar Texture",
["BAR_BACKGROUND"] = "Background",
["USE_BAR_COLOR_FOR_BACKGROUND_COLOR"] = "Use Bar Color For Background Color",
Expand Down
3 changes: 3 additions & 0 deletions Locales/koKR.lua
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,10 @@ local baseLocale = {
-- Bar style category - Edit Mode
["CATEGORY_BAR_STYLE"] = "바 스타일",
["USE_CLASS_COLOR"] = "직업 색상 사용",
["BAR_TEXTURE_AND_COLOR_MODE"] = "바 모드",
["USE_CUSTOM_TEXTURE_AND_COLOR"] = "사용자 정의 텍스처 및 색상 사용",
["USE_RESOURCE_TEXTURE_AND_COLOR"] = "자원 텍스처 및 색상 사용",
["USE_RESOURCE_TEXTURE_SPECIAL_ONLY"] = "특수 자원 텍스처만 사용",
["BAR_TEXTURE"] = "바 텍스처",
["BAR_BACKGROUND"] = "배경",
["USE_BAR_COLOR_FOR_BACKGROUND_COLOR"] = "바 색상을 배경 색상으로 사용",
Expand Down
3 changes: 3 additions & 0 deletions Locales/ptBR.lua
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,10 @@ local baseLocale = {
-- Bar style category - Edit Mode
["CATEGORY_BAR_STYLE"] = "Estilo da Barra",
["USE_CLASS_COLOR"] = "Usar Cor da Classe",
["BAR_TEXTURE_AND_COLOR_MODE"] = "Modo da Barra",
["USE_CUSTOM_TEXTURE_AND_COLOR"] = "Usar Texturas e Cores Personalizadas",
["USE_RESOURCE_TEXTURE_AND_COLOR"] = "Usar Textura e Cor do Recurso",
["USE_RESOURCE_TEXTURE_SPECIAL_ONLY"] = "Usar Apenas Texturas Especiais de Recursos",
["BAR_TEXTURE"] = "Textura da Barra",
["BAR_BACKGROUND"] = "Fundo",
["USE_BAR_COLOR_FOR_BACKGROUND_COLOR"] = "Usar Cor da Barra para a Cor de Fundo",
Expand Down
3 changes: 3 additions & 0 deletions Locales/ruRU.lua
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,10 @@ local baseLocale = {
-- Bar style category - Edit Mode
["CATEGORY_BAR_STYLE"] = "Стиль панели",
["USE_CLASS_COLOR"] = "Цвет класса",
["BAR_TEXTURE_AND_COLOR_MODE"] = "Режим панели",
["USE_CUSTOM_TEXTURE_AND_COLOR"] = "Пользовательские текстуры и цвета",
["USE_RESOURCE_TEXTURE_AND_COLOR"] = "Текстура и цвет ресурса",
["USE_RESOURCE_TEXTURE_SPECIAL_ONLY"] = "Только особые текстуры ресурса",
["BAR_TEXTURE"] = "Текстура панели",
["BAR_BACKGROUND"] = "Фон",
["USE_BAR_COLOR_FOR_BACKGROUND_COLOR"] = "Цвет панели для фона",
Expand Down
3 changes: 3 additions & 0 deletions Locales/zhCN.lua
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,10 @@ local baseLocale = {
-- Bar style category - Edit Mode
["CATEGORY_BAR_STYLE"] = "条形风格",
["USE_CLASS_COLOR"] = "使用职业颜色",
["BAR_TEXTURE_AND_COLOR_MODE"] = "条形模式",
["USE_CUSTOM_TEXTURE_AND_COLOR"] = "使用自定义纹理和颜色",
["USE_RESOURCE_TEXTURE_AND_COLOR"] = "使用资源纹理和颜色",
["USE_RESOURCE_TEXTURE_SPECIAL_ONLY"] = "仅使用特殊资源纹理",
["BAR_TEXTURE"] = "条形纹理",
["BAR_BACKGROUND"] = "背景",
["USE_BAR_COLOR_FOR_BACKGROUND_COLOR"] = "使用条形颜色作为背景颜色",
Expand Down