# HG changeset patch
# User EmFor
# Date 1313335291 -7200
# Node ID 1aeab8164ef58bc75a31fea8ab308508c749b635
# Parent 0da064713cda525e0ec8d0518e5c36bb830596b1# Parent 88a56bd5c86bdfdee5cb7c8f71895dd40d1a0cf7
Merge 3rd try
diff -r 0da064713cda -r 1aeab8164ef5 .hgignore
--- a/.hgignore Sun Aug 14 15:16:35 2011 +0000
+++ b/.hgignore Sun Aug 14 17:21:31 2011 +0200
@@ -1,1 +1,4 @@
-glob:nppBackup/*
+syntax: glob
+nppBackup/*
+*.wuuver
+Changelog-*.txt
diff -r 0da064713cda -r 1aeab8164ef5 .pkgmeta
--- a/.pkgmeta Sun Aug 14 15:16:35 2011 +0000
+++ b/.pkgmeta Sun Aug 14 17:21:31 2011 +0200
@@ -1,5 +1,14 @@
package-as: CensusPlus
-ignore:
- - .pkgmeta
- - .docmeta
+enable-nolib-creation: no
+
+externals:
+ libs/LibStub:
+ url: svn://svn.wowace.com/wow/libstub/mainline/trunk
+ tag: latest
+ libs/CallbackHandler-1.0:
+ url: svn://svn.wowace.com/wow/callbackhandler/mainline/trunk/CallbackHandler-1.0
+ tag: latest
+ libs/LibWho:
+ url: svn://svn.wowace.com/wow/wholib/mainline/trunk
+ tag: latest
diff -r 0da064713cda -r 1aeab8164ef5 CensusButton.lua
--- a/CensusButton.lua Sun Aug 14 15:16:35 2011 +0000
+++ b/CensusButton.lua Sun Aug 14 17:21:31 2011 +0200
@@ -1,23 +1,23 @@
---[[
- CensusPlus for World of Warcraft(tm).
-
- Copyright 2005 - 2006 Cooper Sellers and WarcraftRealms.com
-
- License:
- This program is free software; you can redistribute it and/or
- modify it under the terms of the GNU General Public License
- as published by the Free Software Foundation; either version 2
- of the License, or (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program(see GLP.txt); if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-]]
+--[[
+ CensusPlus for World of Warcraft(tm).
+
+ Copyright 2005 - 2006 Cooper Sellers and WarcraftRealms.com
+
+ License:
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License
+ as published by the Free Software Foundation; either version 2
+ of the License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program(see GLP.txt); if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+]]
local init = false;
@@ -46,7 +46,7 @@
end
end
-function CensusButton_UpdatePosition()
+function CensusButton_UpdatePosition()
CensusButtonFrame:SetPoint(
"TOPLEFT",
"Minimap",
@@ -62,11 +62,11 @@
end
end
-function CensusPlusButton_OnClick( arg1, arg2 )
+function CensusPlusButton_OnClick( arg1 )
if ( arg1 == "LeftButton" ) then
CensusButton_OnClick();
else
- ToggleDropDownMenu( 1, nil, CP_ButtonDropDown, "CensusButtonFrame", 20, 20 );
+ ToggleDropDownMenu( 1, nil, CP_ButtonDropDown, "CensusButtonFrame", 20, 20 );
end
end
@@ -75,24 +75,24 @@
local info;
- if (g_IsCensusPlusInProgress == true) then
- if( g_CensusPlusManuallyPaused == true ) then
+ if (g_IsCensusPlusInProgress == true) then
+ if( g_CensusPlusManuallyPaused == true ) then
info = {
text = CENSUSPlus_UNPAUSE;
func = CensusPlus_Take_OnClick;
};
- else
+ else
info = {
text = CENSUSPlus_PAUSE;
func = CensusPlus_Take_OnClick;
};
- end
- else
+ end
+ else
info = {
text = CENSUSPlus_TAKE;
func = CensusPlus_Take_OnClick;
};
- end
+ end
UIDropDownMenu_AddButton(info, 1);
info = {
@@ -103,13 +103,25 @@
info = {
text = CENSUSPlus_CANCEL;
- func = CensusPlus_CloseDropDown;
+ func = CensusPlus_CloseDropDown;
};
UIDropDownMenu_AddButton(info, 1);
end
-
-
-function CensusPlus_CloseDropDown()
- CloseDropDownMenus();
+
+
+function CensusPlus_CloseDropDown()
+ CloseDropDownMenus();
+end
+function CensusPlus_Button_OnMouseDown( self, arg1 )
+ if ( ( ( not CensusButtonFrame.isLocked ) or ( CensusButtonFrame.isLocked == 0 ) ) and ( arg1 == "LeftButton" ) ) then
+ CensusButtonFrame:StartMoving();
+ CensusButtonFrame.isMoving = true;
+ end
+end
+function CensusPlus_Button_OnClick( self, arg1, arg2 )
+ if( not CensusButtonFrame.isMoving ) then
+ CensusPlusButton_OnClick(arg1, arg2);
+ PlaySound("igMainMenuOptionCheckBoxOn");
+ end
end
\ No newline at end of file
diff -r 0da064713cda -r 1aeab8164ef5 CensusButton.xml
--- a/CensusButton.xml Sun Aug 14 15:16:35 2011 +0000
+++ b/CensusButton.xml Sun Aug 14 17:21:31 2011 +0200
@@ -44,29 +44,18 @@
- this:RegisterForClicks("LeftButtonUp", "RightButtonUp");
+ self:RegisterForClicks("LeftButtonUp", "RightButtonUp");
-
- if( not CensusButtonFrame.isMoving ) then
- CensusPlusButton_OnClick(arg1, arg2);
- PlaySound("igMainMenuOptionCheckBoxOn");
- end
-
-
+
+
if ( CensusButtonFrame.isMoving ) then
CensusButtonFrame:StopMovingOrSizing();
CensusButtonFrame.isMoving = false;
end
-
- if ( ( ( not CensusButtonFrame.isLocked ) or ( CensusButtonFrame.isLocked == 0 ) ) and ( arg1 == "LeftButton" ) ) then
- CensusButtonFrame:StartMoving();
- CensusButtonFrame.isMoving = true;
- end
-
+
GameTooltip_SetDefaultAnchor(GameTooltip, UIParent);
-
GameTooltip:SetText(CENSUS_BUTTON_TOOLTIP);
@@ -77,15 +66,15 @@
- this:RegisterEvent("VARIABLES_LOADED");
+ self:RegisterEvent("VARIABLES_LOADED");
CensusButton_Init();
- if ( this.isMoving ) then
- this:StopMovingOrSizing();
- this.isMoving = false;
+ if ( self.isMoving ) then
+ self:StopMovingOrSizing();
+ self.isMoving = false;
end
diff -r 0da064713cda -r 1aeab8164ef5 CensusPlayerList.lua
--- a/CensusPlayerList.lua Sun Aug 14 15:16:35 2011 +0000
+++ b/CensusPlayerList.lua Sun Aug 14 17:21:31 2011 +0200
@@ -1,296 +1,302 @@
---[[
- CensusPlus for World of Warcraft(tm).
-
- Copyright 2005 - 2006 Cooper Sellers and WarcraftRealms.com
-
- License:
- This program is free software; you can redistribute it and/or
- modify it under the terms of the GNU General Public License
- as published by the Free Software Foundation; either version 2
- of the License, or (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program(see GLP.txt); if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-]]
-
-
-------------------------------------------------------------------------------------
---
--- CensusPlus
--- A WoW UI customization by Cooper Sellers
---
---
-------------------------------------------------------------------------------------
-
-local g_PlayerList = {};
-local g_PlayerLookupTable = {};
-local CensusPlus_NumPlayerButtons = 20;
-local g_MaxNumListed = 1000;
-
-function CensusPlus_ShowPlayerList()
- CP_PlayerListWindow:Show();
-end
-
-function CensusPlus_PlayerListOnShow()
-
- debugprofilestart();
-
- local guildKey = nil;
- local raceKey = nil;
- local classKey = nil;
- local levelKey = nil;
-
-
- --
- -- Clear our character list
- --
- CensusPlus_ClearPlayerList();
-
- --
- -- Get realm and faction
- --
- local realmName = g_CensusPlusLocale .. GetCVar("realmName");
- if( realmName == nil ) then
- return;
- end
-
- local factionGroup = UnitFactionGroup("player");
- if( factionGroup == nil ) then
- return;
- end
-
-
- --
- -- Has the user made any selections?
- --
- if (g_GuildSelected ~= nil ) then
- guildKey = g_GuildSelected;
- end
- if (g_RaceSelected > 0) then
- local thisFactionRaces = CensusPlus_GetFactionRaces(factionGroup);
- raceKey = thisFactionRaces[g_RaceSelected];
- end
- if (g_ClassSelected > 0) then
- local thisFactionClasses = CensusPlus_GetFactionClasses(factionGroup);
- classKey = thisFactionClasses[g_ClassSelected];
- end
- if (g_LevelSelected > 0 or g_LevelSelected < 0) then
- levelKey = g_LevelSelected;
- end
-
- debugprofilestart();
-
- CensusPlus_ForAllCharacters( realmName, factionGroup, raceKey, classKey, guildKey, levelKey, CensusPlus_AddPlayerToList);
-
- if( CensusPlus_EnableProfiling ) then
- CensusPlus_Msg( "PROFILE: Time to do calcs 1 " .. debugprofilestop() / 1000000000 );
- debugprofilestart();
- end
-
-
- --
- -- Build our list
- --
- CensusPlus_UpdatePlayerListButtons();
-
- local totalCharactersText = format(CENSUSPlus_TOTALCHAR, table.getn( g_PlayerList ) );
- if( table.getn( g_PlayerList ) == g_MaxNumListed ) then
- totalCharactersText = totalCharactersText .. " -- " .. CENSUSPlus_MAXXED;
- end
-
- CensusPlayerListCount:SetText(totalCharactersText);
-
-end
-
-----------------------------------------------------------------------------------
---
--- Predicate function which can be used to compare two characters for sorting
---
----------------------------------------------------------------------------------
-local function CharacterPredicate(lhs, rhs)
- --
- -- nil references are always less than
- --
- if (lhs == nil) then
- if (rhs == nil) then
- return false;
- else
- return true;
- end
- elseif (rhs == nil) then
- return false;
- end
- --
- -- Sort by name
- --
- if (lhs.m_name < rhs.m_name) then
- return true;
- elseif (rhs.m_name < lhs.m_name) then
- return false;
- end
-
- --
- -- Sort by level
- --
- if (lhs.m_level < rhs.m_level) then
- return true;
- elseif (rhs.m_level < lhs.m_level) then
- return false;
- end
-
- --
- -- identical
- --
- return false;
-end
-
-local function CensusPlus_UpdatePlayerLookup( index, entry )
- --
- -- Have to update our table
- --
- g_PlayerLookupTable[entry.m_name] = index;
-end
-
-
-
-----------------------------------------------------------------------------------
---
--- Update the Player button contents
---
----------------------------------------------------------------------------------
-function CensusPlus_UpdatePlayerListButtons()
- --
- -- Sort the list
- --
- local size = table.getn(g_PlayerList);
- if (size) then
- table.sort(g_PlayerList, CharacterPredicate);
-
- table.foreach(g_PlayerList, CensusPlus_UpdatePlayerLookup );
-
- end
-
- --
- -- Determine where the scroll bar is
- --
- local offset = FauxScrollFrame_GetOffset( CensusPlusPlayerListScrollFrame );
- --
- -- Walk through all the rows in the frame
- --
- local i = 1;
- while( i <= CensusPlus_NumPlayerButtons ) do
- --
- -- Get the index to the ad displayed in this row
- --
- local iPlayer = i + offset;
- --
- -- Get the button on this row
- --
- local button = getglobal("CensusPlusPlayerButton"..i);
- --
- -- Is there a valid Player on this row?
- --
- if (iPlayer <= size) then
- local player = g_PlayerList[iPlayer];
- --
- -- Update the button text
- --
- button:Show();
- local textField = "CensusPlusPlayerButton"..i.."Name";
- if ( player.m_name == nil or player.m_name == "") then
- getglobal(textField):SetText( "None" );
- else
- getglobal(textField):SetText( player.m_name );
- end
-
- local textField = "CensusPlusPlayerButton"..i.."Level";
- if ( player.m_level == nil or player.m_level == "") then
- getglobal(textField):SetText( "n/a" );
- else
- getglobal(textField):SetText( player.m_level );
- end
-
- local textField = "CensusPlusPlayerButton"..i.."Class";
- if ( player.m_guild == nil or player.m_guild == "") then
- getglobal(textField):SetText( "Unguilded" );
- else
- getglobal(textField):SetText( player.m_guild );
- end
-
- local textField = "CensusPlusPlayerButton"..i.."Seen";
- if ( player.m_seen == nil or player.m_seen == "") then
- getglobal(textField):SetText( "UNK" );
- else
- getglobal(textField):SetText( player.m_seen );
- end
- else
- --
- -- Hide the button
- --
- button:Hide();
- end
- --
- -- Next row
- --
- i = i + 1;
- end
- --
- -- Update the scroll bar
- --
- FauxScrollFrame_Update(CensusPlusPlayerListScrollFrame, size, CensusPlus_NumPlayerButtons, CensusPlus_GUILDBUTTONSIZEY);
-end
-
-----------------------------------------------------------------------------------
---
--- Find a characters in the g_PlayerList array by name
---
----------------------------------------------------------------------------------
-function CensusPlus_PlayerButton_OnClick()
- local id = this:GetID();
- local offset = FauxScrollFrame_GetOffset( CensusPlusPlayerListScrollFrame );
- local newSelection = id + offset;
-
- local player = g_PlayerList[newSelection];
- FriendsFrame_ShowDropdown(player.m_name, 1);
-end
-
-----------------------------------------------------------------------------------
---
--- Clear all the characters
---
----------------------------------------------------------------------------------
-function CensusPlus_ClearPlayerList()
- g_PlayerList = nil;
- g_PlayerList = {};
-
- g_PlayerLookupTable = nil;
- g_PlayerLookupTable = {};
-end
-
-----------------------------------------------------------------------------------
---
--- Add a character to the list
---
----------------------------------------------------------------------------------
-function CensusPlus_AddPlayerToList( name, level, guild, raceName, className, lastseen )
- local size = table.getn( g_PlayerList );
-
- if( size >= g_MaxNumListed ) then
- return;
- end
-
- local index = g_PlayerLookupTable[name];
- if (index == nil) then
- local size = table.getn( g_PlayerList );
- index = size + 1;
- g_PlayerList[index] = { m_name = name, m_level = level, m_guild = guild, m_seen = lastseen };
- g_PlayerLookupTable[name] = index;
- end
-end
-
+--[[
+ CensusPlus for World of Warcraft(tm).
+
+ Copyright 2005 - 2006 Cooper Sellers and WarcraftRealms.com
+
+ License:
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License
+ as published by the Free Software Foundation; either version 2
+ of the License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program(see GLP.txt); if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+]]
+
+
+------------------------------------------------------------------------------------
+--
+-- CensusPlus
+-- A WoW UI customization by Cooper Sellers
+--
+--
+------------------------------------------------------------------------------------
+
+local g_PlayerList = {};
+local g_PlayerLookupTable = {};
+local CensusPlus_NumPlayerButtons = 20;
+local g_MaxNumListed = 1000;
+
+function CensusPlus_ShowPlayerList()
+ CP_PlayerListWindow:Show();
+end
+
+function CensusPlus_PlayerListOnShow()
+
+ debugprofilestart();
+
+ local guildKey = nil;
+ local raceKey = nil;
+ local classKey = nil;
+ local levelKey = nil;
+
+
+ --
+ -- Clear our character list
+ --
+ CensusPlus_ClearPlayerList();
+
+ --
+ -- Get realm and faction
+ --
+ local realmName = g_CensusPlusLocale .. GetCVar("realmName");
+ if( realmName == nil ) then
+ return;
+ end
+
+ local factionGroup = UnitFactionGroup("player");
+ if( factionGroup == nil ) then
+ return;
+ end
+
+
+ --
+ -- Has the user made any selections?
+ --
+ if (g_GuildSelected ~= nil ) then
+ guildKey = g_GuildSelected;
+ end
+ if (g_RaceSelected > 0) then
+ local thisFactionRaces = CensusPlus_GetFactionRaces(factionGroup);
+ raceKey = thisFactionRaces[g_RaceSelected];
+ end
+ if (g_ClassSelected > 0) then
+ local thisFactionClasses = CensusPlus_GetFactionClasses(factionGroup);
+ classKey = thisFactionClasses[g_ClassSelected];
+ end
+ if (g_LevelSelected > 0 or g_LevelSelected < 0) then
+ levelKey = g_LevelSelected;
+ end
+
+ debugprofilestart();
+
+ CensusPlus_ForAllCharacters( realmName, factionGroup, raceKey, classKey, guildKey, levelKey, CensusPlus_AddPlayerToList);
+
+ if( CensusPlus_EnableProfiling ) then
+ CensusPlus_Msg( "PROFILE: Time to do calcs 1 " .. debugprofilestop() / 1000000000 );
+ debugprofilestart();
+ end
+
+
+ --
+ -- Build our list
+ --
+ CensusPlus_UpdatePlayerListButtons();
+
+ local totalCharactersText = format(CENSUSPlus_TOTALCHAR, table.getn( g_PlayerList ) );
+ if( table.getn( g_PlayerList ) == g_MaxNumListed ) then
+ totalCharactersText = totalCharactersText .. " -- " .. CENSUSPlus_MAXXED;
+ end
+
+ CensusPlayerListCount:SetText(totalCharactersText);
+
+end
+
+----------------------------------------------------------------------------------
+--
+-- Predicate function which can be used to compare two characters for sorting
+--
+---------------------------------------------------------------------------------
+local function CharacterPredicate(lhs, rhs)
+ --
+ -- nil references are always less than
+ --
+ if (lhs == nil) then
+ if (rhs == nil) then
+ return false;
+ else
+ return true;
+ end
+ elseif (rhs == nil) then
+ return false;
+ end
+ --
+ -- Sort by name
+ --
+ if (lhs.m_name < rhs.m_name) then
+ return true;
+ elseif (rhs.m_name < lhs.m_name) then
+ return false;
+ end
+
+ --
+ -- Sort by level
+ --
+ if (lhs.m_level < rhs.m_level) then
+ return true;
+ elseif (rhs.m_level < lhs.m_level) then
+ return false;
+ end
+
+ --
+ -- identical
+ --
+ return false;
+end
+
+local function CensusPlus_UpdatePlayerLookup( index, entry )
+ --
+ -- Have to update our table
+ --
+ g_PlayerLookupTable[entry.m_name] = index;
+end
+
+
+
+----------------------------------------------------------------------------------
+--
+-- Update the Player button contents
+--
+---------------------------------------------------------------------------------
+function CensusPlus_UpdatePlayerListButtons()
+ --
+ -- Sort the list
+ --
+ local size = table.getn(g_PlayerList);
+ if (size) then
+ table.sort(g_PlayerList, CharacterPredicate);
+
+ table.foreach(g_PlayerList, CensusPlus_UpdatePlayerLookup );
+
+ end
+
+ --
+ -- Determine where the scroll bar is
+ --
+ local offset = FauxScrollFrame_GetOffset( CensusPlusPlayerListScrollFrame );
+ --
+ -- Walk through all the rows in the frame
+ --
+ local i = 1;
+ while( i <= CensusPlus_NumPlayerButtons ) do
+ --
+ -- Get the index to the ad displayed in this row
+ --
+ local iPlayer = i + offset;
+ --
+ -- Get the button on this row
+ --
+ local button = getglobal("CensusPlusPlayerButton"..i);
+ --
+ -- Is there a valid Player on this row?
+ --
+ if (iPlayer <= size) then
+ local player = g_PlayerList[iPlayer];
+ --
+ -- Update the button text
+ --
+ button:Show();
+ local textField = "CensusPlusPlayerButton"..i.."Name";
+ if ( player.m_name == nil or player.m_name == "") then
+ getglobal(textField):SetText( "None" );
+ else
+ getglobal(textField):SetText( player.m_name );
+ end
+
+ local textField = "CensusPlusPlayerButton"..i.."Level";
+ if ( player.m_level == nil or player.m_level == "") then
+ getglobal(textField):SetText( "n/a" );
+ else
+ getglobal(textField):SetText( player.m_level );
+ end
+
+ local textField = "CensusPlusPlayerButton"..i.."Class";
+ if ( player.m_guild == nil or player.m_guild == "") then
+ getglobal(textField):SetText( "Unguilded" );
+ else
+ getglobal(textField):SetText( player.m_guild );
+ end
+
+ local textField = "CensusPlusPlayerButton"..i.."Seen";
+ if ( player.m_seen == nil or player.m_seen == "") then
+ getglobal(textField):SetText( "UNK" );
+ else
+ getglobal(textField):SetText( player.m_seen );
+ end
+ else
+ --
+ -- Hide the button
+ --
+ button:Hide();
+ end
+ --
+ -- Next row
+ --
+ i = i + 1;
+ end
+ --
+ -- Update the scroll bar
+ --
+ FauxScrollFrame_Update(CensusPlusPlayerListScrollFrame, size, CensusPlus_NumPlayerButtons, CensusPlus_GUILDBUTTONSIZEY);
+end
+
+----------------------------------------------------------------------------------
+--
+-- Find a characters in the g_PlayerList array by name
+--
+---------------------------------------------------------------------------------
+function CensusPlus_PlayerButton_OnClick()
+ local id = this:GetID();
+ local offset = FauxScrollFrame_GetOffset( CensusPlusPlayerListScrollFrame );
+ local newSelection = id + offset;
+
+ local player = g_PlayerList[newSelection];
+ FriendsFrame_ShowDropdown(player.m_name, 1);
+end
+
+----------------------------------------------------------------------------------
+--
+-- Clear all the characters
+--
+---------------------------------------------------------------------------------
+function CensusPlus_ClearPlayerList()
+ g_PlayerList = nil;
+ g_PlayerList = {};
+
+ g_PlayerLookupTable = nil;
+ g_PlayerLookupTable = {};
+end
+
+----------------------------------------------------------------------------------
+--
+-- Add a character to the list
+--
+---------------------------------------------------------------------------------
+function CensusPlus_AddPlayerToList( name, level, guild, raceName, className, lastseen )
+ local size = table.getn( g_PlayerList );
+
+ if( size >= g_MaxNumListed ) then
+ return;
+ end
+
+ local index = g_PlayerLookupTable[name];
+ if (index == nil) then
+ local size = table.getn( g_PlayerList );
+ index = size + 1;
+ g_PlayerList[index] = { m_name = name, m_level = level, m_guild = guild, m_seen = lastseen };
+ g_PlayerLookupTable[name] = index;
+ end
+end
+
+function CensusPlus_List_OnMouseDown( self, arg1 )
+ if ( ( ( not self.isLocked ) or ( self.isLocked == 0 ) ) and ( arg1 == "LeftButton" ) ) then
+ self:StartMoving();
+ self.isMoving = true;
+ end
+end
diff -r 0da064713cda -r 1aeab8164ef5 CensusPlayerList.xml
--- a/CensusPlayerList.xml Sun Aug 14 15:16:35 2011 +0000
+++ b/CensusPlayerList.xml Sun Aug 14 17:21:31 2011 +0200
@@ -70,7 +70,7 @@
- this:RegisterForClicks( "RightButtonUp");
+ self:RegisterForClicks( "RightButtonUp");
CensusPlus_PlayerButton_OnClick();
@@ -354,21 +354,16 @@
CensusPlus_PlayerListOnShow();
- if ( this.isMoving ) then
- this:StopMovingOrSizing();
- this.isMoving = false;
+ if ( self.isMoving ) then
+ self:StopMovingOrSizing();
+ self.isMoving = false;
end
-
- if ( ( ( not this.isLocked ) or ( this.isLocked == 0 ) ) and ( arg1 == "LeftButton" ) ) then
- this:StartMoving();
- this.isMoving = true;
- end
-
+
- if ( this.isMoving ) then
- this:StopMovingOrSizing();
- this.isMoving = false;
+ if ( self.isMoving ) then
+ self:StopMovingOrSizing();
+ self.isMoving = false;
end
diff -r 0da064713cda -r 1aeab8164ef5 CensusPlus.lua
--- a/CensusPlus.lua Sun Aug 14 15:16:35 2011 +0000
+++ b/CensusPlus.lua Sun Aug 14 17:21:31 2011 +0200
@@ -33,7 +33,7 @@
-- EURO vs US localization problem workaround for common server names
--
---------------------------------------------------------------------------------
-local g_InterfaceVersion = 30000;
+local g_InterfaceVersion = 40000;
g_CensusPlusLocale = "N/A"; -- Must read either US or EU
g_CensusPlusTZOffset = -999;
local g_LocaleSet = false;
@@ -41,24 +41,27 @@
----------------------------------------------------------------------------------
+--rm
+-- guild to search (Extra button 'Take guild')
+--local CensusPlus_MYGUILD = "The Last Journey";
+--local CensusPlus_MYGUILD = "Worgengrauen";
+CensusPlus_MYGUILD = "Flieht Ihr Narren";
+---------------------------------------------------------------------------------
--
-- Constants
---rm
-local CensusPlus_MYGUILD = "The Last Journey"; -- Special guild to search
----------------------------------------------------------------------------------
-local CensusPlus_VERSION = "4.2.2"; -- version
+local CensusPlus_VERSION = "5.0.2"; -- version
local CensusPlus_MAXBARHEIGHT = 128; -- Length of blue bars
-local CensusPlus_NUMGUILDBUTTONS = 10; -- How many guild buttons are on the UI?
-local MAX_CHARACTER_LEVEL = 80; -- Maximum level a PC can attain
+local CensusPlus_NUMGUILDBUTTONS = 10; -- How many guild buttons are on the UI?
+local MAX_CHARACTER_LEVEL = 85; -- Maximum level a PC can attain
--rm
local MAX_LEVEL_DISPLAY = 255; -- Maximum level a PC can attain
-local MAX_WHO_RESULTS = 45; -- Maximum number of who results the server will return
+local MAX_WHO_RESULTS = 49; -- Maximum number of who results the server will return
CensusPlus_GUILDBUTTONSIZEY = 16;
-local CensusPlus_UPDATEDELAY = 5; -- Delay time between /who messages
+local CensusPlus_UPDATEDELAY = 5; -- Delay time between /who messages
local CP_MAX_TIMES = 50;
-local g_ServerPrefix = ""; -- US VERSION!!
---local g_ServerPrefix = "EU-"; -- EU VERSION!!
+local g_ServerPrefix = ""; -- formerly only US VERSION
+--local g_ServerPrefix = "EU-"; -- EU VERSION automatically
local wholib
----------------------------------------------------------------------------------
@@ -203,6 +206,9 @@
g_RaceClassList[CENSUSPlus_UNDEAD] = 27;
g_RaceClassList[CENSUSPlus_DRAENEI] = 28;
g_RaceClassList[CENSUSPlus_BLOODELF] = 29;
+g_RaceClassList[CENSUSPlus_WORGEN] = 32;
+g_RaceClassList[CENSUSPlus_GOBLIN] = 31;
+
g_TimeDatabase[CENSUSPlus_DRUID] = 0;
g_TimeDatabase[CENSUSPlus_HUNTER] = 0;
@@ -229,12 +235,14 @@
g_FactionCheck[CENSUSPlus_TROLL] = CENSUSPlus_HORDE;
g_FactionCheck[CENSUSPlus_UNDEAD] = CENSUSPlus_HORDE;
g_FactionCheck[CENSUSPlus_BLOODELF] = CENSUSPlus_HORDE;
+g_FactionCheck[CENSUSPlus_GOBLIN] = CENSUSPlus_HORDE;
g_FactionCheck[CENSUSPlus_DWARF] = CENSUSPlus_ALLIANCE;
g_FactionCheck[CENSUSPlus_GNOME] = CENSUSPlus_ALLIANCE;
g_FactionCheck[CENSUSPlus_HUMAN] = CENSUSPlus_ALLIANCE;
g_FactionCheck[CENSUSPlus_NIGHTELF] = CENSUSPlus_ALLIANCE;
g_FactionCheck[CENSUSPlus_DRAENEI] = CENSUSPlus_ALLIANCE;
+g_FactionCheck[CENSUSPlus_WORGEN] = CENSUSPlus_ALLIANCE;
local g_ReturnedZero = false;
do
@@ -244,7 +252,7 @@
and there is no real harm in removing the handler entirely, that's what's happening. If and when Blizzard decides to fix it, this should be removed.
Thanks to ckknight of wowace for this
]]
- GuildControlPopupFrame:SetScript("OnEvent", nil)
+-- GuildControlPopupFrame:SetScript("OnEvent", nil)
end
@@ -420,9 +428,9 @@
function CensusPlus_GetFactionRaces(faction)
local ret = {};
if (faction == CENSUSPlus_HORDE) then
- ret = {CENSUSPlus_ORC, CENSUSPlus_TAUREN, CENSUSPlus_TROLL, CENSUSPlus_UNDEAD, CENSUSPlus_BLOODELF};
+ ret = {CENSUSPlus_ORC, CENSUSPlus_TAUREN, CENSUSPlus_TROLL, CENSUSPlus_UNDEAD, CENSUSPlus_BLOODELF, CENSUSPlus_GOBLIN};
elseif (faction == CENSUSPlus_ALLIANCE) then
- ret = {CENSUSPlus_DWARF, CENSUSPlus_GNOME, CENSUSPlus_HUMAN, CENSUSPlus_NIGHTELF, CENSUSPlus_DRAENEI};
+ ret = {CENSUSPlus_DWARF, CENSUSPlus_GNOME, CENSUSPlus_HUMAN, CENSUSPlus_NIGHTELF, CENSUSPlus_DRAENEI, CENSUSPlus_WORGEN};
end
return ret;
end
@@ -450,25 +458,29 @@
local function GetRaceClasses(race)
local ret = {};
if (race == CENSUSPlus_ORC) then
- ret = {CENSUSPlus_WARRIOR, CENSUSPlus_HUNTER, CENSUSPlus_ROGUE, CENSUSPlus_SHAMAN, CENSUSPlus_WARLOCK, CENSUSPlus_DEATHKNIGHT};
+ ret = {CENSUSPlus_WARRIOR, CENSUSPlus_HUNTER, CENSUSPlus_ROGUE, CENSUSPlus_MAGE, CENSUSPlus_SHAMAN, CENSUSPlus_WARLOCK, CENSUSPlus_DEATHKNIGHT};
elseif (race == CENSUSPlus_TAUREN) then
- ret = {CENSUSPlus_WARRIOR, CENSUSPlus_HUNTER, CENSUSPlus_SHAMAN, CENSUSPlus_DRUID, CENSUSPlus_DEATHKNIGHT};
+ ret = {CENSUSPlus_PALADIN, CENSUSPlus_WARRIOR, CENSUSPlus_HUNTER, CENSUSPlus_SHAMAN, CENSUSPlus_PRIEST, CENSUSPlus_DRUID, CENSUSPlus_DEATHKNIGHT};
elseif (race == CENSUSPlus_TROLL) then
- ret = {CENSUSPlus_WARRIOR, CENSUSPlus_HUNTER, CENSUSPlus_ROGUE, CENSUSPlus_PRIEST, CENSUSPlus_SHAMAN, CENSUSPlus_MAGE, CENSUSPlus_DEATHKNIGHT};
+ ret = {CENSUSPlus_WARRIOR, CENSUSPlus_HUNTER, CENSUSPlus_ROGUE, CENSUSPlus_PRIEST, CENSUSPlus_SHAMAN, CENSUSPlus_MAGE, CENSUSPlus_DRUID, CENSUSPlus_DEATHKNIGHT};
elseif (race == CENSUSPlus_UNDEAD) then
- ret = {CENSUSPlus_WARRIOR, CENSUSPlus_ROGUE, CENSUSPlus_PRIEST, CENSUSPlus_MAGE, CENSUSPlus_WARLOCK, CENSUSPlus_DEATHKNIGHT};
+ ret = {CENSUSPlus_WARRIOR, CENSUSPlus_HUNTER, CENSUSPlus_ROGUE, CENSUSPlus_PRIEST, CENSUSPlus_MAGE, CENSUSPlus_WARLOCK, CENSUSPlus_DEATHKNIGHT};
elseif (race == CENSUSPlus_DWARF) then
- ret = {CENSUSPlus_WARRIOR, CENSUSPlus_PALADIN, CENSUSPlus_HUNTER, CENSUSPlus_ROGUE, CENSUSPlus_PRIEST, CENSUSPlus_DEATHKNIGHT};
+ ret = {CENSUSPlus_WARRIOR, CENSUSPlus_PALADIN, CENSUSPlus_HUNTER, CENSUSPlus_ROGUE, CENSUSPlus_MAGE, CENSUSPlus_PRIEST, CENSUSPlus_SHAMAN, CENSUSPlus_DEATHKNIGHT};
elseif (race == CENSUSPlus_GNOME) then
- ret = {CENSUSPlus_WARRIOR, CENSUSPlus_ROGUE, CENSUSPlus_MAGE, CENSUSPlus_WARLOCK, CENSUSPlus_DEATHKNIGHT};
+ ret = {CENSUSPlus_WARRIOR, CENSUSPlus_ROGUE, CENSUSPlus_MAGE, CENSUSPlus_PRIEST, CENSUSPlus_WARLOCK, CENSUSPlus_DEATHKNIGHT};
elseif (race == CENSUSPlus_HUMAN) then
- ret = {CENSUSPlus_WARRIOR, CENSUSPlus_PALADIN, CENSUSPlus_ROGUE, CENSUSPlus_PRIEST, CENSUSPlus_MAGE, CENSUSPlus_WARLOCK, CENSUSPlus_DEATHKNIGHT};
+ ret = {CENSUSPlus_WARRIOR, CENSUSPlus_HUNTER, CENSUSPlus_PALADIN, CENSUSPlus_ROGUE, CENSUSPlus_PRIEST, CENSUSPlus_MAGE, CENSUSPlus_WARLOCK, CENSUSPlus_DEATHKNIGHT};
elseif (race == CENSUSPlus_NIGHTELF) then
- ret = {CENSUSPlus_WARRIOR, CENSUSPlus_HUNTER, CENSUSPlus_ROGUE, CENSUSPlus_PRIEST, CENSUSPlus_DRUID, CENSUSPlus_DEATHKNIGHT};
+ ret = {CENSUSPlus_WARRIOR, CENSUSPlus_HUNTER, CENSUSPlus_MAGE, CENSUSPlus_ROGUE, CENSUSPlus_PRIEST, CENSUSPlus_DRUID, CENSUSPlus_DEATHKNIGHT};
elseif (race == CENSUSPlus_BLOODELF) then
- ret = {CENSUSPlus_PALADIN, CENSUSPlus_HUNTER, CENSUSPlus_ROGUE, CENSUSPlus_PRIEST, CENSUSPlus_MAGE, CENSUSPlus_WARLOCK, CENSUSPlus_DEATHKNIGHT};
+ ret = {CENSUSPlus_WARRIOR, CENSUSPlus_PALADIN, CENSUSPlus_HUNTER, CENSUSPlus_ROGUE, CENSUSPlus_PRIEST, CENSUSPlus_MAGE, CENSUSPlus_WARLOCK, CENSUSPlus_DEATHKNIGHT};
elseif (race == CENSUSPlus_DRAENEI) then
ret = {CENSUSPlus_WARRIOR, CENSUSPlus_PALADIN, CENSUSPlus_HUNTER, CENSUSPlus_PRIEST, CENSUSPlus_SHAMAN, CENSUSPlus_MAGE, CENSUSPlus_DEATHKNIGHT};
+ elseif (race == CENSUSPlus_WORGEN) then
+ ret = {CENSUSPlus_DEATHKNIGHT, CENSUSPlus_DRUID, CENSUSPlus_HUNTER, CENSUSPlus_MAGE, CENSUSPlus_PRIEST, CENSUSPlus_ROGUE, CENSUSPlus_WARLOCK, CENSUSPlus_WARRIOR};
+ elseif (race == CENSUSPlus_GOBLIN) then
+ ret = {CENSUSPlus_DEATHKNIGHT, CENSUSPlus_HUNTER, CENSUSPlus_MAGE, CENSUSPlus_PRIEST, CENSUSPlus_ROGUE, CENSUSPlus_SHAMAN, CENSUSPlus_WARLOCK, CENSUSPlus_WARRIOR};
end
return ret;
end
@@ -489,8 +501,8 @@
--
-----------------------------------------------------------------------------------
local function GetNameLetters()
+-- return { "a", "b", "c", "d", "e", "f", "g", "i", "o", "p", "r", "s", "t", "u", "y" };
--rm
--- return { "a", "b", "c", "d", "e", "f", "g", "i", "o", "p", "r", "s", "t", "u", "y" };
-- return { "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "\195\134", "\195\164", "\195\182", "\195\188", "\195\152" };
return { "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "\195\134", "\195\164", "\195\182", "\195\188", "\195\152", "\195\184" };
end
@@ -565,7 +577,7 @@
-- Called once on load
--
-----------------------------------------------------------------------------------
-function CensusPlus_OnLoad()
+function CensusPlus_OnLoad( this )
--
-- Update the version number
--
@@ -642,10 +654,9 @@
--
local updateFrame = CreateFrame("Frame");
updateFrame:SetScript("OnUpdate", CensusPlus_OnUpdate);
- CensusPlusTakeGuildButton:SetText( CENSUSPlus_TAKEGUILD.." \""..CensusPlus_MYGUILD.."\"" );
end
-function CensusPlus_FriendsFrame_OnEvent(...)
+function CensusPlus_FriendsFrame_OnEvent(self, event, ...)
-- CensusPlus_Msg( "CP_FF_OE Message =>" .. event );
@@ -697,7 +708,7 @@
end
- CP_Pre_OnEvent(...);
+ CP_Pre_OnEvent(self, event, ...);
end
@@ -1180,7 +1191,7 @@
-- Display a tooltip for the take button
--
-----------------------------------------------------------------------------------
-function CensusPlus_Take_OnEnter()
+function CensusPlus_Take_OnEnter( this )
if (g_IsCensusPlusInProgress) then
if (g_CensusPlusManuallyPaused) then
GameTooltip:SetOwner(this, "ANCHOR_RIGHT");
@@ -1202,7 +1213,7 @@
-----------------------------------------------------------------------------------
-- Display a tooltip for the take guild button
-----------------------------------------------------------------------------------
-function CensusPlus_TakeGuild_OnEnter()
+function CensusPlus_TakeGuild_OnEnter( this )
if (g_IsCensusPlusInProgress) then
if (g_CensusPlusManuallyPaused) then
GameTooltip:SetOwner(this, "ANCHOR_RIGHT");
@@ -1506,7 +1517,9 @@
end
end
+
CensusPlusTakeButton:SetText( CENSUSPlus_PAUSE );
+
end
-----------------------------------------------------------------------------------
@@ -2821,6 +2834,9 @@
return;
end
+ --rm
+ CensusPlusTakeGuildButton:SetText( CENSUSPlus_TAKEGUILD.." \""..CensusPlus_MYGUILD.."\"" );
+
CensusPlusFactionName:SetText(format(CENSUSPlus_FACTION, factionGroup));
if( CensusPlus_Database["Info"]["Locale"] ~= nil ) then
@@ -2944,6 +2960,7 @@
for i = 1, numRaces, 1 do
local race = thisFactionRaces[i];
local buttonName = "CensusPlusRaceBar"..i;
+
local button = getglobal(buttonName);
local thisCount = g_RaceCount[i];
if ((thisCount ~= nil) and (thisCount > 0) and (maxCount > 0)) then
@@ -2955,6 +2972,8 @@
button:Hide();
end
local normalTextureName="Interface\\AddOns\\CensusPlus\\Skin\\CensusPlus_"..g_RaceClassList[race];
+
+
local legendName = "CensusPlusRaceLegend"..i;
local legend = getglobal(legendName);
legend:SetNormalTexture(normalTextureName);
@@ -3084,7 +3103,6 @@
CensusPlus_PlayerListOnShow();
end
-
debugprofilestop();
end
@@ -3130,7 +3148,7 @@
-- Race legend clicked
--
---------------------------------------------------------------------------------
-function CensusPlus_OnClickRace()
+function CensusPlus_OnClickRace( this )
local id = this:GetID();
if (id == g_RaceSelected) then
g_RaceSelected = 0;
@@ -3145,7 +3163,7 @@
-- Class legend clicked
--
---------------------------------------------------------------------------------
-function CensusPlus_OnClickClass()
+function CensusPlus_OnClickClass( this )
local id = this:GetID();
if (id == g_ClassSelected) then
g_ClassSelected = 0;
@@ -3161,8 +3179,8 @@
-- Level bar loaded
--
---------------------------------------------------------------------------------
-function CensusPlus_OnLoadLevel()
- this:RegisterForClicks("LeftButtonUp","RightButtonUp");
+function CensusPlus_OnLoadLevel( self )
+ self:RegisterForClicks("LeftButtonUp","RightButtonUp");
end
----------------------------------------------------------------------------------
@@ -3170,7 +3188,7 @@
-- Level bar clicked
--
---------------------------------------------------------------------------------
-function CensusPlus_OnClickLevel(button)
+function CensusPlus_OnClickLevel(this, button)
local id = this:GetID();
if (((button == "LeftButton") and (id == g_LevelSelected)) or ((button == "RightButton") and (id + g_LevelSelected == 0))) then
g_LevelSelected = 0;
@@ -3187,7 +3205,7 @@
-- Race tooltip
--
---------------------------------------------------------------------------------
-function CensusPlus_OnEnterRace()
+function CensusPlus_OnEnterRace( this )
local factionGroup = UnitFactionGroup("player");
local thisFactionRaces = CensusPlus_GetFactionRaces(factionGroup);
local id = this:GetID();
@@ -3206,15 +3224,15 @@
-- Class tooltip
--
---------------------------------------------------------------------------------
-function CensusPlus_OnEnterClass()
+function CensusPlus_OnEnterClass( self )
local factionGroup = UnitFactionGroup("player");
local thisFactionClasses = CensusPlus_GetFactionClasses(factionGroup);
- local id = this:GetID();
+ local id = self:GetID();
local className = thisFactionClasses[id];
local count = g_ClassCount[id];
if (count ~= nil) then
local percent = floor((count / g_TotalCount) * 100);
- GameTooltip:SetOwner(this, "ANCHOR_RIGHT");
+ GameTooltip:SetOwner(self, "ANCHOR_RIGHT");
GameTooltip:SetText(className.."\n"..count.."\n"..percent.."%", 1.0, 1.0, 1.0);
GameTooltip:Show();
end
@@ -3225,11 +3243,11 @@
-- Level tooltip
--
---------------------------------------------------------------------------------
-function CensusPlus_OnEnterLevel()
+function CensusPlus_OnEnterLevel( this )
local id = this:GetID();
local count = g_LevelCount[id];
if (count ~= nil) then
- local percent = floor(count * 100 / g_TotalCount);
+ local percent = floor((count / g_TotalCount) * 100);
GameTooltip:SetOwner(this, "ANCHOR_RIGHT");
GameTooltip:SetText("Level "..id.."\n"..count.."\n"..percent.."%", 1.0, 1.0, 1.0);
GameTooltip:Show();
@@ -3241,7 +3259,7 @@
-- Clicked a guild button
--
---------------------------------------------------------------------------------
-function CensusPlus_GuildButton_OnClick()
+function CensusPlus_GuildButton_OnClick( this )
local id = this:GetID();
local offset = FauxScrollFrame_GetOffset(CensusPlusGuildScrollFrame);
local newSelection = id + offset;
@@ -3940,7 +3958,7 @@
name = gsub(name, "([^%s]*)%s+([^%s]*)%s+([^%s]*)", "%3");
name = gsub(name, "([^%s]*)%s+([^%s]*)", "%2");
if ( IsShiftKeyDown() ) then
- if ( not ChatFrameEditBox:IsVisible() ) then
+ if ( not ChatFrame1EditBox:IsVisible() ) then
--
-- This is the part we need to snag
--
@@ -4008,3 +4026,28 @@
SendWho( msg );
end
end
+function CensusPlus_Options_OnMouseUp(self,...)
+ CensusPlus_Msg('Mouse up');
+ if ( self.isMoving ) then
+ self:StopMovingOrSizing();
+ self.isMoving = false;
+ end
+end
+function CensusPlus_Options_OnMouseDown(self,arg1,arg2,arg3,...)
+ if ( ( ( not self.isLocked ) or ( self.isLocked == 0 ) ) and ( arg1 == "LeftButton" ) ) then
+ self:StartMoving();
+ self.isMoving = true;
+ end
+end
+function CensusPlus_Mini_OnMouseDown( self, arg1 )
+ if ( ( ( not self.isLocked ) or ( self.isLocked == 0 ) ) and ( arg1 == "LeftButton" ) ) then
+ self:StartMoving();
+ self.isMoving = true;
+ end
+end
+function CensusPlus_Census_OnMouseDown( self, arg1 )
+ if ( ( ( not self.isLocked ) or ( self.isLocked == 0 ) ) and ( arg1 == "LeftButton" ) ) then
+ self:StartMoving();
+ self.isMoving = true;
+ end
+end
\ No newline at end of file
diff -r 0da064713cda -r 1aeab8164ef5 CensusPlus.toc
--- a/CensusPlus.toc Sun Aug 14 15:16:35 2011 +0000
+++ b/CensusPlus.toc Sun Aug 14 17:21:31 2011 +0200
@@ -1,14 +1,21 @@
-## Interface: 30300
-## Version: 4.2.2
+## Interface: 40200
+## Version: 5.0.2
## Title: CensusPlus EmSpeçial
## Notes: Collects and displays census information. This AddOn is licenced under the GNU GPL, see GPL.txt for details.
## Original Author: Ian Pieragostini
## Modified By: Cooper Sellers - www.warcraftrealms.com
-## Modified By: Em based on CensusPlus-30300-4.2.2.zip
+## Modified By: sylvanaar
+## Modified By: Em based on CensusPlus-30300-4.2.2.zip , rebase on CensusPlus-40000-5.0.2.zip
## SavedVariables: CensusPlus_Database,CensusPlus_BGInfo,CensusPlus_Unhandled
## SavedVariablesPerCharacter: CensusPlus_DoThisCharacter,CensusPlus_PerCharInfo
## X-Website: http://www.warcraftrealms.com
+#@no-lib-strip@
+libs\LibStub\LibStub.lua
+libs\CallbackHandler-1.0\CallbackHandler-1.0.xml
+libs\LibWho-2.0\LibWho-2.0.lua
+#@end-no-lib-strip@
+
CensusPlus.xml
CensusButton.xml
CensusPlayerList.xml
diff -r 0da064713cda -r 1aeab8164ef5 CensusPlus.wuuver
--- a/CensusPlus.wuuver Sun Aug 14 15:16:35 2011 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-20100204
\ No newline at end of file
diff -r 0da064713cda -r 1aeab8164ef5 CensusPlus.xml
--- a/CensusPlus.xml Sun Aug 14 15:16:35 2011 +0000
+++ b/CensusPlus.xml Sun Aug 14 17:21:31 2011 +0200
@@ -29,22 +29,14 @@
-
- CensusPlus_OnClickMaximize();
-
+
- GameTooltip:SetOwner(this, "ANCHOR_RIGHT");
+ GameTooltip:SetOwner(self, "ANCHOR_RIGHT");
GameTooltip:SetText(CENSUSPlus_MAXIMIZE, 1.0, 1.0, 1.0);
GameTooltip:Show();
@@ -193,21 +167,16 @@
- if ( this.isMoving ) then
- this:StopMovingOrSizing();
- this.isMoving = false;
+ if ( self.isMoving ) then
+ self:StopMovingOrSizing();
+ self.isMoving = false;
end
-
- if ( ( ( not this.isLocked ) or ( this.isLocked == 0 ) ) and ( arg1 == "LeftButton" ) ) then
- this:StartMoving();
- this.isMoving = true;
- end
-
+
- if ( this.isMoving ) then
- this:StopMovingOrSizing();
- this.isMoving = false;
+ if ( self.isMoving ) then
+ self:StopMovingOrSizing();
+ self.isMoving = false;
end
@@ -229,7 +198,7 @@
-
+
@@ -381,7 +350,7 @@
PlaySound("igMainMenuOptionCheckBoxOn");
- CensusPlus_ToggleOptions();
+ CensusPlus_ToggleOptions(arg1);
@@ -406,11 +375,9 @@
-
- CensusPlus_OnClickMinimize();
-
+
- GameTooltip:SetOwner(this, "ANCHOR_RIGHT");
+ GameTooltip:SetOwner(self, "ANCHOR_RIGHT");
GameTooltip:SetText(CENSUSPlus_MINIMIZE, 1.0, 1.0, 1.0);
GameTooltip:Show();
@@ -431,12 +398,8 @@
-
- CensusPlus_Take_OnClick();
-
-
- CensusPlus_Take_OnEnter();
-
+
+
GameTooltip:Hide();
@@ -458,7 +421,7 @@
CensusPlus_StopCensus( );
- GameTooltip:SetOwner(this, "ANCHOR_RIGHT");
+ GameTooltip:SetOwner(self, "ANCHOR_RIGHT");
GameTooltip:SetText(CENSUSPlus_STOPCENSUS, 1.0, 1.0, 1.0);
GameTooltip:Show();
@@ -483,7 +446,7 @@
CensusPlus_PruneData(30);
- GameTooltip:SetOwner(this, "ANCHOR_RIGHT");
+ GameTooltip:SetOwner(self, "ANCHOR_RIGHT");
GameTooltip:SetText(CENSUSPlus_PRUNECENSUS, 1.0, 1.0, 1.0);
GameTooltip:Show();
@@ -508,7 +471,7 @@
CensusPlus_Purge();
- GameTooltip:SetOwner(this, "ANCHOR_RIGHT");
+ GameTooltip:SetOwner(self, "ANCHOR_RIGHT");
GameTooltip:SetText(CENSUSPlus_PURGEDATABASE, 1.0, 1.0, 1.0);
GameTooltip:Show();
@@ -529,12 +492,8 @@
-
- CensusPlus_TakeGuild_OnClick();
-
-
- CensusPlus_TakeGuild_OnEnter();
-
+
+
GameTooltip:Hide();
@@ -759,11 +718,29 @@
-