/
AKA_TITLE="A.K.A. Version 2.3b"; |
AKA_TITLE="A.K.A. Version 2.4b"; |
AKA_TEXT = {}; |
AKA v2.3b |
AKA v2.4b |
Description |
=========== |
Version History |
======== |
Oct 12, 2008 (version 2.4b) |
* Scrolling toon list working |
* Lots of code clean-up |
*NOTE* files have changes from 2.2x versions - you will need to exit WoW for this update. |
Oct 4, 2008 (version 2.3b) |
* Calendar support. Now shows nickname of event creator on calendar. |
*NOTE* files have changes from 2.2x versions - you will need to exit WoW for this update. |
</Scripts> |
</Button> |
<Button |
name="AKAUserLineProto" |
text="is there anybody out there?" |
virtual="true"> |
<Size> |
<AbsDimension x="350" y="16" /> |
</Size> |
</Button> |
<Button name = "AKA_ScrollMenuEntryTemplate" virtual="true"> |
<ButtonText name="__" justifyH="LEFT" setAllPoints="true"/> |
<NormalFont style="GameFontNormalSmall"/> |
<Size> |
<AbsDimension x="300" y="16" /> |
</Size> |
<NormalTexture name="$parentbar" setAllPoints="true" /> |
<HighlightTexture |
alphaMode="ADD" |
file="Interface\QuestFrame\UI-QuestTitleHighlight" |
/> |
<Scripts> |
<OnClick> |
PlaySound("igMainMenuOpen"); |
AKA_ListClick(self); |
</OnClick> |
</Scripts> |
</Button> |
<CheckButton |
name="AKA_ToonCheck" |
inherits="UICheckButtonTemplate" |
</FontString> |
<FontString |
name="AKA_TempScrollingCol0" |
inherits="GameFontHighlight" |
justifyH="LEFT" |
wraponspaces="false" |
justifyV="TOP" |
text="" |
virtual="true" |
> |
<Anchors> |
name="AKA_AddNotes" |
inherits="GameFontNormal" |
justifyH="LEFT" |
text="Click a line below to display details about that player. |n Shift-click [names] in chat window for alts tooltip." |
> |
<Anchors> |
<Anchor |
point="TOPLEFT" |
relativePoint="BOTTOMLEFT" |
relativeTo="AKA_PrefsTitle" |
> |
<Offset> |
<AbsDimension x="0" y="-100"/> |
<AbsDimension x="0" y="-60"/> |
</Offset> |
</Anchor> |
</Anchors> |
<Color r=".2" g="1" b="1" a="1" /> |
<Color r=".8" g="1" b=".8" a="1" /> |
</FontString> |
<FontString |
name="AKA_DispPlayerNotes" |
inherits="GameFontNormal" |
justifyH="LEFT" |
<FontString |
name="AKA_AddNotes" |
inherits="GameFontNormal" |
justifyH="LEFT" |
text="Player notes go here." |
> |
<Anchors> |
<Anchor |
point="TOPLEFT" |
relativePoint="BOTTOMLEFT" |
relativeTo="AKA_PrefsTitle" |
> |
<Offset> |
<AbsDimension x="0" y="-380"/> |
</Offset> |
</Anchor> |
</Anchors> |
<Color r="1" g="1" b=".8" a="1" /> |
</FontString> |
text="Click a line below to display details about that player. |n Shift-click [names] in chat window for alts tooltip." |
> |
<Anchors> |
<Anchor |
point="TOPLEFT" |
relativePoint="BOTTOMLEFT" |
relativeTo="AKA_PrefsTitle" |
> |
<Offset> |
<AbsDimension x="0" y="-60"/> |
</Offset> |
</Anchor> |
</Anchors> |
<Color r=".8" g="1" b=".8" a="1" /> |
</FontString> |
<FontString |
name="AKA_DispPlayerNotes" |
inherits="GameFontNormal" |
justifyH="LEFT" |
text="Player notes go here." |
> |
<Anchors> |
<Anchor |
point="TOPLEFT" |
relativePoint="BOTTOMLEFT" |
relativeTo="AKA_PrefsTitle" |
> |
<Offset> |
<AbsDimension x="0" y="-380"/> |
</Offset> |
</Anchor> |
</Anchors> |
<Color r="1" g="1" b=".8" a="1" /> |
</FontString> |
</Layer> |
<OnMouseDown> |
AKA_StringClick(self); |
-- AKA_StringClick(self); |
</OnMouseDown> |
</Anchors> |
<Scripts> |
<OnVerticalScroll> |
FauxScrollFrame_OnVerticalScroll(16, AKA_ScrollBar_Update); |
FauxScrollFrame_OnVerticalScroll(self, offset, 16, AKA_ScrollBar_Update); |
</OnVerticalScroll> |
<OnShow> |
AKA_ScrollBar_Update() |
AKA_ScrollBar_Update(self) |
</OnShow> |
</Scripts> |
</ScrollFrame> |
<Button name = "AKA_ScrollMenuEntryTemplate" virtual="true"> |
<Anchors> |
<Anchor point="TOPLEFT" relativeTo="AKA_FrameScrollBar" relativePoint="TOPLEFT"> |
<Frame |
name="AKA_ScrollingBox" |
parent="AKA_PrefsFrame" |
> |
<Backdrop |
bgFile="Interface\DialogFrame\UI-DialogBox-Background" |
edgeFile="Interface\DialogFrame\UI-DialogBox-Border" |
tile="true" |
> |
<TileSize> |
<AbsValue val="32"/> |
</TileSize> |
<EdgeSize> |
<AbsValue val="32"/> |
</EdgeSize> |
<BackgroundInsets> |
<AbsInset left="11" right="12" top="12" bottom="11"/> |
</BackgroundInsets> |
</Backdrop> |
<Anchors> |
<Anchor |
point="TOPLEFT" |
relativePoint="BOTTOMLEFT" |
relativeTo="AKA_PrefsTitle" |
> |
<Offset> |
<AbsDimension x="8" y="0"/> |
<AbsDimension x="0" y="-100"/> |
</Offset> |
<Size><AbsDimension x="300" y="300"/></Size> |
</Anchor> |
</Anchors> |
<Size> |
<AbsDimension x="300" y="16" /> |
</Size> |
<!-- |
<Layers><Layer level="BORDER"><FontString name="$parent_col1" inherits="GameFontHighlight" wraponspaces="false" justifyH="LEFT" text=" "/></Layer></Layers> |
--> |
</Button> |
</Frame> |
</frames> |
</frame> |
<!-- start of options frame--> |
-- ======== |
-- AKASavedVars = {}; |
AKA_Version=2.3; |
AKA_Version=2.4; |
AKA_HighestSeenVersion=0; |
AKA_FormatVersion=1.1; |
AKA_variablesLoaded = false; |
-- constants: |
local MYADDON_NAME = "AKA"; |
local MYADDON_VERSION = "2.0"; |
local MYADDON_VERSION = "2.4"; |
local MYADDON_AUTHOR = "Schnoggo"; |
local MYADDON_EMAIL = "schnoggo@gmail.com"; |
local MYADDON_WEBSITE = "http://war-monkey.com/files/"; |
function AKA_StringClick(passedFrame) |
function AKA_ListClick(passedFrame) |
local level,race,class,guild,zone; |
local x,y = GetCursorPosition(); |
local s = passedFrame:GetEffectiveScale(); |
x, y = x/s, y/s; |
local top = passedFrame:GetTop(); |
local frameY=top-y; |
-- f: |
-- -90+(-16*i) |
local yBar=(frameY-(90-22))/16; |
local yAsText=tonumber(floor(yBar)); |
local topOffset=FauxScrollFrame_GetOffset(AKA_FrameScrollBar); |
local thisToonID=passedFrame.toonID; |
local thisToonID=AKA_BIGIDS[floor(yBar-topOffset)]; |
-- DEFAULT_CHAT_FRAME:AddMessage("Click!".." yAsText="..yAsText.." yOff="..yBar .. " top="..top , 0.5, 1.0, 0.5, 3); |
-- DEFAULT_CHAT_FRAME:AddMessage(thisToonID , 0.5, 1.0, 0.5, 3); |
-- tonumber() |
-- math.floor |
if (thisToonID ~= nil) then |
if (AKA_SavedVars["FriendToons"] == nil) then -- repair FriendToons if necessary |
AKA_FixDefaults(); |
function AKA_ScrollBar_Update() |
DrawScrollContents(FauxScrollFrame_GetOffset(AKA_FrameScrollBar)); |
function AKA_ScrollBar_Update(self) |
-- Uses the buttons created by AKA_CreateScrollItems and filles in their text and toonID's |
DrawScrollContents(FauxScrollFrame_GetOffset(self)); |
-- local scrollTestData = {}; |
-- for i=1,50 do |
-- scrollTestData[i] = "Test "..math.random(100); |
local totalLines=table.getn(AKA_BIGLIST); |
-- FauxScrollFrame_Update(AKA_FrameScrollBar,VISIBLE_MAX,5,16); -- function, max entries, # visible, pixel height of one |
FauxScrollFrame_Update(AKA_FrameScrollBar,totalLines,VISIBLE_MAX,16); |
FauxScrollFrame_Update(self,totalLines,VISIBLE_MAX,16); |
-- DEFAULT_CHAT_FRAME:AddMessage("We're at "..FauxScrollFrame_GetOffset(AKA_FrameScrollBar)); |
if (AKA_ScrollItem1 == nil) then |
for lineCounter=1,VISIBLE_MAX do |
dataLine= lineCounter + FauxScrollFrame_GetOffset(AKA_FrameScrollBar); |
buttonName="AKA_Entry"..lineCounter; |
-- getglobal(buttonName):ClearAllPoints() |
-- getglobal(buttonName):SetPoint("TOPLEFT",AKA_FrameScrollBar, "TOPLEFT", 8,-16*lineCounter); -- set the position |
buttonName="AKA_ListLine"..lineCounter; |
if (dataLine <= table.getn(AKA_BIGLIST)) then |
-- DEFAULT_CHAT_FRAME:AddMessage("lineCounter="..lineCounter.." dataLine="..dataLine.." "..AKA_BIGLIST[dataLine]); |
-- listText=listText.."|n"..AKA_BIGLIST[dataLine]; |
getglobal("AKA_Entry"..lineCounter.."_col1"):SetText(AKA_BIGLIST[dataLine]); |
getglobal("AKA_Entry"..lineCounter.."_col1"):Show(); |
-- DEFAULT_CHAT_FRAME:AddMessage("lineCounter="..lineCounter.." dataLine="..dataLine.." "..AKA_BIGLIST[dataLine]); |
getglobal("AKA_ListLine"..lineCounter):SetText(AKA_BIGLIST[dataLine]); |
getglobal("AKA_ListLine"..lineCounter).toonID=AKA_BIGIDS[dataLine]; |
getglobal("AKA_ListLine"..lineCounter):Show(); |
else |
getglobal("AKA_Entry"..lineCounter.."_col1"):Hide(); |
getglobal("AKA_ListLine"..lineCounter):Hide(); |
end |
end -- for |
AKA_ToonListDirty=false; |
function AKA_CreateScrollItems() |
-- Frame:CreateFontString(["name"] [,"layer"]) -- Create a new FontString object as a child of a frame. |
-- local f = CreateFrame("Frame",nil,AKA_PrefsFrame) |
-- local frame=getglobal("AKA_PrefsFrame"); |
local frame=getglobal("UIParent"); |
local prototype=getglobal("AKAUserLineProto"); |
-- local deFont1,deFont2,deFont3,deFont4=GameFontNormal:GetFont(); |
local i, f, entryName; |
-- Create the buttons that make up the "faux" scrolling list of toon names |
local i, f, entryName; |
for i = 1, VISIBLE_MAX do |
entryName="AKA_Entry"..i.."_col1"; |
-- DEFAULT_CHAT_FRAME:AddMessage(entryName); |
f = CreateFrame("Button", entryName, getglobal("AKAUsersPanel"), prototype); |
-- CreateFrame("frameType", "frameName", parentFrame[, "inheritsFrame"]); |
f:SetID(i); |
-- f:SetFont(deFont1,deFont2,deFont3,deFont4); |
-- f:SetTextColor(.8,.8,.8); |
f:ClearAllPoints(); |
f:SetPoint("TOPLEFT", "AKA_PrefsTitle", "TOPLEFT", 0, -90+(-16*i)); |
f:SetText("Test #"..i); |
entryName="AKA_ListLine"..i; |
if (getglobal(entryName) == nil) then |
f = CreateFrame("Button", entryName, AKAUsersPanel,"AKA_ScrollMenuEntryTemplate"); --CreateFrame("frameType", "frameName", parentFrame[, "inheritsFrame"]); |
--f:SetID(i); |
f:SetWidth(700); |
f:SetHeight(19); |
f:ClearAllPoints(); |
f:SetPoint("TOPLEFT", "AKA_PrefsTitle", "TOPLEFT", 0, -90+(-16*i)); |
f:SetText("Test #"..i); |
--f:Show(); |
end |
end |
end |
## Interface: 30000 |
## Title: AKA |
## Notes: Publishes player alts to guild members |
## Version: 2.3 |
## Version: 2.4 |
## Author: Schnoggo |
## OptionalDeps: CleanChat,Gatherer,GuildEventManager2 |
## SavedVariables: AKA_SavedVars, AKA_USERID, AKA_DEBUG, AKA_TRAFFICMONITOR |