/trunk
## Interface: 50400 |
## Interface: 60000 |
## Title: Cellular |
## Notes: Instant messenger for whispers |
## Author: TotalPackage |
## Version: 5.4.001 |
## Version: 6.1.001 |
## SavedVariables: CellularDB |
## SavedVariablesPerCharacter: CellularCharDB, Cellular_History |
-------------------------------------- |
--- MESSAGE HANDLERS |
GetWindow = function(name, isSpecial, showmore) -- retrieve window |
GetWindow = function(name, isSpecial, showmore, bnname) -- retrieve window |
local id = usedtabs[name] |
if (not id or not tabs[id] or not tabs[id]:IsShown()) and not isSpecial then |
local t |
t.msg:Clear() |
t.msg:ScrollToBottom() |
local history = svar[name] |
local history = svar[bnname or name] |
if history then -- show recent history if available |
local n = #history |
local numlines = (showmore and 50) or 15 |
return id |
end |
do |
local ChatEdit_SetLastTellTarget, GetTime, BNet_GetPresenceID = ChatEdit_SetLastTellTarget, GetTime, BNet_GetPresenceID |
local ChatEdit_SetLastTellTarget, GetTime = ChatEdit_SetLastTellTarget, GetTime |
local function HandleHistory(name, dname, text, isbn) -- history tracking |
local battleTag, presenceName, _, toonName |
if isbn then |
local _, presenceName, battleTag, isBattleTagPresence, toonName = BNGetFriendInfoByID(isbn) |
if presenceName then |
if toonName then |
name = presenceName.." ("..toonName..")" |
else |
name = presenceName |
end |
else |
local _, toonName = BNGetToonInfo(presenceID) |
name = toonName |
end |
_, presenceName, battleTag, _, toonName = BNGetFriendInfoByID(isbn) |
end |
recentw[name] = true |
if not db.history then return end |
eb.max = #t |
end |
end |
local function HandleWindow(name, special, text) -- window check |
if not name then return end |
local id = GetWindow(name, special) |
local function HandleWindow(name, special, text, bnname) -- window check |
if not name and not bnname then return end |
local id = GetWindow(name, special, bnname) |
if not id then |
if not special then |
print(format("|cff88ff88Cellular|r: Max windows reached - [%s] %s", name, text)) |
------------------------------------------------------------------------ |
function a:IncomingMessage(name, text, status, special, cid, guid, isbn) -- handles the displaying of all incoming whisper messages |
------------------------------------------------------------------------ |
local f = HandleWindow(name, special, text) |
local battleTag, presenceName, _, toonName |
if isbn then |
_, presenceName, battleTag, _, toonName = BNGetFriendInfoByID(isbn) |
end |
local f = HandleWindow(name, special, text, battleTag) |
if not f then return end |
local ctime = GetTime() |
-------------------------------------------- |
function a:OutgoingMessage(name, text, isbn) -- handles the displaying of all outgoing whisper messages |
-------------------------------------------- |
local f = HandleWindow(name, nil, text) |
local battleTag, presenceName, _, toonName |
if isbn then |
_, presenceName, battleTag, _, toonName = BNGetFriendInfoByID(isbn) |
end |
local f = HandleWindow(name, nil, text, battleTag) |
if not f then return end |
if db.showname and db.showtime then |
addmsg(f.msg, true, "[%s %s] %s", gsub(date("%I:%M:%S"), "^0", ""), you, text) |
end |
f.bn = isbn |
HandleHistory(name, you, text) |
HandleHistory(name, you, text, isbn) |
if a.pratloaded and Prat.Addon:GetModule("Sounds", true) then |
a.PLAYERLINK = you |
Prat.Addon:GetModule("Sounds", true):Prat_PostAddMessage(nil, a, nil, "CHAT_MSG_WHISPER_INFORM") |
<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/ |
..\FrameXML\UI.xsd"> |
<Include file="LibSharedMedia-3.0\lib.xml" /> |
<Include file="LibSharedMedia-3.0\lib.xml"/> |
</Ui> |
--[[ |
Name: LibSharedMedia-3.0 |
Revision: $Revision: 74 $ |
Revision: $Revision: 89 $ |
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", 5000402 -- 5.0.4 v2 / increase manually on changes |
local MAJOR, MINOR = "LibSharedMedia-3.0", 6000201 -- 6.0.2 v1 / increase manually on changes |
local lib = LibStub:NewLibrary(MAJOR, MINOR) |
if not lib then return end |
-- BACKGROUND |
if not lib.MediaTable.background then lib.MediaTable.background = {} end |
lib.MediaTable.background["None"] = [[]] |
lib.MediaTable.background["Blizzard Collections Background"] = [[Interface\Collections\CollectionsBackgroundTile]] |
lib.MediaTable.background["Blizzard Dialog Background"] = [[Interface\DialogFrame\UI-DialogBox-Background]] |
lib.MediaTable.background["Blizzard Dialog Background Dark"] = [[Interface\DialogFrame\UI-DialogBox-Background-Dark]] |
lib.MediaTable.background["Blizzard Dialog Background Gold"] = [[Interface\DialogFrame\UI-DialogBox-Gold-Background]] |
lib.MediaTable.background["Blizzard Garrison Background"] = [[Interface\Garrison\GarrisonUIBackground]] |
lib.MediaTable.background["Blizzard Garrison Background 2"] = [[Interface\Garrison\GarrisonUIBackground2]] |
lib.MediaTable.background["Blizzard Garrison Background 3"] = [[Interface\Garrison\GarrisonMissionUIInfoBoxBackgroundTile]] |
lib.MediaTable.background["Blizzard Low Health"] = [[Interface\FullScreenTextures\LowHealth]] |
lib.MediaTable.background["Blizzard Marble"] = [[Interface\FrameGeneral\UI-Background-Marble]] |
lib.MediaTable.background["Blizzard Out of Control"] = [[Interface\FullScreenTextures\OutOfControl]] |
if not lib.MediaTable.font then lib.MediaTable.font = {} end |
local SML_MT_font = lib.MediaTable.font |
--[[ |
All font files are currently in all clients, the following table depicts which font supports which charset as of 5.0.4 |
Fonts were checked using langcover.pl from DejaVu fonts (http://sourceforge.net/projects/dejavu/) and FontForge (http://fontforge.org/) |
latin means check for: de, en, es, fr, it, pt |
file name latin koKR ruRU zhCN zhTW |
2002.ttf 2002 X X X - - |
2002B.ttf 2002 Bold X X 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 - - |
FRIZQT___CYR.TTF FrizQuadrataCTT x - X - - |
K_Damage.TTF YDIWingsM - X X - - |
K_Pagetext.TTF MoK X X X - - |
MORPHEUS.TTF Morpheus X - - - - |
NIM_____.ttf Nimrod MT X - X - - |
SKURRI.TTF Skurri X - - - - |
SKURRI_CYR.TTF Skurri X - X - - |
WARNING: Although FRIZQT___CYR is available on western clients, it doesn't support special European characters e.g. é, ï, ö |
Due to this, we cannot use it as a replacement for FRIZQT__.TTF |
]] |
if locale == "koKR" then |
error(MAJOR..":Register(mediatype, key, data, langmask) - key must be string, got "..type(key)) |
end |
mediatype = mediatype:lower() |
if mediatype == lib.MediaType.FONT and ((langmask and band(langmask, LOCALE_MASK) == 0) or not (langmask or locale_is_western)) then return false end |
if mediatype == lib.MediaType.FONT and ((langmask and band(langmask, LOCALE_MASK) == 0) or not (langmask or locale_is_western)) then return false end |
if not mediaTable[mediatype] then mediaTable[mediatype] = {} end |
local mtable = mediaTable[mediatype] |
if mtable[key] then return false end |
## Interface: 50400 |
## Interface: 60000 |
## LoadOnDemand: 1 |
## X-Curse-Packaged-Version: 5.4.0 |
## X-Curse-Packaged-Version: r89 |
## X-Curse-Project-Name: LibSharedMedia-3.0 |
## X-Curse-Project-ID: libsharedmedia-3-0 |
## X-Curse-Repository-ID: wow/libsharedmedia-3-0/mainline |
## Title: Lib: SharedMedia-3.0 |
## Notes: Shared handling of media data (fonts, sounds, textures, ...) between addons. |
## Author: Elkano |
## Version: 3.0-81 |
## Version: 3.0-89 |
## X-Website: http://www.wowace.com/projects/libsharedmedia-3-0/ |
## X-Category: Library |
## X-Revision: 81 |
## X-Date: 2013-09-09T23:19:55Z |
## X-Revision: 89 |
## X-Date: 2014-10-16T17:09:57Z |
LibStub\LibStub.lua |
CallbackHandler-1.0\CallbackHandler-1.0.lua |