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
Open sidebar
Croc
VuhDo
Commits
1d7172c7
Commit
1d7172c7
authored
4 years ago
by
Croc
Browse files
Options
Download
Email Patches
Plain Diff
Added smoothing of health bars through LibSmoothStatusBar
parent
af1fc58a
Pipeline
#555
passed with stage
in 14 seconds
Changes
9
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
139 additions
and
15 deletions
+139
-15
Libs/LibSmoothStatusBar-1.0/.pkgmeta
Libs/LibSmoothStatusBar-1.0/.pkgmeta
+4
-0
Libs/LibSmoothStatusBar-1.0/LibSmoothStatusBar-1.0.lua
Libs/LibSmoothStatusBar-1.0/LibSmoothStatusBar-1.0.lua
+106
-0
Libs/LibSmoothStatusBar-1.0/LibSmoothStatusBar-1.0.toc
Libs/LibSmoothStatusBar-1.0/LibSmoothStatusBar-1.0.toc
+5
-0
Libs/LibSmoothStatusBar-1.0/LibSmoothStatusBar-1.0.xml
Libs/LibSmoothStatusBar-1.0/LibSmoothStatusBar-1.0.xml
+4
-0
Libs/Libs.xml
Libs/Libs.xml
+1
-0
VuhDoAddonAdapter.lua
VuhDoAddonAdapter.lua
+1
-0
VuhDoBarCustomizerHealth.lua
VuhDoBarCustomizerHealth.lua
+5
-5
VuhDoBarCustomizerTarget.lua
VuhDoBarCustomizerTarget.lua
+5
-6
VuhDoPanelRedraw.lua
VuhDoPanelRedraw.lua
+8
-4
No files found.
Libs/LibSmoothStatusBar-1.0/.pkgmeta
0 → 100644
View file @
1d7172c7
package-as: LibSmoothStatusBar-1.0
enable-nolib-creation: no
externals:
LibStub: svn://svn.wowace.com/wow/libstub/mainline/trunk
This diff is collapsed.
Click to expand it.
Libs/LibSmoothStatusBar-1.0/LibSmoothStatusBar-1.0.lua
0 → 100644
View file @
1d7172c7
--[[
Copyright (c) 2013 Bastien Clément
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
]]
-- Port of oUF Smooth Update by Xuerian
-- http://www.wowinterface.com/downloads/info11503-oUFSmoothUpdate.html
--[[
Functions:
- SmoothBar(bar)
Enables smooth animation for the bar.
The bar:SetValue() method will be overloaded to handle animation.
Parameters:
bar - StatusBar frame - The StatusBar to be animated
- ResetBar(bar)
Restores the bar to its original state. Disabling animation.
Parameters:
bar - StatusBar frame - The StatusBar to be restored
]]
local
MAJOR
=
"LibSmoothStatusBar-1.0"
local
MINOR
=
1
local
lib
,
upgrade
=
LibStub
:
NewLibrary
(
MAJOR
,
MINOR
)
if
not
lib
then
return
end
lib
.
frame
=
lib
.
frame
or
CreateFrame
(
'Frame'
)
lib
.
smoothing
=
lib
.
smoothing
or
{}
-------------------------------------------------------------------------------
local
abs
=
math.abs
local
function
AnimationTick
()
for
bar
,
value
in
pairs
(
lib
.
smoothing
)
do
local
cur
=
bar
:
GetValue
()
local
new
=
cur
+
((
value
-
cur
)
/
3
)
if
new
~=
new
then
new
=
value
end
if
cur
==
value
or
abs
(
new
-
value
)
<
2
then
bar
:
SetValue_
(
value
)
lib
.
smoothing
[
bar
]
=
nil
else
bar
:
SetValue_
(
new
)
end
end
end
lib
.
frame
:
SetScript
(
"OnUpdate"
,
AnimationTick
)
local
function
SmoothSetValue
(
self
,
value
)
local
_
,
max
=
self
:
GetMinMaxValues
()
if
value
==
self
:
GetValue
()
or
(
self
.
_max
and
self
.
_max
~=
max
)
then
lib
.
smoothing
[
self
]
=
nil
self
:
SetValue_
(
value
)
else
lib
.
smoothing
[
self
]
=
value
end
self
.
_max
=
max
end
if
upgrade
then
for
bar
,
value
in
pairs
(
lib
.
smoothing
)
do
if
bar
.
SetValue_
then
bar
.
SetValue
=
SmoothSetValue
end
end
end
function
lib
:
SmoothBar
(
bar
)
if
not
bar
.
SetValue_
then
bar
.
SetValue_
=
bar
.
SetValue
;
bar
.
SetValue
=
SmoothSetValue
;
end
end
function
lib
:
ResetBar
(
bar
)
if
bar
.
SetValue_
then
bar
.
SetValue
=
bar
.
SetValue_
;
bar
.
SetValue_
=
nil
;
end
end
This diff is collapsed.
Click to expand it.
Libs/LibSmoothStatusBar-1.0/LibSmoothStatusBar-1.0.toc
0 → 100644
View file @
1d7172c7
## Interface: 60000
## Title: Lib: SmoothStatusBar-1.0
## Notes: Smoothly animates status bar
LibSmoothStatusBar-1.0.xml
This diff is collapsed.
Click to expand it.
Libs/LibSmoothStatusBar-1.0/LibSmoothStatusBar-1.0.xml
0 → 100644
View file @
1d7172c7
<Ui
xsi:schemaLocation=
"http://www.blizzard.com/wow/ui/ ..\FrameXML\UI.xsd"
>
<Script
file=
"LibStub\LibStub.lua"
/>
<Script
file=
"LibSmoothStatusBar-1.0.lua"
/>
</Ui>
This diff is collapsed.
Click to expand it.
Libs/Libs.xml
View file @
1d7172c7
...
...
@@ -21,5 +21,6 @@
<Script
file=
"LibBase64-1.0\LibBase64-1.0.lua"
/>
<Include
file=
"LibCustomGlow-1.0\LibCustomGlow-1.0.xml"
/>
<Include
file=
"NickTag-1.0\NickTag-1.0.xml"
/>
<Include
file=
"LibSmoothStatusBar-1.0\LibSmoothStatusBar-1.0.xml"
/>
</Ui>
This diff is collapsed.
Click to expand it.
VuhDoAddonAdapter.lua
View file @
1d7172c7
...
...
@@ -15,6 +15,7 @@ VUHDO_LibCompressEncode = VUHDO_LibCompress:GetAddonEncodeTable();
VUHDO_LibBase64
=
LibStub
:
GetLibrary
(
"LibBase64-1.0"
);
VUHDO_LibCustomGlow
=
LibStub
(
"LibCustomGlow-1.0"
);
VUHDO_LibNickTag
=
LibStub
(
"NickTag-1.0"
);
VUHDO_LibSmoothStatusBar
=
LibStub
(
"LibSmoothStatusBar-1.0"
);
VUHDO_LibSharedMedia
:
Register
(
"font"
,
"Arial Black"
,
"Interface\\AddOns\\VuhDo\\Fonts\\ariblk.ttf"
);
VUHDO_LibSharedMedia
:
Register
(
"font"
,
"Emblem"
,
"Interface\\AddOns\\VuhDo\\Fonts\\Emblem.ttf"
);
...
...
This diff is collapsed.
Click to expand it.
VuhDoBarCustomizerHealth.lua
View file @
1d7172c7
...
...
@@ -252,7 +252,7 @@ function VUHDO_overhealTextCallback(aUnit, aPanelNum, aProviderName, aText, aVal
tBar
=
VUHDO_getHealthBar
(
tButton
,
1
);
VUHDO_getOverhealText
(
tBar
):
SetText
(
aText
);
--
Sonderwurst Overheal wirklich ntig?
--
Overheal really necessary ? -Sonderwurst
if
strfind
(
aProviderName
,
"OVERHEAL"
,
1
,
true
)
then
tInfo
=
VUHDO_RAID
[
aUnit
];
if
tInfo
then
...
...
@@ -544,7 +544,7 @@ function VUHDO_healthBarBouquetCallback(aUnit, anIsActive, anIcon, aCurrValue, a
VUHDO_getLifeText
(
tHealthBar
):
SetTextColor
(
VUHDO_textColor
(
aColor
));
end
end
tHealthBar
:
SetValue
(
tQuota
);
tHealthBar
:
SetValue
(
tQuota
);
else
tHealthBar
:
SetValue
(
0
);
end
...
...
@@ -555,7 +555,7 @@ function VUHDO_healthBarBouquetCallback(aUnit, anIsActive, anIcon, aCurrValue, a
if
not
tInfo
then
return
;
end
-- Targets und targets-of-target, die im Raid sind
tAllButtons
=
VUHDO_IN_RAID_TARGET_BUTTONS
[
tInfo
[
"name"
]];
tAllButtons
=
VUHDO_IN_RAID_TARGET_BUTTONS
[
tInfo
[
"name"
]];
if
not
tAllButtons
then
return
;
end
VUHDO_CUSTOM_INFO
[
"fixResolveId"
]
=
aUnit
;
...
...
@@ -588,7 +588,7 @@ function VUHDO_healthBarBouquetCallbackCustom(aUnit, anIsActive, anIcon, aCurrVa
VUHDO_getLifeText
(
tHealthBar
):
SetTextColor
(
VUHDO_textColor
(
aColor
));
end
end
tHealthBar
:
SetValue
(
tQuota
);
tHealthBar
:
SetValue
(
tQuota
);
else
tHealthBar
:
SetValue
(
0
);
end
...
...
@@ -727,7 +727,7 @@ function VUHDO_updateHealthBarsFor(aUnit, anUpdateMode)
elseif
5
==
anUpdateMode
then
-- VUHDO_UPDATE_RANGE
VUHDO_determineIncHeal
(
aUnit
);
for
_
,
tButton
in
pairs
(
tAllButtons
)
do
VUHDO_customizeText
(
tButton
,
2
,
false
);
-- fr d/c tag -- VUHDO_UPDATE_HEALTH
VUHDO_customizeText
(
tButton
,
2
,
false
);
-- f
o
r d/c tag -- VUHDO_UPDATE_HEALTH
VUHDO_customizeDebuffIconsRange
(
tButton
);
end
VUHDO_updateIncHeal
(
aUnit
);
...
...
This diff is collapsed.
Click to expand it.
VuhDoBarCustomizerTarget.lua
View file @
1d7172c7
...
...
@@ -181,9 +181,9 @@ local VUHDO_customizeTargetBar = VUHDO_customizeTargetBar;
-- W
ir merken uns di
e
T
arget
-B
uttons
,
w
enn das Ziel im Raid ist,
--
um Gesundheitsupdates mit dem
regul
ren M
echanism
us durchzufhren
--
di
e
T
arget
-B
uttons
sind also durch den T
arget
-N
ame
n indiziert
.
-- W
e remember th
e
t
arget
b
uttons w
hen the target is in the raid
--
to perform health updates using the
regul
ar m
echanism
.
--
Th
e
t
arget
b
uttons
are indexed by t
arget
n
ame
aswell
.
local
tName
;
local
function
VUHDO_rememberTargetButton
(
aTargetUnit
,
aButton
)
for
tUnit
,
tInfo
in
pairs
(
VUHDO_RAID
)
do
...
...
@@ -202,9 +202,8 @@ end
-- Lsche alle Target-Buttons der Person, deren Ziel sich gendert hat
-- Wobei die Buttons mit dem Namen des TARGETS indiziert sind, welchen
-- wir uns VUHDO_IN_RAID_TARGETS aber gemerkt haben
-- Delete all target buttons for the person whose target has changed.
-- Those buttons are indexed with the name of the TARGET, which we have VUHDO_IN_RAID_TARGETS noted.
local
tName
;
local
function
VUHDO_forgetTargetButton
(
aTargetUnit
,
aButton
)
tName
=
VUHDO_IN_RAID_TARGETS
[
aTargetUnit
];
...
...
This diff is collapsed.
Click to expand it.
VuhDoPanelRedraw.lua
View file @
1d7172c7
...
...
@@ -243,6 +243,10 @@ local VUHDO_positionHealButton = VUHDO_positionHealButton;
--
local
function
VUHDO_initHealthBar
()
if
VUHDO_LibSmoothStatusBar
then
-- Enable smoothing of health bars if the lib is found
VUHDO_LibSmoothStatusBar
:
SmoothBar
(
sHealthBar
);
end
sHealthBar
:
SetPoint
(
"TOPLEFT"
,
VUHDO_getHealthBar
(
sButton
,
6
):
GetName
(),
"TOPLEFT"
,
0
,
0
);
-- Incoming bar
sHealthBar
:
SetWidth
(
sBarWidth
);
sHealthBar
:
SetHeight
(
sBarHeight
);
...
...
@@ -477,9 +481,9 @@ local function VUHDO_initBarTexts(aButton, aHealthBar, aWidth)
end
local
tAnchorObject
;
if
strfind
(
sTextAnchors
[
1
],
"BOTTOM"
,
1
,
true
)
and
strfind
(
sTextAnchors
[
2
],
"TOP"
,
1
,
true
)
--
ber
Button
if
strfind
(
sTextAnchors
[
1
],
"BOTTOM"
,
1
,
true
)
and
strfind
(
sTextAnchors
[
2
],
"TOP"
,
1
,
true
)
--
above
Button
and
VUHDO_INDICATOR_CONFIG
[
"BOUQUETS"
][
"THREAT_BAR"
]
~=
""
then
tAnchorObject
=
VUHDO_getHealthBar
(
aButton
,
7
)
or
aButton
;
-- Target
u
nd To
t
ha
t keinen
Threat bar
tAnchorObject
=
VUHDO_getHealthBar
(
aButton
,
7
)
or
aButton
;
-- Target
a
nd To
T
ha
ve no
Threat bar
elseif
strfind
(
sTextAnchors
[
2
],
"BOTTOM"
,
1
,
true
)
and
strfind
(
sTextAnchors
[
1
],
"TOP"
,
1
,
true
)
then
tAnchorObject
=
aButton
;
else
...
...
@@ -1100,7 +1104,7 @@ function VUHDO_reloadUI(anIsFixAllFrameLevels)
VUHDO_IS_RELOADING
=
true
;
VUHDO_initAllBurstCaches
();
--
Wichtig
fr INTERNAL_TOGGLES=>Clusters
VUHDO_initAllBurstCaches
();
--
Important
f
o
r INTERNAL_TOGGLES=>Clusters
VUHDO_reloadRaidMembers
();
VUHDO_resetNameTextCache
();
VUHDO_redrawAllPanels
(
anIsFixAllFrameLevels
);
...
...
@@ -1111,7 +1115,7 @@ function VUHDO_reloadUI(anIsFixAllFrameLevels)
VUHDO_IS_RELOADING
=
false
;
VUHDO_reloadBuffPanel
();
VUHDO_initDebuffs
();
-- Talent
e
s
cheinen recht spt zur Verfgung zu stehen
...
VUHDO_initDebuffs
();
-- Talent
s
s
eems to be available quite late
...
end
...
...
This diff is collapsed.
Click to expand it.
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