/
## Interface: 50100 |
## Interface: 50200 |
## Title: TipTop |
## Author: Seerah |
## Notes: Tooltip enhancement |
## Version: 2.12 |
## Version: 2.13 |
## SavedVariables: TipTopDB |
## SavedVariablesPerCharacter: TipTopPCDB |
## OptionalDeps: Ace3, LibSharedMedia-3.0, AceGUI-3.0-SharedMediaWidgets |
local DataVersion = 9001 -- dev version always overwrites everything else :) |
--@end-debug@]===] |
--@non-debug@ |
local DataVersion = 32 |
local DataVersion = 42 |
--@end-non-debug@ |
local AGSMW = LibStub:NewLibrary("AceGUISharedMediaWidgets-1.0", DataVersion) |
InlineGroup Container |
Simple container widget that creates a visible "box" with an optional title. |
-------------------------------------------------------------------------------]] |
local Type, Version = "InlineGroup", 20 |
local Type, Version = "InlineGroup", 21 |
local AceGUI = LibStub and LibStub("AceGUI-3.0", true) |
if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end |
["OnAcquire"] = function(self) |
self:SetWidth(300) |
self:SetHeight(100) |
self:SetTitle("") |
end, |
-- ["OnRelease"] = nil, |
--[[----------------------------------------------------------------------------- |
ColorPicker Widget |
-------------------------------------------------------------------------------]] |
local Type, Version = "ColorPicker", 20 |
local Type, Version = "ColorPicker", 21 |
local AceGUI = LibStub and LibStub("AceGUI-3.0", true) |
if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end |
local self = frame.obj |
if not self.disabled then |
ColorPickerFrame:SetFrameStrata("FULLSCREEN_DIALOG") |
ColorPickerFrame:SetClampedToScreen(true) |
ColorPickerFrame.func = function() |
local r, g, b = ColorPickerFrame:GetColorRGB() |
BlizOptionsGroup Container |
Simple container widget for the integration of AceGUI into the Blizzard Interface Options |
-------------------------------------------------------------------------------]] |
local Type, Version = "BlizOptionsGroup", 20 |
local Type, Version = "BlizOptionsGroup", 21 |
local AceGUI = LibStub and LibStub("AceGUI-3.0", true) |
if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end |
frame.obj:Fire("cancel") |
end |
local function defaults(frame) |
frame.obj:Fire("defaults") |
local function default(frame) |
frame.obj:Fire("default") |
end |
local function refresh(frame) |
frame.obj:Fire("refresh") |
end |
--[[----------------------------------------------------------------------------- |
Methods |
-------------------------------------------------------------------------------]] |
-- support functions for the Blizzard Interface Options |
frame.okay = okay |
frame.cancel = cancel |
frame.defaults = defaults |
frame.default = default |
frame.refresh = refresh |
frame:SetScript("OnHide", OnHide) |
frame:SetScript("OnShow", OnShow) |
--[[ |
Name: LibSharedMedia-3.0 |
Revision: $Revision: 69 $ |
Revision: $Revision: 74 $ |
Author: Elkano (elkano@gmx.de) |
Inspired By: SurfaceLib by Haste/Otravi (troeks@gmail.com) |
Website: http://www.wowace.com/projects/libsharedmedia-3-0/ |
License: LGPL v2.1 |
]] |
local MAJOR, MINOR = "LibSharedMedia-3.0", 4030402 -- increase manualy on changes |
local MAJOR, MINOR = "LibSharedMedia-3.0", 5000402 -- 5.0.4 v2 / increase manually on changes |
local lib = LibStub:NewLibrary(MAJOR, MINOR) |
if not lib then return end |
-- FONT |
if not lib.MediaTable.font then lib.MediaTable.font = {} end |
local SML_MT_font = lib.MediaTable.font |
--[[ |
file name latin koKR ruRU zhCN zhTW |
2002.ttf 2002 X X X - - |
2002B.ttf 2002 Bold X X X - - |
ARHei.ttf AR CrystalzcuheiGBK Demibold X - X X X |
ARIALN.TTF Arial Narrow X - X - - |
ARKai_C.ttf AR ZhongkaiGBK Medium (Combat) X - X X X |
ARKai_T.ttf AR ZhongkaiGBK Medium X - X X X |
bHEI00M.ttf AR Heiti2 Medium B5 - - - - X |
bHEI01B.ttf AR Heiti2 Bold B5 - - - - X |
bKAI00M.ttf AR Kaiti Medium B5 - - - - X |
bLEI00D.ttf AR Leisu Demi B5 - - - - X |
FRIZQT__.TTF Friz Quadrata TT X - - - - |
FRIZQT___CYR.TTF FrizQuadrataCTT - - X - - |
K_Damage.TTF YDIWingsM - X X - - |
K_Pagetext.TTF MoK X X X - - |
MORPHEUS.TTF Morpheus X - - - - |
MORPHEUS_CYR.TTF Morpheus X - X - - |
NIM_____.ttf Nimrod MT X - X - - |
SKURRI.TTF Skurri X - - - - |
SKURRI_CYR.TTF Skurri X - X - - |
]] |
if locale == "koKR" then |
LOCALE_MASK = lib.LOCALE_BIT_koKR |
-- |
elseif locale == "ruRU" then |
LOCALE_MASK = lib.LOCALE_BIT_ruRU |
-- |
SML_MT_font["Arial Narrow"] = [[Fonts\ARIALN.TTF]] |
SML_MT_font["Friz Quadrata TT"] = [[Fonts\FRIZQT__.TTF]] |
SML_MT_font["Morpheus"] = [[Fonts\MORPHEUS.TTF]] |
SML_MT_font["Nimrod MT"] = [[Fonts\NIM_____.ttf]] |
SML_MT_font["Skurri"] = [[Fonts\SKURRI.TTF]] |
SML_MT_font["2002"] = [[Fonts\2002.TTF]] |
SML_MT_font["2002 Bold"] = [[Fonts\2002B.TTF]] |
SML_MT_font["AR CrystalzcuheiGBK Demibold"] = [[Fonts\ARHei.TTF]] |
SML_MT_font["AR ZhongkaiGBK Medium (Combat)"] = [[Fonts\ARKai_C.TTF]] |
SML_MT_font["AR ZhongkaiGBK Medium"] = [[Fonts\ARKai_T.TTF]] |
SML_MT_font["Arial Narrow"] = [[Fonts\ARIALN.TTF]] |
SML_MT_font["Friz Quadrata TT"] = [[Fonts\FRIZQT___CYR.TTF]] |
SML_MT_font["MoK"] = [[Fonts\K_Pagetext.TTF]] |
SML_MT_font["Morpheus"] = [[Fonts\MORPHEUS_CYR.TTF]] |
SML_MT_font["Nimrod MT"] = [[Fonts\NIM_____.ttf]] |
SML_MT_font["Skurri"] = [[Fonts\SKURRI_CYR.TTF]] |
-- |
lib.DefaultMedia.font = "Friz Quadrata TT" |
-- |
LOCALE_MASK = lib.LOCALE_BIT_western |
locale_is_western = true |
-- |
SML_MT_font["Arial Narrow"] = [[Fonts\ARIALN.TTF]] |
SML_MT_font["Friz Quadrata TT"] = [[Fonts\FRIZQT__.TTF]] |
SML_MT_font["Morpheus"] = [[Fonts\MORPHEUS.TTF]] |
SML_MT_font["Skurri"] = [[Fonts\SKURRI.TTF]] |
SML_MT_font["2002"] = [[Fonts\2002.TTF]] |
SML_MT_font["2002 Bold"] = [[Fonts\2002B.TTF]] |
SML_MT_font["AR CrystalzcuheiGBK Demibold"] = [[Fonts\ARHei.TTF]] |
SML_MT_font["AR ZhongkaiGBK Medium (Combat)"] = [[Fonts\ARKai_C.TTF]] |
SML_MT_font["AR ZhongkaiGBK Medium"] = [[Fonts\ARKai_T.TTF]] |
SML_MT_font["Arial Narrow"] = [[Fonts\ARIALN.TTF]] |
SML_MT_font["Friz Quadrata TT"] = [[Fonts\FRIZQT__.TTF]] |
SML_MT_font["MoK"] = [[Fonts\K_Pagetext.TTF]] |
SML_MT_font["Morpheus"] = [[Fonts\MORPHEUS_CYR.TTF]] |
SML_MT_font["Nimrod MT"] = [[Fonts\NIM_____.ttf]] |
SML_MT_font["Skurri"] = [[Fonts\SKURRI_CYR.TTF]] |
-- |
lib.DefaultMedia.font = "Friz Quadrata TT" |
-- |
if not lib.MediaTable.statusbar then lib.MediaTable.statusbar = {} end |
lib.MediaTable.statusbar["Blizzard"] = [[Interface\TargetingFrame\UI-StatusBar]] |
lib.MediaTable.statusbar["Blizzard Character Skills Bar"] = [[Interface\PaperDollInfoFrame\UI-Character-Skills-Bar]] |
lib.MediaTable.statusbar["Blizzard Raid Bar"] = [[Interface\RaidFrame\Raid-Bar-Hp-Fill]] |
lib.DefaultMedia.statusbar = "Blizzard" |
-- SOUND |
diffColor = true, |
classColor = true, |
classIcon = false, |
guildRank = false, |
itemColor = true, |
borderColor = {r=.6, g=.6, b=.6, a=1}, |
healthBar = "TipTop Default", |
end, |
order = 42, |
}, |
guildRank = { |
name = "Guild Rank", |
desc = "Display the unit's rank next to the guild name in the tooltip.", |
type = "toggle", |
get = function() return db.guildRank end, |
set = function() |
db.guildRank = not db.guildRank |
end, |
order = 43, |
}, |
factionIcon = { |
name = "Faction Icon", |
desc = "Display the faction icon for player controlled characters.", |
db.factionIcon = not db.factionIcon |
TipTop:FactionIcon() |
end, |
order = 43, |
order = 44, |
}, |
fIconOpts = { |
name = "Faction Icon Settings", |
type = "group", |
inline = true, |
order = 44, |
order = 45, |
args = { |
factionIconSize = { |
name = "Faction icon size", |
db.factionIconSize = factionIconSize |
TipTop:FactionIcon() |
end, |
order = 44, |
order = 1, |
}, |
factionIconPosition = { |
name = "Faction icon position", |
db.factionIconPosition = positions[factionIconPosition] |
TipTop:FactionIcon() |
end, |
order = 45, |
order = 2, |
}, |
factionIconX = { |
name = "X Offset", |
db.factionIconX = factionIconX |
TipTop:FactionIcon() |
end, |
order = 47, |
order = 3, |
}, |
factionIconY = { |
name = "Y Offset", |
db.factionIconY = factionIconY |
TipTop:FactionIcon() |
end, |
order = 48, |
order = 4, |
}, |
}, |
}, |
end |
end |
local function Appendices() --appends info to the name of the mob - ALSO sets elite graphic |
local function Appendices() --appends info to the name/guild of the unit - ALSO sets elite graphic |
classif = UnitClassification("mouseover") |
if db.elite and not elitetexture then |
elitetexture = TipTop:CreateTexture(nil, "OVERLAY") |
elseif UnitIsDND("mouseover") then |
tt:AppendText(" (DND)") |
end |
if db.guildRank then |
local guild, rank = GetGuildInfo("mouseover") |
local text = nil --reset text var to maybe, hopefully quell repeating icon issue... |
text = GameTooltipTextLeft2:GetText() |
if text == guild then |
GameTooltipTextLeft2:SetFormattedText("%s (%s)", text, rank) |
tt:Show() |
end |
end |
end |
local function BorderClassColor() --colors tip border |