Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
ElvUI_RayUI
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
fgprodigal
ElvUI_RayUI
Commits
823f9e73
Commit
823f9e73
authored
Feb 25, 2020
by
fgprodigal
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replace tooltip target name with _G.YOU if target is you.
parent
9f120596
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
5 deletions
+19
-5
Modules/Tooltip/Tooltip.lua
Modules/Tooltip/Tooltip.lua
+19
-5
No files found.
Modules/Tooltip/Tooltip.lua
View file @
823f9e73
...
...
@@ -5,7 +5,7 @@ local TT = E.Tooltip
--Cache global variables
--Lua functions
--WoW API / Variables
local
_G
,
hooksecurefunc
=
_G
,
hooksecurefunc
local
_G
,
hooksecurefunc
,
string
=
_G
,
hooksecurefunc
,
string
local
UnitIsPlayer
=
UnitIsPlayer
-- GLOBALS:
...
...
@@ -14,19 +14,33 @@ function RTT:SetUnitText(tt, unit, level, isShiftKeyDown)
if
not
UnitIsPlayer
(
unit
)
then
if
tt
:
IsForbidden
()
then
return
end
for
i
=
2
,
tt
:
NumLines
()
do
local
tip
Line
=
_G
[
"GameTooltipTextLeft"
..
i
]
local
tipText
=
tipLine
and
tipLine
.
GetText
and
tip
Line
:
GetText
()
if
tip
Text
then
tipLine
:
SetText
(
tip
Text
:
gsub
(
"%|cff7f7f7f%
?
%
?
%|r"
,
"|cffff1919
??
|r"
))
local
left
Line
=
_G
[
"GameTooltipTextLeft"
..
i
]
local
leftText
=
leftLine
and
leftLine
.
GetText
and
left
Line
:
GetText
()
if
left
Text
then
leftLine
:
SetText
(
left
Text
:
gsub
(
"%|cff7f7f7f%
?
%
?
%|r"
,
"|cffff1919
??
|r"
))
end
end
end
end
function
RTT
:
GameTooltip_OnTooltipSetUnit
(
tt
)
if
tt
:
IsForbidden
()
then
return
end
for
i
=
2
,
tt
:
NumLines
()
do
local
leftLine
=
_G
[
"GameTooltipTextLeft"
..
i
]
local
rightLine
=
_G
[
"GameTooltipTextRight"
..
i
]
local
leftText
=
leftLine
and
leftLine
.
GetText
and
leftLine
:
GetText
()
local
rightText
=
rightLine
and
rightLine
.
GetText
and
rightLine
:
GetText
()
if
leftText
and
leftText
:
find
(
_G
.
TARGET
)
and
rightText
and
rightText
:
find
(
E
.
myname
)
then
rightLine
:
SetText
(
string.format
(
"|cffff0000>> %s <<|r"
,
_G
.
YOU
))
end
end
end
function
RTT
:
Initialize
()
if
E
.
private
.
tooltip
.
enable
~=
true
then
return
end
hooksecurefunc
(
TT
,
"SetUnitText"
,
RTT
.
SetUnitText
)
hooksecurefunc
(
TT
,
"GameTooltip_OnTooltipSetUnit"
,
RTT
.
GameTooltip_OnTooltipSetUnit
)
end
RayUI
:
RegisterModule
(
RTT
:
GetName
())
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment