/
if tonumber(WoWISVNRevision) then |
vLabel:SetFormattedText("Torta v%s.%s (|cffffff00Beta|r)", version, WoWISVNRevision); |
else |
vLabel:SetFormattedText("Checklist Project Version %s WoWInterface SVN Working Copy (|cffff0000unstable alpha|r)", version); |
vLabel:SetFormattedText("Checklist Project Version %s WoWInterface SVN Working Copy (|cffffff00beta|r)", version); |
end |
vLabel:SetJustifyH("LEFT"); |
vLabel:SetAlpha(0.7); |
local addTaskButton = TortaParentFrameMainPageTaskbarAddTaskButton; |
local removeTaskButton = TortaParentFrameMainPageTaskbarRemoveTaskButton; |
local explorerNoListsText = TortaParentFrameMainPageExplorerSubWindowNoListsText; |
local statsButton = TortaParentFrameMainPageTaskbarStatsButton; |
local EXPLORER_LISTBUTTON_HEIGHT = 16; |
local Torta = Torta; |
noLoadedListText:SetText("You currently do not have a list loaded. You can either select a list in Turtle Explorer or create a new one by clicking the Manage button."); |
noLoadedListText:SetText("|cffffd000Torta Checklist has no list loaded.|r\nYou currently do not have a list loaded. You can either select a list in Turtle Explorer or create a new one by right-clicking inside Turtle Explorer."); |
noTasksText:SetText("The currently loaded list does not appear to have any tasks in it. You can create new tasks for this list by clicking the \"Add A Task\" button below."); |
noTasksText:SetText("|cffffd000Woah, no tasks!|r\nThe currently loaded list does not appear to have any tasks in it. You can create new tasks for this list by clicking the \"Add A Task\" button below."); |
-- Explorer subwindow stuff |
Torta.gui.exRecycleBin = {}; |
e.addTaskButton = addTaskButton; |
e.removeTaskButton = removeTaskButton; |
e.explorerNoListsText = explorerNoListsText; |
e.statsButton = statsButton; |
e = nil; |
---------------------------------------------------------------------------------------- |
function Torta.gui.scalingFinishedFunc(frame) |
self.clListButtons[line]:Hide(); |
end |
end |
Torta.cl3:UpdateStats(); |
end |
Torta.cl3:RenameList(Torta.gui.selectedExplorerButton:GetID(), newName); |
editBox:GetParent():Hide(); |
end, |
EditBoxOnEscapePressed = function(self) |
self:GetParent():Hide(); |
end, |
button1 = ACCEPT, |
button2 = CANCEL, |
whileDead = 1, |
</Anchors> |
<!-- TASKBAR BUTTONS --> |
<Frames> |
<!-- |
<Button name="$parentManageButton" inherits="UIPanelButtonTemplate" text="Manage"> |
<Size x="100" y="22"/> |
<Anchors> |
<Button name="$parentShareButton" inherits="UIPanelButtonTemplate" text="Share Stuff!"> |
<Size x="100" y="22"/> |
<Anchors> |
<Anchor point="LEFT" relativeTo="$parentManageButton" relativePoint="RIGHT"/> |
<Anchor point="LEFT"> |
<Offset x="3"/> |
</Anchor> |
</Anchors> |
</Button> |
--> |
<Button name="$parentUncheckAllButton" inherits="UIPanelButtonTemplate" text="Uncheck All"> |
<Size x="100" y="22"/> |
<Anchors> |
<Anchor point="LEFT" relativeTo="$parentShareButton" relativePoint="RIGHT"> |
<Offset x="5"/> |
<Anchor point="LEFT"> |
<Offset x="3"/> |
</Anchor> |
</Anchors> |
<Scripts> |
</Button> |
<Frame name="$parentResizeAreaBottomRight" enableMouse="true"> |
<Size x="16" y="16"/> |
<Size x="20" y="20"/> |
<Anchors> |
<Anchor point="BOTTOMRIGHT"> |
<Offset x="-4" y="4"/> |
<Offset x="0" y="0"/> |
</Anchor> |
</Anchors> |
<Scripts> |
Torta.gui:CheckCLButtons(); |
Torta.gui:CheckExplorerWindow(); |
</OnMouseUp> |
<OnEnter> |
GameTooltip:SetOwner(self, "ANCHOR_CURSOR"); |
GameTooltip:AddLine("Drag here to resize the Torta window."); |
GameTooltip:Show(); |
</OnEnter> |
<OnLeave> |
GameTooltip:Hide(); |
</OnLeave> |
</Scripts> |
<Layers> |
<Layer level="ARTWORK"> |
<Texture setAllPoints="true"> |
<Color g="1"/> |
</Texture> |
</Layer> |
</Layers> |
</Frame> |
<Frame name="$parentResizeAreaBottomLeft" enableMouse="true"> |
<Size x="20" y="20"/> |
<Anchors> |
<Anchor point="BOTTOMLEFT"/> |
</Anchors> |
<Scripts> |
<OnMouseDown> |
if button == "LeftButton" then |
self:GetParent():StartSizing("BOTTOMLEFT"); |
self:GetParent().isSizing = true; |
end |
</OnMouseDown> |
<OnMouseUp> |
local parentWindow = self:GetParent(); |
parentWindow:StopMovingOrSizing(); |
parentWindow.isSizing = false; |
Torta.gui:CheckCLButtons(); |
Torta.gui:CheckExplorerWindow(); |
</OnMouseUp> |
<OnEnter> |
GameTooltip:SetOwner(self, "ANCHOR_CURSOR"); |
GameTooltip:AddLine("Drag here to resize the Torta window."); |
GameTooltip:Show(); |
</OnEnter> |
<OnLeave> |
GameTooltip:Hide(); |
</OnLeave> |
</Scripts> |
</Frame> |
<!-- |
<Frame name="$parentResizeAreaBottom" enableMouse="true"> |
<Size x="20" y="20"/> |
<Anchors> |
<Anchor point="LEFT" relativeTo="$parentResizeAreaBottomLeft" relativePoint="RIGHT"/> |
<Anchor point="RIGHT" relativeTo="$parentResizeAreaBottomRight" relativePoint="LEFT"/> |
</Anchors> |
<Scripts> |
<OnMouseDown> |
if button == "LeftButton" then |
self:GetParent():StartSizing("BOTTOM"); |
self:GetParent().isSizing = true; |
end |
</OnMouseDown> |
<OnMouseUp> |
local parentWindow = self:GetParent(); |
parentWindow:StopMovingOrSizing(); |
parentWindow.isSizing = false; |
Torta.gui:CheckCLButtons(); |
Torta.gui:CheckExplorerWindow(); |
</OnMouseUp> |
<OnEnter> |
GameTooltip:SetOwner(self, "ANCHOR_CURSOR"); |
GameTooltip:AddLine("Drag here to resize the Torta window."); |
GameTooltip:Show(); |
</OnEnter> |
<OnLeave> |
GameTooltip:Hide(); |
</OnLeave> |
</Scripts> |
</Frame> |
--> |
<!-- TABS --> |
<Button name="$parentTab1" inherits="TortaTabTemplate" text="Start Page" id="1"> |
end |
function Checklist3:GetList(listID) |
return Torta.db.profile.lists[listID]; |
end |
function Checklist3:ListLoadedCheck() |
if not self:GetLoadedList() then |
widgets.checkAllButton:Disable(); |
print(listID, newName); |
if not (type(newName) == "string") then |
print(":D"); |
StaticPopup_Show("TORTA_CLRENAMELIST", Torta.db.profile.lists[listID].meta.listName); |
local listName = self:GetList(listID).meta.listName |
local dialog = StaticPopup_Show("TORTA_CLRENAMELIST", listName); |
getglobal(dialog:GetName() .. "EditBox"):SetText(listName); |
else |
Torta.db.profile.lists[listID].meta.listName = newName; |
gui:UpdateExplorerScrollBar(); |
function Checklist3:RestoreList() |
end |
function Checklist3:UpdateStats() |
local checked, total, percent = 0, 0, 0; |
local list = self:GetLoadedList(); |
if list then |
total = #list.stat; |
if total == 0 then |
widgets.statsButton:SetText(""); |
return; |
end |
for i = 1, total do |
if list.stat[i] then |
checked = checked + 1; |
end |
end |
percent = format("%.1f", (checked / total) * 100); |
-- Fix this sometime. |
-- widgets.statsButton:SetFormattedText("Tasks: %d/%d (%s(%))", checked, total, percent); |
widgets.statsButton:SetText("Tasks: " .. checked .. "/" .. total .. " (" .. percent .. "%)"); |
else |
widgets.statsButton:SetText(""); |
end |
end |