Skip to content

Instantly share code, notes, and snippets.

@kurapica
Last active September 15, 2021 00:59
Show Gist options
  • Save kurapica/80304fd7284c3ef7235e20bf3099e4ae to your computer and use it in GitHub Desktop.
Save kurapica/80304fd7284c3ef7235e20bf3099e4ae to your computer and use it in GitHub Desktop.
Scorpio "AshToAshSkin" ""
pcall(Style.RegisterSkin, "5MSkin")
DEFAULT_COLOR = Color("|c222222ff")
LOW_HEALTH_COLOR = Color.WHITE
HEALTHBAR = (Scorpio.IsRetail or Scorpio.IsBCC or IsAddOnLoaded("LibHealComm-4.0") or pcall(_G.LibStub, "LibHealComm-4.0")) and "PredictionHealthBar" or "HealthBar"
Style.UpdateSkin("5MSkin", {
[AshToAsh.AshUnitFrame] = {
inherit = "default", -- inherit the default skin
[HEALTHBAR]= {
location = { Anchor("TOPLEFT"), Anchor("BOTTOMRIGHT", - 1, 0, "PowerBar", "BOTTOMLEFT")},
Orientation = "VERTICAL",
statusBarColor = Wow.FromUnitEvent("UNIT_HEALTH", "UNIT_MAXHEALTH"):Next():Map(function(unit)
return( UnitHealth(unit) * 100 / UnitHealthMax(unit) ) > 40 and DEFAULT_COLOR or LOW_HEALTH_COLOR
end),
backgroundFrame = {
backgroundTexture = {
Color = Color.BLACK
},
},
},
PowerBar = {
Orientation = "VERTICAL",
location = { Anchor("TOPRIGHT"), Anchor("BOTTOMRIGHT") },
width = 4,
},
}
})
Style.ActiveSkin("5MSkin")
@kurapica
Copy link
Author

You can join my channel https://discord.gg/6hD4sdUtgp, those details is hard to be discussed here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment