Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
ls- committed Mar 13, 2021
2 parents cd84e88 + 616637c commit aa324e8
Show file tree
Hide file tree
Showing 19 changed files with 378 additions and 237 deletions.
65 changes: 57 additions & 8 deletions .luacheckrc
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,29 @@ exclude_files = {
}

ignore = {
"211/_G", -- Unused local variable "_G"
"211/C", -- Unused local variable "C"
"211/D", -- Unused local variable "D"
"211/E", -- Unused local variable "E"
"211/L", -- Unused local variable "L"
"211/M", -- Unused local variable "M"
"211/P", -- Unused local variable "P"
"112/LS.*", -- Mutating an undefined global variable starting with LS
"113/LS.*", -- Accessing an undefined global variable starting with LS
"122", -- Setting a read-only field of a global variable
"211/_G", -- Unused local variable _G
"211/C", -- Unused local variable C
"211/D", -- Unused local variable D
"211/E", -- Unused local variable E
"211/L", -- Unused local variable L
"211/M", -- Unused local variable M
"211/P", -- Unused local variable P
"432", -- Shadowing an upvalue argument
}

globals = {
-- Lua
"getfenv",
"print",

-- AddOns
"GetMinimapShape",

-- FrameXML
"SlashCmdList",
}

read_globals = {
Expand All @@ -28,6 +39,12 @@ read_globals = {

-- API functions
"CreateFrame",
"GetCursorPosition",
"GetGameTime",
"GetMinimapZoneText",
"GetZonePVPInfo",
"IsAddOnLoaded",
"LoadAddOn",
"RegisterUnitWatch",
"UnitClass",
"UnitClassification",
Expand All @@ -45,20 +62,52 @@ read_globals = {
"UnregisterUnitWatch",

-- Namespaces
"C_Calendar",
"C_DateAndTime",
"C_MountJournal",
"C_PvP",
"C_Timer",

-- FrameXML functions
"CastingBarFrame_SetUnit",
"Minimap_ZoomIn",
"Minimap_ZoomOut",
"MiniMapTracking_OnMouseDown",
"Mixin",
"RegisterStateDriver",
"UIDropDownMenu_GetCurrentDropDown",
"UnitFrame_OnEnter",
"UnitFrame_OnLeave",

-- FrameXML objects
"CalendarFrame",
"CastingBarFrame",
"DropDownList1",
"GameFontNormal",
"GameTimeFrame",
"GameTooltip",
"GarrisonLandingPageMinimapButton",
"GuildInstanceDifficulty",
"HybridMinimap",
"Minimap",
"MiniMapChallengeMode",
"MinimapCompassTexture",
"MiniMapInstanceDifficulty",
"MiniMapMailFrame",
"MiniMapTracking",
"MiniMapTrackingBackground",
"MiniMapTrackingButton",
"MiniMapTrackingDropDown",
"MiniMapTrackingIcon",
"MinimapZoneText",
"MinimapZoneTextButton",
"PetCastingBarFrame",
"QueueStatusFrame",
"QueueStatusMinimapButton",
"TimeManagerClockButton",
"UIParent",

-- FrameXML constants
-- FrameXML vars
"ChatTypeInfo",
"DEFAULT_CHAT_FRAME",
}
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# CHANGELOG

## Version 90005.01

- Added 125% and 150% size options for the round minimap. Can be found at /LSUI > Minimap > Size
slider;
- Rebalanced UF insets. Bottom insets can now be up to 50% of the UF size (up from 33%), whereas
top insets are now limited to 25% (down from 33%);
- Misc bug fixes and tweaks.

![Imgur](https://i.imgur.com/euV7Yhg.png)

## Version 90002.06

- Refactored a lot of UF-related code;
Expand Down
Binary file added assets/minimap-100.TGA
Binary file not shown.
Binary file added assets/minimap-125.TGA
Binary file not shown.
Binary file added assets/minimap-150.TGA
Binary file not shown.
Binary file removed assets/minimap.TGA
Binary file not shown.
29 changes: 24 additions & 5 deletions config/minimap.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@ local MINIMAP = P:GetModule("Minimap")
-- Lua
local _G = getfenv(0)

--[[ luacheck: globals
Minimap
]]

-- Mine
local MODES = {
[0] = L["HIDE"],
Expand Down Expand Up @@ -106,7 +102,6 @@ function CONFIG.CreateMinimapPanel(_, order)
order = 9,
type = "description",
name = " ",
hidden = isMinimapRound,
},
size = {
order = 10,
Expand All @@ -128,6 +123,30 @@ function CONFIG.CreateMinimapPanel(_, order)
end
end,
},
scale = {
order = 10,
type = "select",
name = L["SIZE"],
hidden = isMinimapSquare,
disabled = isModuleDisabled,
values = {
[100] = "100%",
[125] = "125%",
[150] = "150%",
},
get = function()
return C.db.profile.minimap.scale
end,
set = function(info, value)
if C.db.profile.minimap.scale ~= value then
C.db.profile.minimap.scale = value

Minimap:UpdateConfig()
Minimap:UpdateSize()
Minimap:UpdateButtons()
end
end,
},
spacer_2 = {
order = 19,
type = "description",
Expand Down
4 changes: 2 additions & 2 deletions config/unitframes/core.lua
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ local function createUnitFramePanel(order, unit, name)
type = "range",
name = L["TOP_INSET_SIZE"],
desc = L["TOP_INSET_SIZE_DESC"],
min = 0.01, max = 0.33, step = 0.01,
min = 0.01, max = 0.25, step = 0.01,
isPercent = true,
get = function()
return C.db.profile.units[unit].insets.t_size
Expand All @@ -141,7 +141,7 @@ local function createUnitFramePanel(order, unit, name)
type = "range",
name = L["BOTTOM_INSET_SIZE"],
desc = L["BOTTOM_INSET_SIZE_DESC"],
min = 0.01, max = 0.33, step = 0.01,
min = 0.01, max = 0.5, step = 0.01,
isPercent = true,
get = function()
return C.db.profile.units[unit].insets.b_size
Expand Down
8 changes: 6 additions & 2 deletions core/defaults.lua
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,10 @@ D.global = {
},
},
textures = {
statusbar = "LS",
statusbar = {
horiz = "LS",
vert = "LS",
},
},
}

Expand Down Expand Up @@ -1991,9 +1994,10 @@ D.profile = {
},
minimap = {
size = 146,
scale = 100, -- 125, 150
collect = {
enabled = true,
tooltip = true,
tooltip = false,
calendar = false,
garrison = false,
mail = false,
Expand Down
4 changes: 3 additions & 1 deletion core/statusbar.lua
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ local unpack = _G.unpack
local Lerp = _G.Lerp

-- Mine
local LSM = LibStub("LibSharedMedia-3.0")

function E:HandleStatusBar(bar, isRecursive)
if bar.handled then return end

Expand Down Expand Up @@ -88,7 +90,7 @@ function E:HandleStatusBar(bar, isRecursive)
text:SetPoint("BOTTOMRIGHT", -1, 0)
bar.Text = text

sbt:SetTexture("Interface\\BUTTONS\\WHITE8X8")
sbt:SetTexture(LSM:Fetch("statusbar", C.db.global.textures.statusbar.horiz))
bar.Texture = sbt

bar.handled = true
Expand Down
11 changes: 11 additions & 0 deletions init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,17 @@ local function cleanUpStep2()
end
end
end

-- -> 90005.01
if C.db.profile.version and C.db.profile.version < 9000501 then
for _, unit in next, units do
if C.db.profile.units[unit].insets then
if C.db.profile.units[unit].insets.t_size > 0.25 then
C.db.profile.units[unit].insets.t_size = 0.25
end
end
end
end
end

local function addRefs()
Expand Down
11 changes: 5 additions & 6 deletions locales/enUS.lua
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,7 @@ L["FUNC"] = "Function"
L["GAIN"] = "Gain"
L["GAIN_LOSS_THRESHOLD"] = "Gain/Loss Threshold"
L["GAIN_LOSS_THRESHOLD_DESC"] = "The threshold (in percentages) above which resource gain and loss will be animated. Set to 100 to disable."
L["GLOSS"] = "Gloss"
L["GM_FRAME"] = "Ticket Status Frame"
L["GOLD"] = "Gold"
L["GROWTH_DIR"] = "Growth Direction"
Expand Down Expand Up @@ -318,6 +319,8 @@ L["MINIMAP_BUTTONS_TOOLTIP"] = "Click to show minimap buttons."
L["MINUTES"] = "Minutes"
L["MIRROR_TIMER"] = "Mirror Timers"
L["MIRROR_TIMER_DESC"] = "Breath, fatigue and other indicators."
L["MIRROR_WIDGETS"] = "Mirror Widgets"
L["MIRROR_WIDGETS_DESC"] = "Changes the order of status icons, the castbar, and the pvp icon."
L["MODE"] = "Mode"
L["MOUNT_AURAS"] = "Mount Auras"
L["MOUNT_AURAS_DESC"] = "Show mount auras."
Expand Down Expand Up @@ -391,6 +394,8 @@ Use |cffffd200[nl]|r for line breaking.]=]
L["POWER_TEXT"] = "Power Text"
L["PREDICTION"] = "Prediction"
L["PREVIEW"] = "Preview"
L["PROGRESS_BAR_ANIMATED"] = "Animated"
L["PROGRESS_BAR_SMOOTH"] = "Smooth"
L["PROGRESS_BARS"] = "Progress Bars"
L["PVP_ICON"] = "PvP Icon"
L["QUESTLOG_BUTTON_DESC"] = "Show daily quest reset timer."
Expand Down Expand Up @@ -501,9 +506,3 @@ L["YOUR_HEALING"] = "Your Healing"
L["YOURS_FIRST"] = "Yours First"
L["ZONE_ABILITY_BUTTON"] = "Zone Ability Button"
L["ZONE_TEXT"] = "Zone Text"

L["PROGRESS_BAR_ANIMATED"] = "Animated"
L["PROGRESS_BAR_SMOOTH"] = "Smooth"
L["GLOSS"] = "Gloss"
L["MIRROR_WIDGETS"] = "Mirror Widgets"
L["MIRROR_WIDGETS_DESC"] = "Changes the order of status icons, the castbar, and the pvp icon."
5 changes: 5 additions & 0 deletions locales/ruRU.lua
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ L["FUNC"] = "Функция"
L["GAIN"] = "Получение"
L["GAIN_LOSS_THRESHOLD"] = "Порог изменения"
L["GAIN_LOSS_THRESHOLD_DESC"] = "Если изменение ресурса выше данного значения (в процентах), то оно будет анимировано. Установите на 100, чтобы отключить."
L["GLOSS"] = "Глянец"
L["GM_FRAME"] = "Панель статуса запроса к ГМ"
L["GOLD"] = "Золото"
L["GROWTH_DIR"] = "Направление роста"
Expand Down Expand Up @@ -252,6 +253,8 @@ L["MINIMAP_BUTTONS_TOOLTIP"] = "Щелкните, чтобы показать к
L["MINUTES"] = "Минуты"
L["MIRROR_TIMER"] = "Таймеры"
L["MIRROR_TIMER_DESC"] = "Индикаторы дыхания, усталости и прочего."
L["MIRROR_WIDGETS"] = "Отразить виджеты"
L["MIRROR_WIDGETS_DESC"] = "Изменяет порядок иконок статуса, полосы заклинаний и PvP иконки."
L["MODE"] = "Режим"
L["MOUNT_AURAS"] = "Ауры средств передвижений"
L["MOUNT_AURAS_DESC"] = "Показывать ауры средств передвижений."
Expand Down Expand Up @@ -325,6 +328,8 @@ L["POWER_FORMAT_DESC"] = [=[Введите строку для изменени
L["POWER_TEXT"] = "Текст ресурса"
L["PREDICTION"] = "Прогноз"
L["PREVIEW"] = "Предпросмотр"
L["PROGRESS_BAR_ANIMATED"] = "Анимированные"
L["PROGRESS_BAR_SMOOTH"] = "Плавные"
L["PROGRESS_BARS"] = "Полосы прогресса"
L["PVP_ICON"] = "PvP иконка"
L["QUESTLOG_BUTTON_DESC"] = "Показывать время восстановления ежедневных заданий."
Expand Down
4 changes: 2 additions & 2 deletions ls_UI.toc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## Interface: 90002
## Interface: 90005
## Author: lightspark
## Version: 90002.06
## Version: 90005.01
## Title: LS: |cff1a9fc0UI|r
## Notes: Yet another UI, but this one is a bit special...
## SavedVariablesPerCharacter: LS_UI_CHAR_CONFIG
Expand Down
Loading

0 comments on commit aa324e8

Please sign in to comment.