mirror of
https://github.com/Bluewhale1337/ElvUIModernized.git
synced 2026-07-27 08:24:44 +00:00
update and locale
This commit is contained in:
+93
-101
@@ -5,8 +5,6 @@ local MM = E:GetModule("Minimap");
|
||||
--Cache global variables
|
||||
--Lua functions
|
||||
local getn = table.getn
|
||||
--WoW API / Variables
|
||||
local GENERAL, HIDE, MAIL_LABEL, MINIMAP_LABEL, NONE, WORLD_MAP = GENERAL, HIDE, MAIL_LABEL, MINIMAP_LABEL, NONE, WORLD_MAP
|
||||
|
||||
E.Options.args.maps = {
|
||||
type = "group",
|
||||
@@ -16,17 +14,17 @@ E.Options.args.maps = {
|
||||
worldMap = {
|
||||
order = 1,
|
||||
type = "group",
|
||||
name = WORLD_MAP,
|
||||
name = L["World Map"],
|
||||
args = {
|
||||
header = {
|
||||
order = 0,
|
||||
type = "header",
|
||||
name = WORLD_MAP
|
||||
name = L["World Map"]
|
||||
},
|
||||
generalGroup = {
|
||||
order = 1,
|
||||
type = "group",
|
||||
name = GENERAL,
|
||||
name = L["General"],
|
||||
guiInline = true,
|
||||
args = {
|
||||
smallerWorldMap = {
|
||||
@@ -35,9 +33,9 @@ E.Options.args.maps = {
|
||||
name = L["Smaller World Map"],
|
||||
desc = L["Make the world map smaller."],
|
||||
get = function(info) return E.global.general.smallerWorldMap end,
|
||||
set = function(info, value) E.global.general.smallerWorldMap = value; E:StaticPopup_Show("GLOBAL_RL") end,
|
||||
set = function(info, value) E.global.general.smallerWorldMap = value E:StaticPopup_Show("GLOBAL_RL") end,
|
||||
}
|
||||
},
|
||||
}
|
||||
},
|
||||
spacer = {
|
||||
order = 3,
|
||||
@@ -55,8 +53,8 @@ E.Options.args.maps = {
|
||||
type = "toggle",
|
||||
name = L["Enable"],
|
||||
desc = L["Puts coordinates on the world map."],
|
||||
get = function(info) return E.global.general.WorldMapCoordinates.enable; end,
|
||||
set = function(info, value) E.global.general.WorldMapCoordinates.enable = value; E:StaticPopup_Show("GLOBAL_RL"); end
|
||||
get = function(info) return E.global.general.WorldMapCoordinates.enable end,
|
||||
set = function(info, value) E.global.general.WorldMapCoordinates.enable = value E:StaticPopup_Show("GLOBAL_RL") end
|
||||
},
|
||||
spacer = {
|
||||
order = 2,
|
||||
@@ -67,9 +65,9 @@ E.Options.args.maps = {
|
||||
order = 3,
|
||||
type = "select",
|
||||
name = L["Position"],
|
||||
get = function(info) return E.global.general.WorldMapCoordinates.position; end,
|
||||
set = function(info, value) E.global.general.WorldMapCoordinates.position = value; WM:PositionCoords(); end,
|
||||
disabled = function() return not E.global.general.WorldMapCoordinates.enable; end,
|
||||
get = function(info) return E.global.general.WorldMapCoordinates.position end,
|
||||
set = function(info, value) E.global.general.WorldMapCoordinates.position = value WM:PositionCoords() end,
|
||||
disabled = function() return not E.global.general.WorldMapCoordinates.enable end,
|
||||
values = {
|
||||
["TOP"] = "TOP",
|
||||
["TOPLEFT"] = "TOPLEFT",
|
||||
@@ -83,8 +81,8 @@ E.Options.args.maps = {
|
||||
order = 4,
|
||||
type = "range",
|
||||
name = L["X-Offset"],
|
||||
get = function(info) return E.global.general.WorldMapCoordinates.xOffset; end,
|
||||
set = function(info, value) E.global.general.WorldMapCoordinates.xOffset = value; WM:PositionCoords(); end,
|
||||
get = function(info) return E.global.general.WorldMapCoordinates.xOffset end,
|
||||
set = function(info, value) E.global.general.WorldMapCoordinates.xOffset = value WM:PositionCoords() end,
|
||||
disabled = function() return not E.global.general.WorldMapCoordinates.enable end,
|
||||
min = -200, max = 200, step = 1
|
||||
},
|
||||
@@ -92,8 +90,8 @@ E.Options.args.maps = {
|
||||
order = 5,
|
||||
type = "range",
|
||||
name = L["Y-Offset"],
|
||||
get = function(info) return E.global.general.WorldMapCoordinates.yOffset; end,
|
||||
set = function(info, value) E.global.general.WorldMapCoordinates.yOffset = value; WM:PositionCoords(); end,
|
||||
get = function(info) return E.global.general.WorldMapCoordinates.yOffset end,
|
||||
set = function(info, value) E.global.general.WorldMapCoordinates.yOffset = value WM:PositionCoords() end,
|
||||
disabled = function() return not E.global.general.WorldMapCoordinates.enable end,
|
||||
min = -200, max = 200, step = 1
|
||||
}
|
||||
@@ -104,19 +102,19 @@ E.Options.args.maps = {
|
||||
minimap = {
|
||||
order = 2,
|
||||
type = "group",
|
||||
name = MINIMAP_LABEL,
|
||||
get = function(info) return E.db.general.minimap[ info[getn(info)] ]; end,
|
||||
name = L["Minimap"],
|
||||
get = function(info) return E.db.general.minimap[ info[getn(info)] ] end,
|
||||
childGroups = "tab",
|
||||
args = {
|
||||
header = {
|
||||
order = 0,
|
||||
type = "header",
|
||||
name = MINIMAP_LABEL
|
||||
name = L["Minimap"]
|
||||
},
|
||||
generalGroup = {
|
||||
order = 1,
|
||||
type = "group",
|
||||
name = GENERAL,
|
||||
name = L["General"],
|
||||
guiInline = true,
|
||||
args = {
|
||||
enable = {
|
||||
@@ -124,8 +122,8 @@ E.Options.args.maps = {
|
||||
type = "toggle",
|
||||
name = L["Enable"],
|
||||
desc = L["Enable/Disable the minimap. |cffFF0000Warning: This will prevent you from seeing the minimap datatexts.|r"],
|
||||
get = function(info) return E.private.general.minimap[ info[getn(info)] ]; end,
|
||||
set = function(info, value) E.private.general.minimap[ info[getn(info)] ] = value; E:StaticPopup_Show("PRIVATE_RL"); end,
|
||||
get = function(info) return E.private.general.minimap[ info[getn(info)] ] end,
|
||||
set = function(info, value) E.private.general.minimap[ info[getn(info)] ] = value E:StaticPopup_Show("PRIVATE_RL") end,
|
||||
},
|
||||
size = {
|
||||
order = 2,
|
||||
@@ -133,9 +131,9 @@ E.Options.args.maps = {
|
||||
name = L["Size"],
|
||||
desc = L["Adjust the size of the minimap."],
|
||||
min = 120, max = 250, step = 1,
|
||||
get = function(info) return E.db.general.minimap[ info[getn(info)] ]; end,
|
||||
set = function(info, value) E.db.general.minimap[ info[getn(info)] ] = value; MM:UpdateSettings(); end,
|
||||
disabled = function() return not E.private.general.minimap.enable; end
|
||||
get = function(info) return E.db.general.minimap[ info[getn(info)] ] end,
|
||||
set = function(info, value) E.db.general.minimap[ info[getn(info)] ] = value MM:UpdateSettings() end,
|
||||
disabled = function() return not E.private.general.minimap.enable end
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -144,43 +142,53 @@ E.Options.args.maps = {
|
||||
type = "group",
|
||||
name = L["Location Text"],
|
||||
args = {
|
||||
header = {
|
||||
order = 0,
|
||||
type = "header",
|
||||
name = L["Location Text"]
|
||||
},
|
||||
locationText = {
|
||||
order = 1,
|
||||
type = "select",
|
||||
name = L["Location Text"],
|
||||
desc = L["Change settings for the display of the location text that is on the minimap."],
|
||||
get = function(info) return E.db.general.minimap.locationText; end,
|
||||
set = function(info, value) E.db.general.minimap.locationText = value; MM:UpdateSettings(); MM:Update_ZoneText(); end,
|
||||
get = function(info) return E.db.general.minimap.locationText end,
|
||||
set = function(info, value) E.db.general.minimap.locationText = value MM:UpdateSettings() MM:Update_ZoneText() end,
|
||||
values = {
|
||||
["MOUSEOVER"] = L["Minimap Mouseover"],
|
||||
["SHOW"] = L["Always Display"],
|
||||
["HIDE"] = HIDE
|
||||
["HIDE"] = L["Hide"]
|
||||
},
|
||||
disabled = function() return not E.private.general.minimap.enable; end
|
||||
disabled = function() return not E.private.general.minimap.enable end
|
||||
},
|
||||
spacer = {
|
||||
order = 2,
|
||||
type = "description",
|
||||
name = ""
|
||||
},
|
||||
locationFont = {
|
||||
order = 2,
|
||||
order = 3,
|
||||
type = "select",
|
||||
dialogControl = "LSM30_Font",
|
||||
name = L["Font"],
|
||||
values = AceGUIWidgetLSMlists.font,
|
||||
set = function(info, value) E.db.general.minimap.locationFont = value; MM:Update_ZoneText(); end,
|
||||
disabled = function() return not E.private.general.minimap.enable; end,
|
||||
set = function(info, value) E.db.general.minimap.locationFont = value MM:Update_ZoneText() end,
|
||||
disabled = function() return not E.private.general.minimap.enable end,
|
||||
},
|
||||
locationFontSize = {
|
||||
order = 3,
|
||||
order = 4,
|
||||
type = "range",
|
||||
name = FONT_SIZE,
|
||||
name = L["Font Size"],
|
||||
min = 6, max = 36, step = 1,
|
||||
set = function(info, value) E.db.general.minimap.locationFontSize = value; MM:Update_ZoneText(); end,
|
||||
set = function(info, value) E.db.general.minimap.locationFontSize = value MM:Update_ZoneText() end,
|
||||
disabled = function() return not E.private.general.minimap.enable end,
|
||||
},
|
||||
locationFontOutline = {
|
||||
order = 4,
|
||||
order = 5,
|
||||
type = "select",
|
||||
name = L["Font Outline"],
|
||||
set = function(info, value) E.db.general.minimap.locationFontOutline = value; MM:Update_ZoneText(); end,
|
||||
disabled = function() return not E.private.general.minimap.enable; end,
|
||||
set = function(info, value) E.db.general.minimap.locationFontOutline = value MM:Update_ZoneText() end,
|
||||
disabled = function() return not E.private.general.minimap.enable end,
|
||||
values = {
|
||||
["NONE"] = L["None"],
|
||||
["OUTLINE"] = "OUTLINE",
|
||||
@@ -195,22 +203,27 @@ E.Options.args.maps = {
|
||||
type = "group",
|
||||
name = L["Reset Zoom"],
|
||||
args = {
|
||||
header = {
|
||||
order = 0,
|
||||
type = "header",
|
||||
name = L["Reset Zoom"]
|
||||
},
|
||||
enableZoomReset = {
|
||||
order = 1,
|
||||
type = "toggle",
|
||||
name = L["Reset Zoom"],
|
||||
get = function(info) return E.db.general.minimap.resetZoom.enable; end,
|
||||
set = function(info, value) E.db.general.minimap.resetZoom.enable = value; MM:UpdateSettings(); end,
|
||||
disabled = function() return not E.private.general.minimap.enable; end
|
||||
get = function(info) return E.db.general.minimap.resetZoom.enable end,
|
||||
set = function(info, value) E.db.general.minimap.resetZoom.enable = value MM:UpdateSettings() end,
|
||||
disabled = function() return not E.private.general.minimap.enable end
|
||||
},
|
||||
zoomResetTime = {
|
||||
order = 2,
|
||||
type = "range",
|
||||
name = L["Seconds"],
|
||||
min = 1, max = 15, step = 1,
|
||||
get = function(info) return E.db.general.minimap.resetZoom.time; end,
|
||||
set = function(info, value) E.db.general.minimap.resetZoom.time = value; MM:UpdateSettings(); end,
|
||||
disabled = function() return (not E.db.general.minimap.resetZoom.enable or not E.private.general.minimap.enable); end
|
||||
get = function(info) return E.db.general.minimap.resetZoom.time end,
|
||||
set = function(info, value) E.db.general.minimap.resetZoom.time = value MM:UpdateSettings() end,
|
||||
disabled = function() return (not E.db.general.minimap.resetZoom.enable or not E.private.general.minimap.enable) end
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -219,19 +232,29 @@ E.Options.args.maps = {
|
||||
type = "group",
|
||||
name = L["Minimap Buttons"],
|
||||
args = {
|
||||
header = {
|
||||
order = 0,
|
||||
type = "header",
|
||||
name = L["Minimap Buttons"]
|
||||
},
|
||||
calendar = {
|
||||
order = 1,
|
||||
type = "group",
|
||||
name = L["Calendar"],
|
||||
get = function(info) return E.db.general.minimap.icons.calendar[ info[getn(info)] ]; end,
|
||||
set = function(info, value) E.db.general.minimap.icons.calendar[ info[getn(info)] ] = value; MM:UpdateSettings(); end,
|
||||
name = L["Time Info"],
|
||||
get = function(info) return E.db.general.minimap.icons.calendar[ info[getn(info)] ] end,
|
||||
set = function(info, value) E.db.general.minimap.icons.calendar[ info[getn(info)] ] = value MM:UpdateSettings() end,
|
||||
args = {
|
||||
header = {
|
||||
order = 0,
|
||||
type = "header",
|
||||
name = L["Time Info"]
|
||||
},
|
||||
hideCalendar = {
|
||||
order = 1,
|
||||
type = "toggle",
|
||||
name = HIDE,
|
||||
get = function(info) return E.private.general.minimap.hideCalendar; end,
|
||||
set = function(info, value) E.private.general.minimap.hideCalendar = value; MM:UpdateSettings(); end,
|
||||
name = L["Hide"],
|
||||
get = function(info) return E.private.general.minimap.hideCalendar end,
|
||||
set = function(info, value) E.private.general.minimap.hideCalendar = value MM:UpdateSettings() end,
|
||||
width = "full"
|
||||
},
|
||||
spacer = {
|
||||
@@ -244,7 +267,7 @@ E.Options.args.maps = {
|
||||
order = 3,
|
||||
type = "select",
|
||||
name = L["Position"],
|
||||
disabled = function() return E.private.general.minimap.hideCalendar; end,
|
||||
disabled = function() return E.private.general.minimap.hideCalendar end,
|
||||
values = {
|
||||
["LEFT"] = L["Left"],
|
||||
["RIGHT"] = L["Right"],
|
||||
@@ -260,31 +283,37 @@ E.Options.args.maps = {
|
||||
order = 4,
|
||||
type = "range",
|
||||
name = L["Scale"],
|
||||
min = 0.5, max = 2, step = 0.05
|
||||
min = 0.5, max = 2, step = 0.05,
|
||||
disabled = function() return E.private.general.minimap.hideCalendar end
|
||||
},
|
||||
xOffset = {
|
||||
order = 5,
|
||||
type = "range",
|
||||
name = L["xOffset"],
|
||||
min = -50, max = 50, step = 1,
|
||||
disabled = function() return E.private.general.minimap.hideCalendar; end
|
||||
disabled = function() return E.private.general.minimap.hideCalendar end
|
||||
},
|
||||
yOffset = {
|
||||
order = 6,
|
||||
type = "range",
|
||||
name = L["yOffset"],
|
||||
min = -50, max = 50, step = 1,
|
||||
disabled = function() return E.private.general.minimap.hideCalendar; end
|
||||
disabled = function() return E.private.general.minimap.hideCalendar end
|
||||
}
|
||||
}
|
||||
},
|
||||
mail = {
|
||||
order = 2,
|
||||
type = "group",
|
||||
name = MAIL_LABEL,
|
||||
get = function(info) return E.db.general.minimap.icons.mail[ info[getn(info)] ]; end,
|
||||
set = function(info, value) E.db.general.minimap.icons.mail[ info[getn(info)] ] = value; MM:UpdateSettings(); end,
|
||||
name = L["Mail"],
|
||||
get = function(info) return E.db.general.minimap.icons.mail[ info[getn(info)] ] end,
|
||||
set = function(info, value) E.db.general.minimap.icons.mail[ info[getn(info)] ] = value MM:UpdateSettings() end,
|
||||
args = {
|
||||
header = {
|
||||
order = 0,
|
||||
type = "header",
|
||||
name = L["Mail"]
|
||||
},
|
||||
position = {
|
||||
order = 1,
|
||||
type = "select",
|
||||
@@ -324,51 +353,14 @@ E.Options.args.maps = {
|
||||
order = 3,
|
||||
type = "group",
|
||||
name = L["PvP Queue"],
|
||||
get = function(info) return E.db.general.minimap.icons.battlefield[ info[getn(info)] ]; end,
|
||||
set = function(info, value) E.db.general.minimap.icons.battlefield[ info[getn(info)] ] = value; MM:UpdateSettings(); end,
|
||||
get = function(info) return E.db.general.minimap.icons.battlefield[ info[getn(info)] ] end,
|
||||
set = function(info, value) E.db.general.minimap.icons.battlefield[ info[getn(info)] ] = value MM:UpdateSettings() end,
|
||||
args = {
|
||||
position = {
|
||||
order = 1,
|
||||
type = "select",
|
||||
name = L["Position"],
|
||||
values = {
|
||||
["LEFT"] = L["Left"],
|
||||
["RIGHT"] = L["Right"],
|
||||
["TOP"] = L["Top"],
|
||||
["BOTTOM"] = L["Bottom"],
|
||||
["TOPLEFT"] = L["Top Left"],
|
||||
["TOPRIGHT"] = L["Top Right"],
|
||||
["BOTTOMLEFT"] = L["Bottom Left"],
|
||||
["BOTTOMRIGHT"] = L["Bottom Right"]
|
||||
}
|
||||
header = {
|
||||
order = 0,
|
||||
type = "header",
|
||||
name = L["PvP Queue"]
|
||||
},
|
||||
scale = {
|
||||
order = 2,
|
||||
type = "range",
|
||||
name = L["Scale"],
|
||||
min = 0.5, max = 2, step = 0.05
|
||||
},
|
||||
xOffset = {
|
||||
order = 3,
|
||||
type = "range",
|
||||
name = L["xOffset"],
|
||||
min = -50, max = 50, step = 1
|
||||
},
|
||||
yOffset = {
|
||||
order = 4,
|
||||
type = "range",
|
||||
name = L["yOffset"],
|
||||
min = -50, max = 50, step = 1
|
||||
}
|
||||
}
|
||||
},
|
||||
difficulty = {
|
||||
order = 4,
|
||||
type = "group",
|
||||
name = L["Instance Difficulty"],
|
||||
get = function(info) return E.db.general.minimap.icons.difficulty[ info[getn(info)] ]; end,
|
||||
set = function(info, value) E.db.general.minimap.icons.difficulty[ info[getn(info)] ] = value; MM:UpdateSettings(); end,
|
||||
args = {
|
||||
position = {
|
||||
order = 1,
|
||||
type = "select",
|
||||
@@ -409,4 +401,4 @@ E.Options.args.maps = {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user