Quantcast
WoWInterface: SVN - LanguageCycle - Path Comparison - / Rev 10 and / Rev 11

WoWInterface SVN LanguageCycle

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /
    from Rev 10 to Rev 11
    Reverse comparison

Rev 10 → Rev 11

trunk/LanguageCycle.toc
1,6 → 1,6
## Interface: 50400
## Interface: 60000
## Title: LanguageCycle
## Version: 5.3
## Version: 6.0.2a
## Description: Adds key binding and slash commands for selecting a character's current language.
## Notes: Adds key binding and slash commands for selecting a character's current language. Now with LDB support!
## Author: Halya of Argent Dawn EU.
trunk/LanguageCycle.xml
71,47 → 71,8
<PushedTexture file="Interface\Buttons\UI-Panel-MinimizeButton-Down"/>
<HighlightTexture file="Interface\Buttons\UI-Panel-MinimizeButton-Highlight" alphaMode="ADD"/>
</Button>
<CheckButton name="Language_Cycle_Party_Toggle" inherits="UICheckButtonTemplate">
<Size>
<AbsDimension x="28" y="28"/>
</Size>
<Anchors>
<Anchor point="TOPRIGHT" relativePoint="RIGHT">
<Offset>
<AbsDimension x="-4" y="3"/>
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnEnter function="Language_Cycle_Backdrop_Show" />
<OnLeave function="Language_Cycle_Backdrop_Hide" />
<OnClick>
if ( self:GetChecked() ) then
PlaySound("igMainMenuOptionCheckBoxOff");
else
PlaySound("igMainMenuOptionCheckBoxOn");
end
Language_Cycle_Toggle_Group();
</OnClick>
</Scripts>
</CheckButton>
</Frames>
<Layers>
<Layer level="OVERLAY">
<FontString name="Language_Cycle_Party_Toggle_Text" inherits="GameFontNormalSmall" text="Speak Common in Party/Guild chat:">
<Size>
<AbsDimension x="110" y="42"/>
</Size>
<Anchors>
<Anchor point="TOPLEFT" relativePoint="TOPLEFT">
<Offset>
<AbsDimension x="0" y="-15"/>
</Offset>
</Anchor>
</Anchors>
</FontString>
</Layer>
</Layers>
 
</Frame>
<!-- Button for Language Cycling -->
<Button name="Language_Cycle_Button" inherits="UIPanelButtonTemplate" enableMouse="true" visible="true" text="Loading...">
trunk/LanguageCycle.lua
32,12 → 32,12
LC_player_id = nil;
LC_panel_height = 0;
LC_panel_width = 0;
LC_version = "5.3.0c, by Halya, Argent Dawn, EU";
LC_version = "6.0.2a, by Halya, Argent Dawn, EU";
LC_Help_Text={};
LC_Help_Text[0]="Language Cycle will respond to the following commands:";
LC_Help_Text[1]="- /lc : Toggles spoken language between racial/common";
LC_Help_Text[2]="- /lc status : Displays current settings";
LC_Help_Text[3]="- /lc toggle : Toggles Guild/Party translation on/off";
LC_Help_Text[3]="- /lc toggle : function removed, translation for guild/party is now forced by Blizzard";
LC_Help_Text[4]="- /lc help : Displays this message";
LC_Help_Text[5]="- /lc show : Display the language cycle button";
LC_Help_Text[6]="- /lc hide : Hide the language cycle button";
91,7 → 91,6
Language_Cycle_Backdrop_Hide();
LC_panel_height = Language_Cycle_Panel:GetHeight();
LC_panel_width = Language_Cycle_Panel:GetWidth();
Language_Cycle_Party_Toggle_Text:SetJustifyH("Right");
Language_Cycle_Add_Message("LanguageCycle loaded; Type '/lc help' for a list of options; Version " .. LC_version);
 
-- self:SetPadding(16);
112,16 → 111,6
language = LANGUAGE_CYCLE.saved_language[LC_player_id];
end
 
-- Small change here. Instead of defining what channels we WANT
-- in a common language, we define what channels we DON'T want.
-- Since those are far fewer in number. -Nhani
if (LANGUAGE_CYCLE.translate_group) then
if (chatType ~= "SAY" and chatType ~= "YELL") then
if (language ~= LC_default_language) then
language = LC_default_language;
end
end
end
local numLanguages = GetNumLanguages();
local i;
for i = 1, numLanguages, 1 do
281,12 → 270,11
function Language_Cycle_Init()
--Called when the Player_Entering_World event fires, usually on character login.
-- May be called later, if initialization fails
LC_realm_name = string.gsub(GetCVar("realmName"),"'","");
LC_realm_name = string.gsub(GetRealmName(),"'","");
LC_player_name = UnitName("player");
LC_default_language = GetDefaultLanguage();
LC_verbose = false;
Language_Cycle_Backdrop_Hide(true);
Language_Cycle_Set_Text_Color();
local lang;
 
if (LC_player_name == nil or LC_player_name == LC_unknown or LC_realm_name == nil) then
301,13 → 289,8
Language_Cycle_Set_Lang(lang)
end
 
if (LC_default_language == nil) then
else
Language_Cycle_Party_Toggle_Text:SetText("Speak " .. LC_default_language .. " in Party/Guild chat:");
end
 
 
Language_Cycle_Set_Party_Checkbutton();
 
LC_verbose = true;
-- For debugging
-- Language_Cycle_Debug_Message();
375,47 → 358,6
end
end
 
 
function Language_Cycle_Toggle_Group(verbose)
if (LANGUAGE_CYCLE.translate_group) then
LANGUAGE_CYCLE.translate_group = false;
if (verbose) then
Language_Cycle_Add_Message("Guild/Party translation is now off.");
end
else
LANGUAGE_CYCLE.translate_group = true;
if (verbose) then
Language_Cycle_Add_Message("Guild/Party translation is now on.");
end
end
Language_Cycle_Set_Text_Color();
Language_Cycle_Set_Party_Checkbutton();
-- if (IsAddOnLoaded("Titan")) then
-- TitanPanelButton_UpdateButton(TITAN_LANGUAGECYCLE_ID);
-- end
-- if (IsAddOnLoaded("FuBar")) then
-- LanguageCycleFuBar:UpdateText()
-- end
end
 
 
function Language_Cycle_Set_Party_Checkbutton()
if (LANGUAGE_CYCLE.translate_group) then
Language_Cycle_Party_Toggle:SetChecked(1);
else
Language_Cycle_Party_Toggle:SetChecked(0);
end
end
 
 
function Language_Cycle_Set_Text_Color()
if (LANGUAGE_CYCLE.translate_group) then
Language_Cycle_Button:GetNormalFontObject():SetTextColor(1, 1, 1);
else
Language_Cycle_Button:GetNormalFontObject():SetTextColor(.5, 1, .5);
end
end
 
function Language_Cycle_Slash(arg)
if (arg == "" or arg == nil) then
Language_Cycle_Cycle();
432,7 → 374,7
end
Language_Cycle_Add_Message(msg);
elseif (arg == "party" or arg == "guild" or arg == "group" or arg =="toggle") then
Language_Cycle_Toggle_Group(true);
Language_Cycle_Add_Message("This function has been depreciated due to Blizzard's changes");
elseif (arg == "show" or arg == "hide") then
Language_Cycle_Panel_Visible();
elseif (arg == "mm" or arg == "MM") then