|
|
|
@@ -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; |