Commit 495889b2 authored by Merathilis's avatar Merathilis

Merge branch 'development'

parents 3a1ec846 5654ccf1
[b][color=orange]v4.06[/color], 08.01.2019[/b][list]
[*]Fixed an error in ItemSocketing skin.
[*]Added back my ShadowOverlay.
[*]Adjust font size for ScrappingMachine & FlyoutButton iLvL.
[*]Update the Minimap Glow appearance.
[*]Update RealmInfo.
[*]Simplify the NamePlate Auras.
[*]Change the default position for the Combat State.[/list]
[b][color=orange]v4.05[/color], 27.12.2018[/b][list]
[*]Various skin adjustments & fixes.
[*]Use a nice glow around RaidBuffReminder & Buff Reminder.
......
** v4.06, 08.01.2019**
* Fixed an error in ItemSocketing skin.
* Added back my ShadowOverlay.
* Adjust font size for ScrappingMachine & FlyoutButton iLvL.
* Update the Minimap Glow appearance.
* Update RealmInfo.
* Simplify the NamePlate Auras.
* Change the default position for the Combat State.
** v4.05, 27.12.2018**
* Various skin adjustments & fixes.
* Use a nice glow around RaidBuffReminder & Buff Reminder.
......
## Interface: 80100
## Author: Merathilis
## Credits: Benik, Blazeflack, Azilroka, Simpy, Whiro, Darth Predator, fgprodigal, Elv & all AddOn Authors who inspired me.
## Version: 4.05
## Version: 4.06
## Title: |cFF00c0faElvUI|r |cffff7d0aMerathilisUI|r
## Notes: A decorative edit for ElvUI + additional features.
## Notes-deDE: Eine dekorative Erweiterung für ElvUI + einige zusätzliche Funktionen.
......@@ -10,8 +10,8 @@
## SavedVariables: MERData
## SavedVariablesPerCharacter: MERDataPerChar
## OptionalDeps: SharedMedia, AddOnSkins, BigWigs, ls_Toasts
## X-ElvVersion: 10.84
## X-Curse-Packaged-Version: 4.05
## X-ElvVersion: 10.85
## X-Curse-Packaged-Version: 4.06
## X-Curse-Project-Name: MerathilisUI
## X-Curse-Project-ID: merathilis-ui
## X-Tukui-ProjectID: 1
......
......@@ -16,6 +16,7 @@ function MER:LoadShadowandLightProfile()
E.db["sle"]["media"]["fonts"]["editbox"]["font"] = "Expressway"
E.db["sle"]["media"]["fonts"]["objective"]["size"] = 10
E.db["sle"]["media"]["fonts"]["objective"]["font"] = "Expressway"
E.db["sle"]["media"]["fonts"]["objective"]["outline"] = "OUTLINE"
E.db["sle"]["media"]["fonts"]["zone"]["font"] = "Expressway"
E.db["sle"]["media"]["fonts"]["mail"]["font"] = "Expressway"
E.db["sle"]["media"]["fonts"]["subzone"]["font"] = "Expressway"
......
......@@ -17,17 +17,17 @@ local CLOSE = CLOSE
local ChangeLogData = {
"Changes:",
"• Various skin adjustments & fixes.",
"• Use a nice glow around RaidBuffReminder & Buff Reminder.",
"• Update Minimap Coords Position.",
"• Removed my ShadowOverlay.",
"• Added a CombatFeedBack Text to the UF's.",
"• Fixed an error in ItemSocketing skin.",
"• Added back my ShadowOverlay.",
"• Adjust font size for ScrappingMachine & FlyoutButton iLvL.",
"• Update the Minimap Glow appearance.",
"• Update RealmInfo.",
"• Simplify the NamePlate Auras.",
"• Change the default position for the Combat State.",
-- "• ''",
" ",
"Notes:",
"• The options for the CombatFeedback can be found under:",
"• 'ElvUI - UnitFrames - Player / Target'",
-- "• ''",
}
......
......@@ -14,7 +14,7 @@ local IsAddOnLoaded = IsAddOnLoaded
-- GLOBALS: StaticPopup_Show
local function AddOptions()
E.Options.args.ElvUI_Header.name = E.Options.args.ElvUI_Header.name.." + "..MER.Title..format(": |cFF00c0fa%s|r", MER.Version)
E.Options.args.ElvUI_Header.name = E.Options.args.ElvUI_Header.name.." + |cffff7d0aMerathilisUI|r"..format(": |cFF00c0fa%s|r", MER.Version)
local ACD = LibStub("AceConfigDialog-3.0-ElvUI")
......
local E, L, V, P, G = unpack(ElvUI)
local LSM = LibStub("LibSharedMedia-3.0")
local LSM = E.LSM
local EP = LibStub("LibElvUIPlugin-1.0")
local addon, Engine = ...
......@@ -188,4 +188,4 @@ function MER:Initialize()
end
EP:RegisterPlugin(addon, self.AddOptions)
end
\ No newline at end of file
end
local MER, E, L, V, P, G = unpack(select(2, ...))
local LSM = LibStub('LibSharedMedia-3.0')
local LSM = E.LSM
-- GLOBALS: CHAT_FONT_HEIGHTS, GameTooltipHeader, NumberFont_OutlineThick_Mono_Small, SystemFont_Shadow_Large_Outline
-- GLOBALS: NumberFont_Outline_Huge, NumberFont_Outline_Large, NumberFont_Outline_Med, NumberFont_Shadow_Med
......@@ -141,5 +141,6 @@ function E:UpdateBlizzardFonts()
--SetFont(DestinyFontLarge, NORMAL, 14);
SetFont(Game12Font, NORMAL, 12); -- WarboardUI
SetFont(Game20Font, NORMAL, 20); -- WarboardUI
SetFont(QuestFont_Enormous, NORMAL, 30, nil, 1, 0.82, 0)
end
end
\ No newline at end of file
end
......@@ -337,9 +337,9 @@ function MER:AddTooltip(self, anchor, text, color)
end
-- frame text
function MER:CreateText(f, layer, size, text, classcolor, anchor, x, y)
function MER:CreateText(f, layer, size, outline, text, classcolor, anchor, x, y)
local text = f:CreateFontString(nil, layer)
text:FontTemplate(nil, size or 10, 'OUTLINE')
text:FontTemplate(nil, size or 10, outline or "OUTLINE")
text:SetWordWrap(false)
if text then
......@@ -455,6 +455,8 @@ local function Styling(f, useStripes, useGradient, useShadow, shadowOverlayWidth
stripes:SetPoint("TOPLEFT", 1, -1)
stripes:SetPoint("BOTTOMRIGHT", -1, 1)
stripes:SetTexture([[Interface\AddOns\ElvUI_MerathilisUI\media\textures\stripes]], true, true)
stripes:SetSnapToPixelGrid(false)
stripes:SetTexelSnappingBias(0)
stripes:SetHorizTile(true)
stripes:SetVertTile(true)
stripes:SetBlendMode("ADD")
......@@ -468,6 +470,8 @@ local function Styling(f, useStripes, useGradient, useShadow, shadowOverlayWidth
gradient:SetPoint("TOPLEFT", 1, -1)
gradient:SetPoint("BOTTOMRIGHT", -1, 1)
gradient:SetTexture([[Interface\AddOns\ElvUI_MerathilisUI\media\textures\gradient.tga]])
gradient:SetSnapToPixelGrid(false)
gradient:SetTexelSnappingBias(0)
gradient:SetVertexColor(.3, .3, .3, .15)
f.gradient = gradient
......@@ -479,6 +483,8 @@ local function Styling(f, useStripes, useGradient, useShadow, shadowOverlayWidth
mshadow:Width(shadowOverlayWidth or 33)
mshadow:Height(shadowOverlayHeight or 33)
mshadow:SetTexture([[Interface\AddOns\ElvUI_MerathilisUI\media\textures\Overlay]])
mshadow:SetSnapToPixelGrid(false)
mshadow:SetTexelSnappingBias(0)
mshadow:SetVertexColor(1, 1, 1, shadowOverlayAlpha or 0.6)
f.mshadow = mshadow
......
......@@ -243,7 +243,7 @@ function MER:SetupLayout()
E.db["general"]["minimap"]["icons"]["ticket"]["scale"] = 0.75
E.db["general"]["minimap"]["resetZoom"]["enable"] = true
E.db["general"]["minimap"]["resetZoom"]["time"] = 5
E.db["general"]["minimap"]["size"] = 146
E.db["general"]["minimap"]["size"] = 144
E.db["general"]["minimap"]["locationFontSize"] = 10
E.db["general"]["minimap"]["locationFontOutline"] = "OUTLINE"
E.db["general"]["minimap"]["locationFont"] = "Expressway"
......@@ -263,6 +263,7 @@ function MER:SetupLayout()
E.db["general"]["threat"]["enable"] = false
E.db["general"]["numberPrefixStyle"] = "ENGLISH"
E.db["general"]["talkingHeadFrameScale"] = 0.7
E.db["general"]["talkingHeadFrameBackdrop"] = true
E.db["general"]["decimalLenght"] = 0
E.db["general"]["altPowerBar"]["enable"] = true
E.db["general"]["altPowerBar"]["font"] = "Expressway"
......@@ -505,7 +506,7 @@ function MER:SetupLayout()
MER:SetMoverPosition("HonorBarMover", "BOTTOMRIGHT", E.UIParent, "BOTTOMRIGHT", -531, 21)
MER:SetMoverPosition("ExperienceBarMover", "BOTTOMLEFT", E.UIParent, "BOTTOMLEFT", 1, 50)
MER:SetMoverPosition("ReputationBarMover", "BOTTOMRIGHT", E.UIParent, "BOTTOMRIGHT", -19, 50)
MER:SetMoverPosition("MinimapMover", "BOTTOMRIGHT", E.UIParent, "BOTTOMRIGHT", -27, 50)
MER:SetMoverPosition("MinimapMover", "BOTTOMRIGHT", E.UIParent, "BOTTOMRIGHT", -28, 51)
MER:SetMoverPosition("mUI_RaidMarkerBarAnchor", "BOTTOMRIGHT", E.UIParent, "BOTTOMRIGHT", -277, 178)
-- Masque
......@@ -802,6 +803,7 @@ function MER:SetupUnitframes(layout)
E.db["unitframe"]["units"]["player"]["health"]["position"] = "LEFT"
E.db["unitframe"]["units"]["player"]["health"]["bgUseBarTexture"] = true
E.db["unitframe"]["units"]["player"]["name"]["text_format"] = ""
E.db["unitframe"]["units"]["player"]["power"]["powerPrediction"] = true
E.db["unitframe"]["units"]["player"]["power"]["height"] = 16
E.db["unitframe"]["units"]["player"]["power"]["hideonnpc"] = true
E.db["unitframe"]["units"]["player"]["power"]["detachFromFrame"] = true
......@@ -869,6 +871,7 @@ function MER:SetupUnitframes(layout)
E.db["unitframe"]["units"]["target"]["name"]["yOffset"] = -32
E.db["unitframe"]["units"]["target"]["name"]["position"] = "RIGHT"
E.db["unitframe"]["units"]["target"]["name"]["text_format"] = ""
E.db["unitframe"]["units"]["target"]["power"]["powerPrediction"] = true
E.db["unitframe"]["units"]["target"]["power"]["detachFromFrame"] = false
E.db["unitframe"]["units"]["target"]["power"]["hideonnpc"] = false
E.db["unitframe"]["units"]["target"]["power"]["height"] = 6
......
......@@ -405,6 +405,25 @@ function MERL:regEvents()
self:MiddleDatatextDimensions()
end
function MERL:ShadowOverlay()
-- Based on ncShadow
if E.db.mui.general.shadowOverlay ~= true then return end
self.f = CreateFrame("Frame", MER.Title.."ShadowBackground")
self.f:SetPoint("TOPLEFT")
self.f:SetPoint("BOTTOMRIGHT")
self.f:SetFrameLevel(0)
self.f:SetFrameStrata("BACKGROUND")
self.f.tex = self.f:CreateTexture()
self.f.tex:SetSnapToPixelGrid(false)
self.f.tex:SetTexelSnappingBias(0)
self.f.tex:SetTexture([[Interface\Addons\ElvUI_MerathilisUI\media\textures\Overlay]])
self.f.tex:SetAllPoints(self.f)
self.f:SetAlpha(0.7)
end
function MERL:ChatButtonHolder()
if E.private.chat.enable ~= true or E.db.mui.chat.sidePanel then return end
......@@ -430,6 +449,7 @@ function MERL:Initialize()
self:ChangeLayout()
self:regEvents()
self:CreateChatButtons()
self:ShadowOverlay()
end
local function InitializeCallback()
......
......@@ -10,7 +10,7 @@ local maxAlpha = 0.6
local updateFrame
local feedback = {}
local originalHeight = {}
local color
local color
local colors = {
STANDARD = { 1, 1, 1 }, -- color for everything not in the list below
-- damage colors
......@@ -55,11 +55,10 @@ local function createUpdateFrame()
object.CombatFeedbackText:Hide()
feedback[object] = nil
end
end
end
end)
end
local function combat(self, event, unit, eventType, flags, amount, dtype)
if unit ~= self.unit then return end
if unit == "vehicle" then unit = 'player' end
......@@ -156,4 +155,4 @@ end
function UF:RegCFT()
for k, object in ipairs(oUF.objects) do addCombat(object) end
oUF:RegisterInitCallback(addCombat)
end
\ No newline at end of file
end
......@@ -287,7 +287,7 @@ L["Justify Text"] = "Text ausrichten"
L["Auto Width"] = "Auto Breite"
L["Change width based on the zone name length."] = "Ändert die Breite nach dem Zonen Text."
L["Hearthstone Location"] = "Ruhestein Position"
L["Show the name on location your Heathstone is bound to."] = "Zeige die Position an wo dein Ruhestein liegt."
L["Show the name on location your Hearthstone is bound to."] = "Zeige die Position an wo dein Ruhestein liegt."
L["Combat Hide"] = "Im Kampf ausblenden"
L["Show/Hide all panels when in combat"] = "Zeige/Verstecke das Panel während des Kampfes"
L["Hide In Class Hall"] = "Verstecke in der Klassenhalle"
......@@ -488,6 +488,7 @@ Bitte beachte, dass einige Optionen |cff636363deaktiviert|r sind, wenn das AddOn
L["Creates decorative stripes and a gradient on some frames"] = "Fügt dekorative Streifen und einen transparenten Farbverlauf an einigen Fenstern hinzu"
L["MerathilisUI Style"] = "MerathilisUI Stil"
L["MerathilisUI Panels"] = "MerathilisUI Leisten"
L["MerathilisUI Shadows"] = "MerathilisUI Schatten"
L["Undress Button"] = "Ausziehen Taste"
-- Profiles
......
......@@ -287,7 +287,7 @@ L["Auto Width"] = true
L["Change width based on the zone name length."] = true
L["Hearthstone Location"] = true
L["Hearthstone Toys Order"] = true
L["Show the name on location your Heathstone is bound to."] = true
L["Show the name on location your Hearthstone is bound to."] = true
L["Combat Hide"] = true
L["Show/Hide all panels when in combat"] = true
L["Hide In Class Hall"] = true
......@@ -487,6 +487,7 @@ Please note that some of these options will be |cff636363disabled|r if the addon
L["Creates decorative stripes and a gradient on some frames"] = true
L["MerathilisUI Style"] = true
L["MerathilisUI Panels"] = true
L["MerathilisUI Shadows"] = true
L["Undress Button"] = true
-- Profiles
......
......@@ -287,7 +287,7 @@ L["Auto Width"] = true
L["Change width based on the zone name length."] = true
L["Hearthstone Location"] = true
L["Hearthstone Toys Order"] = true
L["Show the name on location your Heathstone is bound to."] = true
L["Show the name on location your Hearthstone is bound to."] = true
L["Combat Hide"] = true
L["Show/Hide all panels when in combat"] = true
L["Hide In Class Hall"] = true
......@@ -487,6 +487,7 @@ Please note that some of these options will be |cff636363disabled|r if the addon
L["Creates decorative stripes and a gradient on some frames"] = true
L["MerathilisUI Style"] = true
L["MerathilisUI Panels"] = true
L["MerathilisUI Shadows"] = true
L["Undress Button"] = true
-- Profiles
......
......@@ -286,7 +286,7 @@ L["Justify Text"] = true
L["Auto Width"] = true
L["Change width based on the zone name length."] = true
L["Hearthstone Location"] = true
L["Show the name on location your Heathstone is bound to."] = true
L["Show the name on location your Hearthstone is bound to."] = true
L["Combat Hide"] = true
L["Show/Hide all panels when in combat"] = true
L["Hide In Class Hall"] = true
......@@ -488,6 +488,7 @@ Please note that some of these options will be |cff636363disabled|r if the addon
L["Creates decorative stripes and a gradient on some frames"] = true
L["MerathilisUI Style"] = true
L["MerathilisUI Panels"] = true
L["MerathilisUI Shadows"] = true
L["Undress Button"] = true
-- Profiles
......
......@@ -286,7 +286,7 @@ L["Justify Text"] = true
L["Auto Width"] = true
L["Change width based on the zone name length."] = true
L["Hearthstone Location"] = true
L["Show the name on location your Heathstone is bound to."] = true
L["Show the name on location your Hearthstone is bound to."] = true
L["Combat Hide"] = true
L["Show/Hide all panels when in combat"] = true
L["Hide In Class Hall"] = true
......@@ -488,6 +488,7 @@ Please note that some of these options will be |cff636363disabled|r if the addon
L["Creates decorative stripes and a gradient on some frames"] = true
L["MerathilisUI Style"] = true
L["MerathilisUI Panels"] = true
L["MerathilisUI Shadows"] = true
L["Undress Button"] = true
-- Profiles
......
......@@ -286,7 +286,7 @@ L["Justify Text"] = true
L["Auto Width"] = true
L["Change width based on the zone name length."] = true
L["Hearthstone Location"] = true
L["Show the name on location your Heathstone is bound to."] = true
L["Show the name on location your Hearthstone is bound to."] = true
L["Combat Hide"] = true
L["Show/Hide all panels when in combat"] = true
L["Hide In Class Hall"] = true
......@@ -488,6 +488,7 @@ Please note that some of these options will be |cff636363disabled|r if the addon
L["Creates decorative stripes and a gradient on some frames"] = true
L["MerathilisUI Style"] = true
L["MerathilisUI Panels"] = true
L["MerathilisUI Shadows"] = true
L["Undress Button"] = true
-- Profiles
......
......@@ -286,7 +286,7 @@ L["Justify Text"] = true
L["Auto Width"] = true
L["Change width based on the zone name length."] = true
L["Hearthstone Location"] = true
L["Show the name on location your Heathstone is bound to."] = true
L["Show the name on location your Hearthstone is bound to."] = true
L["Combat Hide"] = true
L["Show/Hide all panels when in combat"] = true
L["Hide In Class Hall"] = true
......@@ -488,6 +488,7 @@ Please note that some of these options will be |cff636363disabled|r if the addon
L["Creates decorative stripes and a gradient on some frames"] = true
L["MerathilisUI Style"] = true
L["MerathilisUI Panels"] = true
L["MerathilisUI Shadows"] = true
L["Undress Button"] = true
-- Profiles
......
......@@ -286,7 +286,7 @@ L["Justify Text"] = true
L["Auto Width"] = true
L["Change width based on the zone name length."] = true
L["Hearthstone Location"] = true
L["Show the name on location your Heathstone is bound to."] = true
L["Show the name on location your Hearthstone is bound to."] = true
L["Combat Hide"] = true
L["Show/Hide all panels when in combat"] = true
L["Hide In Class Hall"] = true
......@@ -488,6 +488,7 @@ Please note that some of these options will be |cff636363disabled|r if the addon
L["Creates decorative stripes and a gradient on some frames"] = true
L["MerathilisUI Style"] = true
L["MerathilisUI Panels"] = true
L["MerathilisUI Shadows"] = true
L["Undress Button"] = true
-- Profiles
......
......@@ -2,7 +2,6 @@
local M = E:GetModule("Minimap")
local DD = E:GetModule("Dropdown")
local LP = MER:NewModule("LocPanel", "AceTimer-3.0", "AceEvent-3.0")
local LSM = LibStub("LibSharedMedia-3.0");
LP.modName = L["Location Panel"]
-- Cache global variables
......
......@@ -279,7 +279,7 @@ local function LocPanelTable()
type = "toggle",
order = 6,
name = L["Hearthstone Location"],
desc = L["Show the name on location your Heathstone is bound to."],
desc = L["Show the name on location your Hearthstone is bound to."],
},
showHearthstones = {
type = "toggle",
......
local MER, E, L, V, P, G = unpack(select(2, ...))
local MM = MER:NewModule("mUIMinimap", "AceHook-3.0", "AceEvent-3.0", "AceTimer-3.0")
local LCG = LibStub('LibCustomGlow-1.0')
MM.modName = L["MiniMap"]
--Cache global variables
......@@ -15,27 +16,20 @@ local Minimap = _G["Minimap"]
--Global variables that we don't cache, list them here for mikk's FindGlobals script
-- GLOBALS:
local r, g, b = unpack(E["media"].rgbvaluecolor)
function MM:CheckMail()
local inv = C_Calendar_GetNumPendingInvites()
local mail = _G["MiniMapMailFrame"]:IsShown() and true or false
if inv > 0 and mail then -- New invites and mail
Minimap.backdrop:SetBackdropBorderColor(242, 5/255, 5/255)
MER:CreatePulse(Minimap.backdrop, 1, 1)
LCG.PixelGlow_Start(Minimap, {242, 5/255, 5/255, 1}, 8, -0.25, nil, 1)
elseif inv > 0 and not mail then -- New invites and no mail
Minimap.backdrop:SetBackdropBorderColor(1, 30/255, 60/255)
MER:CreatePulse(Minimap.backdrop, 1, 1)
LCG.PixelGlow_Start(Minimap, {1, 30/255, 60/255, 1}, 8, -0.25, nil, 1)
elseif inv == 0 and mail then -- No invites and new mail
Minimap.backdrop:SetBackdropBorderColor(unpack(E["media"].rgbvaluecolor))
MER:CreatePulse(Minimap.backdrop, 1, 1)
LCG.PixelGlow_Start(Minimap, {r, g, b, 1}, 8, -0.25, nil, 1)
else -- None of the above
Minimap.backdrop:SetScript("OnUpdate", nil)
if not E.PixelMode then
Minimap.backdrop:SetAlpha(1)
else
Minimap.backdrop:SetAlpha(0)
end
Minimap.backdrop:SetBackdropBorderColor(unpack(E["media"].bordercolor))
LCG.PixelGlow_Stop(Minimap)
end
end
......@@ -79,7 +73,7 @@ function MM:MiniMapPing()
local yOffset = E.db.mui.maps.minimap.ping.yOffset or 0
local f = CreateFrame("Frame", nil, Minimap)
f:SetAllPoints()
f.text = MER:CreateText(f, "OVERLAY", 10, "", nil, pos, xOffset, yOffset)
f.text = MER:CreateText(f, "OVERLAY", 10, "OUTLINE", "", nil, pos, xOffset, yOffset)
local anim = f:CreateAnimationGroup()
anim:SetScript("OnPlay", function() f:SetAlpha(1) end)
......
......@@ -258,11 +258,11 @@ end
function SMB:Update()
if not SMB.db['enable'] then return end
local AnchorX, AnchorY, MaxX = 0, 1, SMB.db['buttonsPerRow']
local ButtonsPerRow = SMB.db['buttonsPerRow']
local AnchorX, AnchorY, MaxX = 0, 1, SMB.db['buttonsPerRow'] or 12
local ButtonsPerRow = SMB.db['buttonsPerRow'] or 12
local NumColumns = ceil(#SMB.Buttons / ButtonsPerRow)
local Spacing, Mult = SMB.db['buttonSpacing'], 1
local Size = SMB.db['iconSize']
local Spacing, Mult = SMB.db['buttonSpacing'] or 2, 1
local Size = SMB.db['iconSize'] or 27
local ActualButtons, Maxed = 0
if NumColumns == 1 and ButtonsPerRow > #SMB.Buttons then
......
local MER, E, L, V, P, G = unpack(select(2, ...))
local MERA = MER:NewModule("mUIAnnounce", "AceEvent-3.0")
local LSM = LibStub("LibSharedMedia-3.0")
local LSM = E.LSM
MERA.modName = L["Announce"]
--Cache global variables
......@@ -46,7 +46,7 @@ end
local speed = .057799924 -- how fast the text appears
local font = LSM:Fetch("font", "Expressway")
local fontflag = "OUTLINE" -- for pixelfont stick to this else OUTLINE or THINOUTLINE
local fontsize = 24 -- font size
local fontsize = 18 -- font size
local GetNextChar = function(word,num)
local c = word:byte(num)
......@@ -68,7 +68,7 @@ local updaterun = CreateFrame("Frame")
local flowingframe = CreateFrame("Frame", nil, E.UIParent)
flowingframe:SetFrameStrata("HIGH")
flowingframe:SetPoint("CENTER", E.UIParent, 0, 140) -- where we want the textframe
flowingframe:SetPoint("CENTER", E.UIParent, "TOP", 0, -80) -- where we want the textframe
flowingframe:SetHeight(64)
local flowingtext = flowingframe:CreateFontString(nil,"OVERLAY")
......@@ -105,7 +105,7 @@ local updatestring = function(self,t)
flowingtext:SetPoint("RIGHT")
flowingtext:SetJustifyH("RIGHT")
rightchar:ClearAllPoints()
rightchar:SetPoint("RIGHT",flowingtext,"LEFT")
rightchar:SetPoint("RIGHT", flowingtext, "LEFT")
rightchar:SetJustifyH("RIGHT")
self:Hide()
count = 1.456789
......
......@@ -16,7 +16,7 @@ function MI:ItemLevel()
--ItemLevel on Scrapping Machine
local function ScrappingMachineUpdate(self)
if not self.iLvl then
self.iLvl = MER:CreateText(self, "OVERLAY", 10)
self.iLvl = MER:CreateText(self, "OVERLAY", E.db.general.fontSize or 11, E.db.general.fontStyle or "OUTLINE")
self.iLvl:SetPoint("BOTTOMRIGHT", 0, 2)
end
......@@ -47,7 +47,7 @@ function MI:ItemLevel()
-- ItemLevel on Flyoutbuttons
local function SetupFlyoutLevel(button, bag, slot, quality)
if not button.iLvl then
button.iLvl = MER:CreateText(button, "OVERLAY", 10)
button.iLvl = MER:CreateText(button, "OVERLAY", E.db.general.fontSize or 11, E.db.general.fontStyle or "OUTLINE")
button.iLvl:SetPoint("BOTTOMRIGHT", 0, 2)
end
......
local MER, E, L, V, P, G = unpack(select(2, ...))
local MI = MER:GetModule("mUIMisc")
local LSM = LibStub("LibSharedMedia-3.0")
--Cache global variables
--Lua functions
......@@ -23,7 +22,7 @@ local UNKNOWN = UNKNOWN
--Global variables that we don't cache, list them here for the mikk's Find Globals script
-- GLOBALS: CUSTOM_CLASS_COLORS, RAID_CLASS_COLORS
local function getcolor()
local function Getcolor()
local reaction = UnitReaction("mouseover", "player") or 5
if UnitIsPlayer("mouseover") then
......@@ -50,23 +49,26 @@ local function getcolor()
end
function MI:LoadnameHover()
if E.db.mui.misc.nameHover ~= true or IsAddOnLoaded("bdNameHover") then return end
if E.db.mui.nameHover.enable ~= true or IsAddOnLoaded("bdNameHover") then return end
local db = E.db.mui.nameHover
local tooltip = CreateFrame("frame", nil)
tooltip:SetFrameStrata("TOOLTIP")
tooltip.text = MER:CreateText(tooltip, "OVERLAY", 7, "OUTLINE")
tooltip.text = tooltip:CreateFontString(nil, "OVERLAY")
tooltip.text:FontTemplate(nil, db.fontSize or 7, db.fontOutline or "OUTLINE")
-- Show unit name at mouse
tooltip:SetScript("OnUpdate", function(self)
if GetMouseFocus() and GetMouseFocus():IsForbidden() then self:Hide() return end
if GetMouseFocus() and GetMouseFocus():GetName() ~= "WorldFrame" then self:Hide() return end
if not UnitExists("mouseover") then self:Hide() return end
tooltip:SetScript("OnUpdate", function(tt)
if GetMouseFocus() and GetMouseFocus():IsForbidden() then tt:Hide() return end
if GetMouseFocus() and GetMouseFocus():GetName() ~= "WorldFrame" then tt:Hide() return end
if not UnitExists("mouseover") then tt:Hide() return end
local x, y = GetCursorPosition()
local scale = UIParent:GetEffectiveScale()
self.text:SetPoint("CENTER", UIParent, "BOTTOMLEFT", x, y+15)
tt.text:SetPoint("CENTER", UIParent, "BOTTOMLEFT", x, y+15)
end)
tooltip:SetScript("OnEvent", function(self)
tooltip:SetScript("OnEvent", function(tt)
if GetMouseFocus():GetName() ~= "WorldFrame" then return end
local name = UnitName("mouseover") or UNKNOWN
......@@ -77,10 +79,10 @@ function MI:LoadnameHover()
if AFK then prefix = "|cffff0000<AFK>|r " end
if DND then prefix = "|cffffce00<DND>|r " end
self.text:SetTextColor(getcolor())
self.text:SetText(prefix..name)
tt.text:SetTextColor(Getcolor())
tt.text:SetText(prefix..name)
self:Show()
tt:Show()
end)
tooltip:RegisterEvent("UPDATE_MOUSEOVER_UNIT")
......
......@@ -57,16 +57,42 @@ local function Misc()
name = MERA.modName,
desc = L["Skill gains"],
},
nameHover = {
cursor = {
order = 7,