Compare commits
No commits in common. "d269a249679f162dc6462961560742369fb7e1d3" and "5c4bf53d175973cba084168c33212f1e935188f5" have entirely different histories.
d269a24967
...
5c4bf53d17
22
TurnIn.lua
22
TurnIn.lua
@ -482,11 +482,7 @@ function TI_HandleGossipWindow(gorq)
|
|||||||
local x={};
|
local x={};
|
||||||
x.name = v.name;
|
x.name = v.name;
|
||||||
x.gorq = gorq;
|
x.gorq = gorq;
|
||||||
if x.orderIndex then
|
|
||||||
x.args = v.orderIndex;
|
|
||||||
else
|
|
||||||
x.args = i;
|
x.args = i;
|
||||||
end
|
|
||||||
x.type = v.type;
|
x.type = v.type;
|
||||||
x.icon = v.icon;
|
x.icon = v.icon;
|
||||||
x.state = false;
|
x.state = false;
|
||||||
@ -712,7 +708,7 @@ end
|
|||||||
|
|
||||||
function TI_TabulateGossipUIInfo_Retail(guis)
|
function TI_TabulateGossipUIInfo_Retail(guis)
|
||||||
local x = {};
|
local x = {};
|
||||||
table.sort(guis, GossipOptionSort);
|
|
||||||
for i,gui in ipairs(guis) do
|
for i,gui in ipairs(guis) do
|
||||||
local temp = {};
|
local temp = {};
|
||||||
temp.name = gui.name;
|
temp.name = gui.name;
|
||||||
@ -807,15 +803,15 @@ if (TI_IsRetail()) then
|
|||||||
else
|
else
|
||||||
TI_FunctionList = {
|
TI_FunctionList = {
|
||||||
g = {
|
g = {
|
||||||
availquest = C_GossipInfo.SelectAvailableQuest,
|
availquest = SelectGossipAvailableQuest,
|
||||||
activequest = C_GossipInfo.SelectActiveQuest,
|
activequest = SelectGossipActiveQuest,
|
||||||
gossip = SelectGossipOption,
|
gossip = SelectGossipOption,
|
||||||
getavailquests = C_GossipInfo.GetAvailableQuests,
|
getavailquests = GetGossipAvailableQuests,
|
||||||
getactivequests = C_GossipInfo.GetActiveQuests,
|
getactivequests = GetGossipActiveQuests,
|
||||||
getoptions = C_GossipInfo.GetOptions,
|
getoptions = GetGossipOptions,
|
||||||
tabulateAvailable = TI_TabulateGossipQuestUIInfo_Retail,
|
tabulateAvailable = TI_TabulateGossipAvailableQuests_Classic,
|
||||||
tabulateActive = TI_TabulateGossipQuestUIInfo_Retail,
|
tabulateActive = TI_TabulateGossipActiveQuests_Classic,
|
||||||
tabulateOptions = TI_TabulateGossipUIInfo_Retail,
|
tabulateOptions = TI_TabulateGossipOptions_Classic,
|
||||||
},
|
},
|
||||||
q = {
|
q = {
|
||||||
activequest = SelectActiveQuest,
|
activequest = SelectActiveQuest,
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
## Interface: 100005
|
## Interface: 100000
|
||||||
## X-Compatible-With: 100005
|
## X-Compatible-With: 100000
|
||||||
## Title: Turn In
|
## Title: Turn In
|
||||||
## Notes: Automates the selection of quest and gossip options.
|
## Notes: Automates the selection of quest and gossip options.
|
||||||
## SavedVariables: TI_status, TI_NPCDB, TI_NPCIndex
|
## SavedVariables: TI_status, TI_NPCDB, TI_NPCIndex
|
||||||
|
|||||||
161
TurnIn.xml
161
TurnIn.xml
@ -684,6 +684,167 @@
|
|||||||
<Size>
|
<Size>
|
||||||
<AbsDimension x="200" y="30"/>
|
<AbsDimension x="200" y="30"/>
|
||||||
</Size>
|
</Size>
|
||||||
|
|
||||||
|
<!--<Layers>
|
||||||
|
<Layer level="OVERLAY">
|
||||||
|
<FontString name="$parentText" justifyV="top" justifyH="left" inherits="GameFontNormal" text="Gossip Options">
|
||||||
|
<Anchors>
|
||||||
|
<Anchor point="TOPLEFT" />
|
||||||
|
</Anchors>
|
||||||
|
</FontString>
|
||||||
|
</Layer>
|
||||||
|
<Layer level="BACKGROUND">
|
||||||
|
<Texture name="$parent_Background" setAllPoints="true">
|
||||||
|
<Color r="0" g="1" b="0" a="0.0"/>
|
||||||
|
</Texture>
|
||||||
|
</Layer>
|
||||||
|
</Layers>-->
|
||||||
|
<Frames>
|
||||||
|
<Button name="$parent1" id="1" hidden="true" inherits="TI_PriorityList">
|
||||||
|
<Anchors>
|
||||||
|
<Anchor point="TOPLEFT">
|
||||||
|
<Offset>
|
||||||
|
<AbsDimension x="0" y="0" />
|
||||||
|
</Offset>
|
||||||
|
</Anchor>
|
||||||
|
</Anchors>
|
||||||
|
</Button>
|
||||||
|
<Button name="$parent2" id="2" hidden="true" inherits="TI_PriorityList">
|
||||||
|
<Anchors>
|
||||||
|
<Anchor point="TOPLEFT" relativePoint="BOTTOMLEFT" relativeTo="$parent1">
|
||||||
|
<Offset>
|
||||||
|
<AbsDimension x="0" y="0" />
|
||||||
|
</Offset>
|
||||||
|
</Anchor>
|
||||||
|
</Anchors>
|
||||||
|
</Button>
|
||||||
|
<Button name="$parent3" id="3" hidden="true" inherits="TI_PriorityList">
|
||||||
|
<Anchors>
|
||||||
|
<Anchor point="TOPLEFT" relativePoint="BOTTOMLEFT" relativeTo="$parent2">
|
||||||
|
<Offset>
|
||||||
|
<AbsDimension x="0" y="0" />
|
||||||
|
</Offset>
|
||||||
|
</Anchor>
|
||||||
|
</Anchors>
|
||||||
|
</Button>
|
||||||
|
<Button name="$parent4" id="4" hidden="true" inherits="TI_PriorityList">
|
||||||
|
<Anchors>
|
||||||
|
<Anchor point="TOPLEFT" relativePoint="BOTTOMLEFT" relativeTo="$parent3">
|
||||||
|
<Offset>
|
||||||
|
<AbsDimension x="0" y="0" />
|
||||||
|
</Offset>
|
||||||
|
</Anchor>
|
||||||
|
</Anchors>
|
||||||
|
</Button>
|
||||||
|
<Button name="$parent5" id="5" hidden="true" inherits="TI_PriorityList">
|
||||||
|
<Anchors>
|
||||||
|
<Anchor point="TOPLEFT" relativePoint="BOTTOMLEFT" relativeTo="$parent4">
|
||||||
|
<Offset>
|
||||||
|
<AbsDimension x="0" y="0" />
|
||||||
|
</Offset>
|
||||||
|
</Anchor>
|
||||||
|
</Anchors>
|
||||||
|
</Button>
|
||||||
|
<Button name="$parent6" id="6" hidden="true" inherits="TI_PriorityList">
|
||||||
|
<Anchors>
|
||||||
|
<Anchor point="TOPLEFT" relativePoint="BOTTOMLEFT" relativeTo="$parent5">
|
||||||
|
<Offset>
|
||||||
|
<AbsDimension x="0" y="0" />
|
||||||
|
</Offset>
|
||||||
|
</Anchor>
|
||||||
|
</Anchors>
|
||||||
|
</Button>
|
||||||
|
<Button name="$parent7" id="7" hidden="true" inherits="TI_PriorityList">
|
||||||
|
<Anchors>
|
||||||
|
<Anchor point="TOPLEFT" relativePoint="BOTTOMLEFT" relativeTo="$parent6">
|
||||||
|
<Offset>
|
||||||
|
<AbsDimension x="0" y="0" />
|
||||||
|
</Offset>
|
||||||
|
</Anchor>
|
||||||
|
</Anchors>
|
||||||
|
</Button>
|
||||||
|
<Button name="$parent8" id="8" hidden="true" inherits="TI_PriorityList">
|
||||||
|
<Anchors>
|
||||||
|
<Anchor point="TOPLEFT" relativePoint="BOTTOMLEFT" relativeTo="$parent7">
|
||||||
|
<Offset>
|
||||||
|
<AbsDimension x="0" y="0" />
|
||||||
|
</Offset>
|
||||||
|
</Anchor>
|
||||||
|
</Anchors>
|
||||||
|
</Button>
|
||||||
|
<Button name="$parent9" id="9" hidden="true" inherits="TI_PriorityList">
|
||||||
|
<Anchors>
|
||||||
|
<Anchor point="TOPLEFT" relativePoint="BOTTOMLEFT" relativeTo="$parent8">
|
||||||
|
<Offset>
|
||||||
|
<AbsDimension x="0" y="0" />
|
||||||
|
</Offset>
|
||||||
|
</Anchor>
|
||||||
|
</Anchors>
|
||||||
|
</Button>
|
||||||
|
<Button name="$parent10" id="10" hidden="true" inherits="TI_PriorityList">
|
||||||
|
<Anchors>
|
||||||
|
<Anchor point="TOPLEFT" relativePoint="BOTTOMLEFT" relativeTo="$parent9">
|
||||||
|
<Offset>
|
||||||
|
<AbsDimension x="0" y="0" />
|
||||||
|
</Offset>
|
||||||
|
</Anchor>
|
||||||
|
</Anchors>
|
||||||
|
</Button>
|
||||||
|
<Button name="$parent11" id="11" hidden="true" inherits="TI_PriorityList">
|
||||||
|
<Anchors>
|
||||||
|
<Anchor point="TOPLEFT" relativePoint="BOTTOMLEFT" relativeTo="$parent10">
|
||||||
|
<Offset>
|
||||||
|
<AbsDimension x="0" y="0" />
|
||||||
|
</Offset>
|
||||||
|
</Anchor>
|
||||||
|
</Anchors>
|
||||||
|
</Button>
|
||||||
|
<Button name="$parent12" id="12" hidden="true" inherits="TI_PriorityList">
|
||||||
|
<Anchors>
|
||||||
|
<Anchor point="TOPLEFT" relativePoint="BOTTOMLEFT" relativeTo="$parent11">
|
||||||
|
<Offset>
|
||||||
|
<AbsDimension x="0" y="0" />
|
||||||
|
</Offset>
|
||||||
|
</Anchor>
|
||||||
|
</Anchors>
|
||||||
|
</Button>
|
||||||
|
<Button name="$parent13" id="13" hidden="true" inherits="TI_PriorityList">
|
||||||
|
<Anchors>
|
||||||
|
<Anchor point="TOPLEFT" relativePoint="BOTTOMLEFT" relativeTo="$parent12">
|
||||||
|
<Offset>
|
||||||
|
<AbsDimension x="0" y="0" />
|
||||||
|
</Offset>
|
||||||
|
</Anchor>
|
||||||
|
</Anchors>
|
||||||
|
</Button>
|
||||||
|
<Button name="$parent14" id="14" hidden="true" inherits="TI_PriorityList">
|
||||||
|
<Anchors>
|
||||||
|
<Anchor point="TOPLEFT" relativePoint="BOTTOMLEFT" relativeTo="$parent13">
|
||||||
|
<Offset>
|
||||||
|
<AbsDimension x="0" y="0" />
|
||||||
|
</Offset>
|
||||||
|
</Anchor>
|
||||||
|
</Anchors>
|
||||||
|
</Button>
|
||||||
|
<Button name="$parent15" id="15" hidden="true" inherits="TI_PriorityList">
|
||||||
|
<Anchors>
|
||||||
|
<Anchor point="TOPLEFT" relativePoint="BOTTOMLEFT" relativeTo="$parent14">
|
||||||
|
<Offset>
|
||||||
|
<AbsDimension x="0" y="0" />
|
||||||
|
</Offset>
|
||||||
|
</Anchor>
|
||||||
|
</Anchors>
|
||||||
|
</Button>
|
||||||
|
<Button name="$parent16" id="16" hidden="true" inherits="TI_PriorityList">
|
||||||
|
<Anchors>
|
||||||
|
<Anchor point="TOPLEFT" relativePoint="BOTTOMLEFT" relativeTo="$parent15">
|
||||||
|
<Offset>
|
||||||
|
<AbsDimension x="0" y="0" />
|
||||||
|
</Offset>
|
||||||
|
</Anchor>
|
||||||
|
</Anchors>
|
||||||
|
</Button>
|
||||||
|
</Frames>
|
||||||
</Frame>
|
</Frame>
|
||||||
</ScrollChild>
|
</ScrollChild>
|
||||||
</ScrollFrame>
|
</ScrollFrame>
|
||||||
|
|||||||
80
TurnInUI.lua
80
TurnInUI.lua
@ -1,30 +1,3 @@
|
|||||||
local TI_OptionsPriorityFramePool = {};
|
|
||||||
local TI_OptionsPriorityFramePoolMax = 0;
|
|
||||||
|
|
||||||
local function TI_GetOptionsPriorityFrame(idx)
|
|
||||||
if idx > TI_OptionsPriorityFramePoolMax then
|
|
||||||
for i=TI_OptionsPriorityFramePoolMax+1, idx, 1 do
|
|
||||||
local frame = CreateFrame("Button", "TI_OptionsPriority"..i,
|
|
||||||
getglobal("TI_OptionsPriority"), "TI_PriorityList", i);
|
|
||||||
if i == 1 then
|
|
||||||
frame:SetPoint("TOPLEFT", 0, 0);
|
|
||||||
else
|
|
||||||
frame:SetPoint("TOPLEFT", "TI_OptionsPriority"..i-1, "BOTTOMLEFT", 0, 0);
|
|
||||||
end
|
|
||||||
frame:Hide();
|
|
||||||
table.insert(TI_OptionsPriorityFramePool, i, frame);
|
|
||||||
TI_OptionsPriorityFramePoolMax = TI_OptionsPriorityFramePoolMax + 1;
|
|
||||||
end
|
|
||||||
end
|
|
||||||
return TI_OptionsPriorityFramePool[idx];
|
|
||||||
end
|
|
||||||
|
|
||||||
local function TI_HideUnusedOptionFrames(last)
|
|
||||||
for i=last, TI_OptionsPriorityFramePoolMax, 1 do
|
|
||||||
TI_OptionsPriorityFramePool[i]:Hide();
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
function TI_PopulateOptions(arg)
|
function TI_PopulateOptions(arg)
|
||||||
TI_debug(arg);
|
TI_debug(arg);
|
||||||
local CurrOpts;
|
local CurrOpts;
|
||||||
@ -37,9 +10,9 @@ function TI_PopulateOptions(arg)
|
|||||||
end
|
end
|
||||||
|
|
||||||
for i,v in ipairs(CurrOpts) do
|
for i,v in ipairs(CurrOpts) do
|
||||||
local entrybutton = TI_GetOptionsPriorityFrame(i);
|
local entry = "TI_OptionsPriority" .. i;
|
||||||
local icon, entrytext = entrybutton:GetRegions();
|
local entrybutton = getglobal(entry);
|
||||||
local checkbox = entrybutton:GetChildren();
|
local entrytext = getglobal("TI_OptionsPriority"..i.."_Text");
|
||||||
local iconpath;
|
local iconpath;
|
||||||
if(v.name == nil) then TI_debug("oh noes") end;
|
if(v.name == nil) then TI_debug("oh noes") end;
|
||||||
entrytext:SetText(v.name);
|
entrytext:SetText(v.name);
|
||||||
@ -62,15 +35,16 @@ function TI_PopulateOptions(arg)
|
|||||||
iconpath = "Interface/GossipFrame/" .. v.type .. "GossipIcon";
|
iconpath = "Interface/GossipFrame/" .. v.type .. "GossipIcon";
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
icon:SetTexture(iconpath);
|
getglobal(entry .. "_Icon"):SetTexture(iconpath);
|
||||||
checkbox:SetChecked(v.state);
|
getglobal(entry .. "_Check"):SetChecked(v.state);
|
||||||
entrytext:SetWidth(156); --make sure to change this if you change the anchors in the XML
|
entrytext:SetWidth(156); --make sure to change this if you change the anchors in the XML
|
||||||
entrybutton:SetHeight( entrytext:GetHeight() + 6);
|
entrybutton:SetHeight( entrytext:GetHeight() + 6);
|
||||||
entrybutton:Show();
|
entrybutton:Show();
|
||||||
last = last+1;
|
last = last+1;
|
||||||
end
|
end
|
||||||
TI_HideUnusedOptionFrames(last);
|
for j=last, 16, 1 do
|
||||||
|
getglobal("TI_OptionsPriority" .. j):Hide();
|
||||||
|
end
|
||||||
TI_OptionsPriorityScrollFrame:SetVerticalScroll(0);
|
TI_OptionsPriorityScrollFrame:SetVerticalScroll(0);
|
||||||
TI_OptionsPriorityScrollFrame:UpdateScrollChildRect();
|
TI_OptionsPriorityScrollFrame:UpdateScrollChildRect();
|
||||||
TI_StatusIndicatorUpdate();
|
TI_StatusIndicatorUpdate();
|
||||||
@ -79,6 +53,31 @@ function TI_PopulateOptions(arg)
|
|||||||
TI_SettingCheckboxUpdate();
|
TI_SettingCheckboxUpdate();
|
||||||
end
|
end
|
||||||
|
|
||||||
|
--[[
|
||||||
|
function TI_PopulateOptions(arg)
|
||||||
|
TI_debug(arg);
|
||||||
|
if(TI_status and TI_status.options) then
|
||||||
|
for i,v in ipairs(TI_status.options) do
|
||||||
|
local entry = "TI_OptionsPriority" .. i;
|
||||||
|
local iconpath;
|
||||||
|
if(v.name == nil) then TI_debug("oh noes") end;
|
||||||
|
if(getglobal(entry .. "_Text") == nil) then TI_debug("wtf "..entry .. "_Text") end;
|
||||||
|
getglobal(entry .. "_Text"):SetText(v.name);
|
||||||
|
if(v.type == "activequest") then
|
||||||
|
iconpath = "Interface\\GossipFrame\\ActiveQuestIcon";
|
||||||
|
elseif(v.type == "availquest") then
|
||||||
|
iconpath = "Interface\\GossipFrame\\AvailableQuestIcon";
|
||||||
|
else
|
||||||
|
iconpath = "Interface\\GossipFrame\\" .. v.type .. "GossipIcon";
|
||||||
|
end
|
||||||
|
getglobal(entry .. "_Icon"):SetTexture(iconpath);
|
||||||
|
getglobal(entry .. "_Check"):SetChecked(v.state);
|
||||||
|
getglobal(entry):Show();
|
||||||
|
end
|
||||||
|
end
|
||||||
|
TI_NPCListScrollBarUpdate();
|
||||||
|
end
|
||||||
|
]]--
|
||||||
|
|
||||||
function TI_NPCListScrollBarUpdate()
|
function TI_NPCListScrollBarUpdate()
|
||||||
if(TI_NPCIndex) then
|
if(TI_NPCIndex) then
|
||||||
@ -90,6 +89,19 @@ function TI_NPCListScrollBarUpdate()
|
|||||||
local offset = FauxScrollFrame_GetOffset(TI_NPCListScrollFrame);
|
local offset = FauxScrollFrame_GetOffset(TI_NPCListScrollFrame);
|
||||||
local i=1;
|
local i=1;
|
||||||
local j=1;
|
local j=1;
|
||||||
|
--~ for k, v in pairs(TI_NPCDB) do
|
||||||
|
--~ if(offset <= i and i < offset+8) then
|
||||||
|
--~ if(i <= table.getn(TI_NPCDB)) then
|
||||||
|
--~ getglobal("TI_OptionsNPCContainer"..j.."_Text"):SetText(k);
|
||||||
|
--~ getglobal("TI_OptionsNPCContainer"..j.."_Check"):SetChecked(v.state);
|
||||||
|
--~ getglobal("TI_OptionsNPCContainer"..j):Show();
|
||||||
|
--~ else
|
||||||
|
--~ getglobal("TI_OptionsNPCContainer"..j):Hide();
|
||||||
|
--~ end
|
||||||
|
--~ j = j + 1;
|
||||||
|
--~ end
|
||||||
|
--~ i = i + 1;
|
||||||
|
--~ end
|
||||||
|
|
||||||
for line=1,8 do
|
for line=1,8 do
|
||||||
lineplusoffset = line + FauxScrollFrame_GetOffset(TI_NPCListScrollFrame);
|
lineplusoffset = line + FauxScrollFrame_GetOffset(TI_NPCListScrollFrame);
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
## Interface: 30401
|
## Interface: 30400
|
||||||
## X-Compatible-With: 30401
|
## X-Compatible-With: 30400
|
||||||
## Title: Turn In
|
## Title: Turn In
|
||||||
## Notes: Automates the selection of quest and gossip options.
|
## Notes: Automates the selection of quest and gossip options.
|
||||||
## SavedVariables: TI_status, TI_NPCDB, TI_NPCIndex
|
## SavedVariables: TI_status, TI_NPCDB, TI_NPCIndex
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user