updated for cataclysm
This commit is contained in:
parent
5d9f11120a
commit
e80f696ac7
46
TurnIn.xml
46
TurnIn.xml
@ -63,13 +63,13 @@
|
||||
</Size>
|
||||
<Scripts>
|
||||
<OnEnter>
|
||||
TI_OptionListCheckboxTooltip();
|
||||
TI_OptionListCheckboxTooltip(self);
|
||||
</OnEnter>
|
||||
<OnLeave>
|
||||
TI_TooltipHide();
|
||||
</OnLeave>
|
||||
<OnClick>
|
||||
TI_OptionToggle();
|
||||
TI_OptionToggle(self);
|
||||
</OnClick>
|
||||
</Scripts>
|
||||
</CheckButton>
|
||||
@ -86,13 +86,13 @@
|
||||
</Anchors>
|
||||
<Scripts>
|
||||
<OnEnter>
|
||||
TI_TooltipMessage("Decrease this option's priority.");
|
||||
TI_TooltipMessage(self, "Decrease this option's priority.");
|
||||
</OnEnter>
|
||||
<OnLeave>
|
||||
TI_TooltipHide();
|
||||
</OnLeave>
|
||||
<OnClick>
|
||||
TI_OptionMove(1);
|
||||
TI_OptionMove(self, 1);
|
||||
</OnClick>
|
||||
</Scripts>
|
||||
<NormalTexture file="Interface\ChatFrame\UI-ChatIcon-ScrollDown-Up"/>
|
||||
@ -113,10 +113,10 @@
|
||||
</Anchors>
|
||||
<Scripts>
|
||||
<OnClick>
|
||||
TI_OptionMove(-1);
|
||||
TI_OptionMove(self, -1);
|
||||
</OnClick>
|
||||
<OnEnter>
|
||||
TI_TooltipMessage("Increase this option's priority.");
|
||||
TI_TooltipMessage(self, "Increase this option's priority.");
|
||||
</OnEnter>
|
||||
<OnLeave>
|
||||
TI_TooltipHide();
|
||||
@ -199,11 +199,11 @@
|
||||
</Size>
|
||||
<Scripts>
|
||||
<OnClick>
|
||||
TI_NPCToggle();
|
||||
TI_NPCListCheckboxTooltip();
|
||||
TI_NPCToggle(self);
|
||||
TI_NPCListCheckboxTooltip(self);
|
||||
</OnClick>
|
||||
<OnEnter>
|
||||
TI_NPCListCheckboxTooltip();
|
||||
TI_NPCListCheckboxTooltip(self);
|
||||
</OnEnter>
|
||||
<OnLeave>
|
||||
TI_TooltipHide();
|
||||
@ -223,13 +223,13 @@
|
||||
</Size>
|
||||
<Scripts>
|
||||
<OnEnter>
|
||||
TI_TooltipMessage("Delete this NPC.");
|
||||
TI_TooltipMessage(self, "Delete this NPC.");
|
||||
</OnEnter>
|
||||
<OnLeave>
|
||||
TI_TooltipHide();
|
||||
</OnLeave>
|
||||
<OnClick>
|
||||
TI_DeleteNPCIndex();
|
||||
TI_DeleteNPCIndex(self);
|
||||
</OnClick>
|
||||
</Scripts>
|
||||
</Button>
|
||||
@ -249,7 +249,7 @@
|
||||
</Layers>
|
||||
<Scripts>
|
||||
<OnClick>
|
||||
TI_SelectNPCIndex();
|
||||
TI_SelectNPCIndex(self);
|
||||
</OnClick>
|
||||
</Scripts>
|
||||
<HighlightTexture file="Interface\QuestFrame\UI-QuestTitleHighlight" alphaMode="ADD"/>
|
||||
@ -260,7 +260,7 @@
|
||||
<Frame Name="TI_TempNPCListEntry" virtual="true" hidden="true">
|
||||
<Scripts>
|
||||
<OnEnter>
|
||||
TI_TempNPCListTooltipShow();
|
||||
TI_TempNPCListTooltipShow(self);
|
||||
</OnEnter>
|
||||
<OnLeave>
|
||||
TI_TooltipHide();
|
||||
@ -300,7 +300,7 @@
|
||||
TI_DeleteTempNPCIndex(self:GetParent():GetID());
|
||||
</OnClick>
|
||||
<OnEnter>
|
||||
TI_TooltipMessage("Delete");
|
||||
TI_TooltipMessage(self, "Delete");
|
||||
</OnEnter>
|
||||
<OnLeave>
|
||||
TI_TooltipHide();
|
||||
@ -323,7 +323,7 @@
|
||||
TI_AddTempNPCIndex(self:GetParent():GetID());
|
||||
</OnClick>
|
||||
<OnEnter>
|
||||
TI_TooltipMessage("Add this NPC to the database");
|
||||
TI_TooltipMessage(self, "Add this NPC to the database");
|
||||
</OnEnter>
|
||||
<OnLeave>
|
||||
TI_TooltipHide();
|
||||
@ -422,7 +422,7 @@
|
||||
end
|
||||
</OnMouseUp>
|
||||
<OnMouseDown>
|
||||
if ( arg1 == "LeftButton" ) then
|
||||
if ( button == "LeftButton" ) then
|
||||
self:StartMoving();
|
||||
self.isMoving = true;
|
||||
end
|
||||
@ -539,7 +539,7 @@
|
||||
</Size>
|
||||
<Scripts>
|
||||
<OnClick>
|
||||
TI_StatusIndicator_CheckFn();
|
||||
TI_StatusIndicator_CheckFn(self);
|
||||
</OnClick>
|
||||
</Scripts>
|
||||
</CheckButton>
|
||||
@ -601,7 +601,7 @@
|
||||
</Size>
|
||||
<Scripts>
|
||||
<OnClick>
|
||||
TI_SettingCheckboxFn("usedefault");
|
||||
TI_SettingCheckboxFn(self, "usedefault");
|
||||
</OnClick>
|
||||
</Scripts>
|
||||
</CheckButton>
|
||||
@ -621,7 +621,7 @@
|
||||
</Size>
|
||||
<Scripts>
|
||||
<OnClick>
|
||||
TI_SettingCheckboxFn("autoadd");
|
||||
TI_SettingCheckboxFn(self, "autoadd");
|
||||
</OnClick>
|
||||
</Scripts>
|
||||
</CheckButton>
|
||||
@ -987,12 +987,8 @@
|
||||
|
||||
<Frame name="TurnIn" hidden="true" frameStrata="LOW" enableMouse="false">
|
||||
<Scripts>
|
||||
<OnLoad>
|
||||
TI_OnLoad();
|
||||
</OnLoad>
|
||||
<OnEvent>
|
||||
TI_OnEvent(event);
|
||||
</OnEvent>
|
||||
<OnLoad function="TI_OnLoad"/>
|
||||
<OnEvent function="TI_OnEvent"/>
|
||||
</Scripts>
|
||||
</Frame>
|
||||
</Ui>
|
||||
|
||||
62
TurnInUI.lua
62
TurnInUI.lua
@ -118,8 +118,8 @@ function TI_NPCListScrollBarUpdate()
|
||||
end
|
||||
end
|
||||
|
||||
function TI_SelectNPCIndex()
|
||||
local index = this:GetID();
|
||||
function TI_SelectNPCIndex(self)
|
||||
local index = self:GetID();
|
||||
if(TI_LoadedNPCIndex == index) then
|
||||
TI_LoadedNPCIndex = 0;
|
||||
else
|
||||
@ -129,8 +129,8 @@ function TI_SelectNPCIndex()
|
||||
TI_PopulateOptions("select npc");
|
||||
end
|
||||
|
||||
function TI_DeleteNPCIndex()
|
||||
local index = this:GetParent():GetID();
|
||||
function TI_DeleteNPCIndex(self)
|
||||
local index = self:GetParent():GetID();
|
||||
TI_DeleteNPC(index);
|
||||
if(TI_LoadedNPCIndex == index) then
|
||||
TI_LoadedNPCIndex = 0;
|
||||
@ -138,9 +138,9 @@ function TI_DeleteNPCIndex()
|
||||
TI_PopulateOptions("npclist update");
|
||||
end
|
||||
|
||||
function TI_NPCToggle()
|
||||
local index = this:GetParent():GetID();
|
||||
TI_NPCDB[TI_NPCIndex[index]].state = this:GetChecked();
|
||||
function TI_NPCToggle(self)
|
||||
local index = self:GetParent():GetID();
|
||||
TI_NPCDB[TI_NPCIndex[index]].state = self:GetChecked();
|
||||
|
||||
if(TI_NPCDB[TI_NPCIndex[index]].state) then
|
||||
TI_LoadedNPCIndex = index;
|
||||
@ -152,14 +152,14 @@ function TI_NPCToggle()
|
||||
TI_PopulateOptions("select npc");
|
||||
end
|
||||
|
||||
function TI_OptionMove(offset)
|
||||
function TI_OptionMove(self, offset)
|
||||
local CurrOpts;
|
||||
if(TI_LoadedNPCIndex > 0) then
|
||||
CurrOpts = TI_NPCDB[TI_NPCIndex[TI_LoadedNPCIndex]];
|
||||
else
|
||||
CurrOpts = TI_status.options;
|
||||
end
|
||||
local id = this:GetParent():GetID();
|
||||
local id = self:GetParent():GetID();
|
||||
local newid = id + offset;
|
||||
|
||||
if(newid < 1 or newid > table.getn(CurrOpts)) then
|
||||
@ -173,15 +173,15 @@ function TI_OptionMove(offset)
|
||||
TI_PopulateOptions("move");
|
||||
end
|
||||
|
||||
function TI_OptionToggle()
|
||||
function TI_OptionToggle(self)
|
||||
local CurrOpts;
|
||||
if(TI_LoadedNPCIndex > 0) then
|
||||
CurrOpts = TI_NPCDB[TI_NPCIndex[TI_LoadedNPCIndex]];
|
||||
else
|
||||
CurrOpts = TI_status.options;
|
||||
end
|
||||
local id = this:GetParent():GetID();
|
||||
if(this:GetChecked()) then
|
||||
local id = self:GetParent():GetID();
|
||||
if(self:GetChecked()) then
|
||||
CurrOpts[id].state=true;
|
||||
else
|
||||
CurrOpts[id].state=false;
|
||||
@ -202,8 +202,8 @@ function TI_StatusIndicatorUpdate()
|
||||
end
|
||||
|
||||
|
||||
function TI_StatusIndicator_CheckFn()
|
||||
if(this:GetChecked()) then
|
||||
function TI_StatusIndicator_CheckFn(self)
|
||||
if(self:GetChecked()) then
|
||||
TI_Switch("on");
|
||||
else
|
||||
TI_Switch("off");
|
||||
@ -211,10 +211,10 @@ function TI_StatusIndicator_CheckFn()
|
||||
end
|
||||
|
||||
|
||||
function TI_TempNPCListTooltipShow()
|
||||
TI_Tooltip:SetOwner(this, ANCHOR_PRESERVE);
|
||||
function TI_TempNPCListTooltipShow(self)
|
||||
TI_Tooltip:SetOwner(self, ANCHOR_PRESERVE);
|
||||
TI_Tooltip:ClearLines();
|
||||
local id = this:GetID();
|
||||
local id = self:GetID();
|
||||
TI_Tooltip:AddLine(TI_TempNPCList[id].location);
|
||||
for i,v in ipairs(TI_TempNPCList[id].list) do
|
||||
TI_Tooltip:AddLine("- " .. v.name);
|
||||
@ -228,8 +228,8 @@ function TI_TooltipHide()
|
||||
TI_Tooltip:Hide();
|
||||
end
|
||||
|
||||
function TI_TooltipMessage(msg)
|
||||
TI_Tooltip:SetOwner(this, ANCHOR_PRESERVE);
|
||||
function TI_TooltipMessage(self, msg)
|
||||
TI_Tooltip:SetOwner(self, ANCHOR_PRESERVE);
|
||||
TI_Tooltip:ClearLines();
|
||||
TI_Tooltip:SetText(msg);
|
||||
TI_Tooltip:Show();
|
||||
@ -238,34 +238,34 @@ end
|
||||
function TI_TempNPCListUpdate()
|
||||
local last = 1;
|
||||
for i,v in ipairs(TI_TempNPCList) do
|
||||
local tempbuttontext = getglobal("TI_TempNPCListWindow"..i.."_Text");
|
||||
local tempbuttontext = _G["TI_TempNPCListWindow"..i.."_Text"];
|
||||
tempbuttontext:SetText(v.name);
|
||||
tempbuttontext:GetParent():Show();
|
||||
last = last+1;
|
||||
end
|
||||
for j=last, TI_TempNPCListMaxSize, 1 do
|
||||
getglobal("TI_TempNPCListWindow" .. j):Hide();
|
||||
_G["TI_TempNPCListWindow" .. j]:Hide();
|
||||
end
|
||||
end
|
||||
|
||||
function TI_NPCListCheckboxTooltip()
|
||||
if(this:GetChecked()) then
|
||||
TI_TooltipMessage("NPC is using specific settings.");
|
||||
function TI_NPCListCheckboxTooltip(self)
|
||||
if(self:GetChecked()) then
|
||||
TI_TooltipMessage(self, "NPC is using specific settings.");
|
||||
else
|
||||
TI_TooltipMessage("NPC is using default settings.");
|
||||
TI_TooltipMessage(self, "NPC is using default settings.");
|
||||
end
|
||||
end
|
||||
|
||||
function TI_OptionListCheckboxTooltip()
|
||||
if(this:GetChecked()) then
|
||||
TI_TooltipMessage("This option is enabled.");
|
||||
function TI_OptionListCheckboxTooltip(self)
|
||||
if(self:GetChecked()) then
|
||||
TI_TooltipMessage(self, "This option is enabled.");
|
||||
else
|
||||
TI_TooltipMessage("This option is disabled.");
|
||||
TI_TooltipMessage(self, "This option is disabled.");
|
||||
end
|
||||
end
|
||||
|
||||
function TI_SettingCheckboxFn(var)
|
||||
if(this:GetChecked()) then
|
||||
function TI_SettingCheckboxFn(self, var)
|
||||
if(self:GetChecked()) then
|
||||
TI_status[var] = true;
|
||||
else
|
||||
TI_status[var] = false;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user