WoWInterface SVN Torta

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /
    from Rev 33 to Rev 34
    Reverse comparison

Rev 33 → Rev 34

trunk/Torta/Windows/DisplayWindow.xml
1,9 → 1,9
<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/
..\FrameXML\UI.xsd">
<Frame name="$parentDisplaySubWindow" inherits="TortaSubWindowTemplate" parent="TortaParentFrameMainPage">
<Frame name="$parentCLDisplaySubWindow" inherits="TortaSubWindowTemplate" parent="TortaParentFrameMainPage">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="$parentExplorerSubWindow" relativePoint="TOPRIGHT"/>
<Anchor point="BOTTOMRIGHT" relativeTo="$parentTaskbar" relativePoint="TOPRIGHT"/>
<Anchor point="BOTTOMRIGHT" relativeTo="$parentNBTaskbar" relativePoint="TOPRIGHT"/>
</Anchors>
<Layers>
<Layer level="ARTWORK">
90,7 → 90,7
<Frame name="$parentTaskEditorSubWindow" inherits="TortaSubWindowTemplate" parent="TortaParentFrameMainPage" hidden="false">
<Anchors>
<Anchor point="BOTTOMLEFT" relativeTo="$parentExplorerSubWindow" relativePoint="BOTTOMRIGHT"/>
<Anchor point="TOPRIGHT" relativeTo="$parentTaskbar" relativePoint="BOTTOMRIGHT">
<Anchor point="TOPRIGHT" relativeTo="$parentCLTaskbar" relativePoint="BOTTOMRIGHT">
<Offset y="150"/>
</Anchor>
</Anchors>
223,4 → 223,33
</ScrollFrame>
</Frames>
</Frame>
 
<Frame name="$parentNBDisplaySubWindow" inherits="TortaSubWindowTemplate" parent="TortaParentFrameMainPage">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="$parentExplorerSubWindow" relativePoint="TOPRIGHT"/>
<Anchor point="BOTTOMRIGHT" relativeTo="$parentNBTaskbar" relativePoint="TOPRIGHT"/>
</Anchors>
<Layers>
<Layer level="ARTWORK">
<FontString name="$parentHeaderText" inherits="GameFontNormal" text="Torta Notebook">
<Anchors>
<Anchor point="LEFT" relativeTo="$parentHeaderTexture"/>
<Anchor point="RIGHT" relativeTo="$parentHeaderTexture"/>
</Anchors>
</FontString>
<FontString name="$parentNYIText" inherits="GameFontHighlight" text="Torta Notebook is not yet implemented and is still (quite literally :P) on the to-do list. Development of Torta Checklist is currently a higher priority. Sorry!">
<Anchors>
<Anchor point="LEFT">
<Offset x="30"/>
</Anchor>
<Anchor point="RIGHT">
<Offset x="-30"/>
</Anchor>
<Anchor point="TOP"/>
<Anchor point="BOTTOM"/>
</Anchors>
</FontString>
</Layer>
</Layers>
</Frame>
</Ui>
\ No newline at end of file
trunk/Torta/Windows/Templates.xml
86,6 → 86,13
</OnClick>
<OnLoad>
self:RegisterForClicks("LeftButtonDown", "RightButtonDown");
local fs = self:CreateFontString(nil, "ARTWORK", "GameFontHighlight");
fs:SetPoint("LEFT", self, "LEFT", 5);
fs:SetPoint("RIGHT", self, "RIGHT", -5);
fs:SetText("Hello, World!");
fs:SetJustifyH("LEFT");
fs:SetJustifyV("TOP");
self.text = fs;
</OnLoad>
</Scripts>
</Button>
trunk/Torta/Windows/Explorer.xml
5,19 → 5,19
<Anchor point="TOPLEFT">
<Offset y="-2"/>
</Anchor>
<Anchor point="BOTTOMRIGHT" relativeTo="$parentTaskbar" relativePoint="TOPLEFT">
<Offset x="205" y="0"/>
<Anchor point="BOTTOMRIGHT" relativeTo="$parentCLTaskbar" relativePoint="TOPLEFT">
<Offset x="225" y="0"/>
</Anchor>
</Anchors>
<Layers>
<Layer level="ARTWORK">
<FontString name="$parentHeaderText" inherits="GameFontNormal" text="Turtle Explorer">
<FontString name="$parentHeaderText" inherits="GameFontNormal" text="Tortoise Explorer">
<Anchors>
<Anchor point="LEFT" relativeTo="$parentHeaderTexture"/>
<Anchor point="RIGHT" relativeTo="$parentHeaderTexture"/>
</Anchors>
</FontString>
<FontString name="$parentNoListsText" inherits="GameFontHighlight" text="You do not appear to have any lists. Right-click here to open up a context menu to create one.">
<FontString name="$parentNoListsText" hidden="true" inherits="GameFontHighlight" text="You do not appear to have any lists. Right-click here to open up a context menu to create one.">
<Anchors>
<Anchor point="LEFT">
<Offset x="5"/>
29,6 → 29,18
<Anchor point="BOTTOM"/>
</Anchors>
</FontString>
<FontString name="$parentNoNotebooksText" hidden="true" inherits="GameFontHighlight" text="No notebooks were found in Torta's database. You can right-click here to open a context menu to create one.">
<Anchors>
<Anchor point="LEFT">
<Offset x="5"/>
</Anchor>
<Anchor point="RIGHT">
<Offset x="-5"/>
</Anchor>
<Anchor point="TOP"/>
<Anchor point="BOTTOM"/>
</Anchors>
</FontString>
</Layer>
</Layers>
<Frames>
77,7 → 89,11
</OnUpdate>
<OnMouseDown>
if button == "RightButton" then
Torta.gui:clShowExplorerDropdownMenu()
if Torta.gui.tab == 2 then
Torta.gui:clShowExplorerDropdownMenu()
else
-- open the Notebook dropdown menu here
end
end
</OnMouseDown>
</Scripts>
trunk/Torta/Windows/Taskbar.xml
1,6 → 1,6
<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/
..\FrameXML\UI.xsd">
<Frame name="$parentTaskbar" inherits="TortaTooltipStyleFrameTemplate" parent="TortaParentFrameMainPage">
<Frame name="$parentCLTaskbar" inherits="TortaTooltipStyleFrameTemplate" parent="TortaParentFrameMainPage">
<Anchors>
<Anchor point="BOTTOMLEFT">
<Offset y="5"/>
113,4 → 113,15
</Frames>
<!-- END OF TASKBAR BUTTONS -->
</Frame>
 
<Frame name="$parentNBTaskbar" inherits="TortaTooltipStyleFrameTemplate" parent="TortaParentFrameMainPage">
<Anchors>
<Anchor point="BOTTOMLEFT">
<Offset y="5"/>
</Anchor>
<Anchor point="TOPRIGHT" relativePoint="BOTTOMRIGHT">
<Offset y="35"/>
</Anchor>
</Anchors>
</Frame>
</Ui>
\ No newline at end of file
trunk/Torta/CL3.lua
27,16 → 27,16
function Checklist3:LoadList(listID)
local lists = Torta.db.profile.lists;
self:HideTaskEditor();
if (listID == nil) or (Torta.gui.data == lists[listID]) then
if (listID == nil) or (Torta.gui.listData == lists[listID]) then
-- "Unload" the list, show the no list loaded text, hide stuff
gui.data = nil;
gui.listData = nil;
 
widgets.cl3HeaderText:SetText("Torta Checklist");
Torta.db.profile.cfg.loadedList = false;
self.openTask = nil;
else
-- Do the opposite!
Torta.gui.data = lists[listID];
gui.listData = lists[listID];
FauxScrollFrame_SetOffset(Torta.gui.elements.clScrollBar, 0);
getglobal(widgets.clScrollBar:GetName() .. "ScrollBar"):SetValue(0);
widgets.cl3HeaderText:SetText(lists[listID].meta.listName);
102,7 → 102,7
function Checklist3:HideTaskEditor()
dispWnd:ClearAllPoints();
dispWnd:SetPoint(unpack(displayWindowPoints));
dispWnd:SetPoint("BOTTOMRIGHT", widgets.taskBar, "TOPRIGHT");
dispWnd:SetPoint("BOTTOMRIGHT", widgets.clTaskBar, "TOPRIGHT");
tEditor:Hide();
self.openTask = nil;
widgets.removeTaskButton:Disable();
198,7 → 198,7
end
gui:UpdateExplorerScrollBar();
if not Torta.db.profile.lists[Torta.db.profile.cfg.loadedList] then
print(Torta.db.profile.cfg.loadedList);
-- print(Torta.db.profile.cfg.loadedList);
Torta.db.profile.cfg.loadedList = false;
self:LoadList(nil);
gui:UpdateCLScrollBar();
214,7 → 214,6
function Checklist3:RenameList(listID, newName)
-- print(listID, newName);
if not (type(newName) == "string") then
-- print(":D");
local listName = self:GetList(listID).meta.listName
local dialog = StaticPopup_Show("TORTA_CLRENAMELIST", listName);
getglobal(dialog:GetName() .. "EditBox"):SetText(listName);
trunk/Torta/NB2.lua
2,5 → 2,5
local Notebook = Torta.nb2;
 
function Notebook:InitializeNotebook()
PanelTemplates_DisableTab(TortaParentFrame, 3);
 
end
trunk/Torta/UIManager.lua
1,28 → 1,40
local mainWindow = TortaParentFrame;
-- ====================================================================
-- UIManager.lua
-- Contains functions used for operations that impact what the user
-- sees.
-- ====================================================================
 
-- Windows
local mainWindow = TortaParentFrame;
local startPage = TortaParentFrameStartPage;
local mainPage = TortaParentFrameMainPage;
local explorerWindow = TortaParentFrameMainPageExplorerSubWindow;
local clDisplayWindow = TortaParentFrameMainPageCLDisplaySubWindow;
local nbDisplayWindow = TortaParentFrameMainPageNBDisplaySubWindow;
 
-- Misc. Widgets
local explorerScrollBar = TortaParentFrameMainPageExplorerSubWindowScrollBar;
local clDisplayWindow = TortaParentFrameMainPageDisplaySubWindow;
local clScrollBar = TortaParentFrameMainPageDisplaySubWindowScrollBar;
local noLoadedListText = TortaParentFrameMainPageDisplaySubWindowNoLoadedListText;
local noTasksText = TortaParentFrameMainPageDisplaySubWindowNoTasksText;
local clTopButton = TortaParentFrameMainPageDisplaySubWindowTaskButton1;
local cl3HeaderText = TortaParentFrameMainPageDisplaySubWindowHeaderText;
local clScrollBar = TortaParentFrameMainPageCLDisplaySubWindowScrollBar;
local noLoadedListText = TortaParentFrameMainPageCLDisplaySubWindowNoLoadedListText;
local noTasksText = TortaParentFrameMainPageCLDisplaySubWindowNoTasksText;
local clTopButton = TortaParentFrameMainPageCLDisplaySubWindowTaskButton1;
local cl3HeaderText = TortaParentFrameMainPageCLDisplaySubWindowHeaderText;
local taskEditor = TortaParentFrameMainPageTaskEditorSubWindow;
local taskBar = TortaParentFrameMainPageTaskbar;
local clTaskBar = TortaParentFrameMainPageCLTaskbar;
local nbTaskBar = TortaParentFrameMainPageNBTaskbar;
local editTaskEB = TortaParentFrameMainPageTaskEditorSubWindowScrollFrameEditBox;
local uncheckAllButton = TortaParentFrameMainPageTaskbarUncheckAllButton;
local checkAllButton = TortaParentFrameMainPageTaskbarCheckAllButton;
local addTaskButton = TortaParentFrameMainPageTaskbarAddTaskButton;
local removeTaskButton = TortaParentFrameMainPageTaskbarRemoveTaskButton;
local uncheckAllButton = TortaParentFrameMainPageCLTaskbarUncheckAllButton;
local checkAllButton = TortaParentFrameMainPageCLTaskbarCheckAllButton;
local addTaskButton = TortaParentFrameMainPageCLTaskbarAddTaskButton;
local removeTaskButton = TortaParentFrameMainPageCLTaskbarRemoveTaskButton;
local explorerNoListsText = TortaParentFrameMainPageExplorerSubWindowNoListsText;
local statsButton = TortaParentFrameMainPageTaskbarStatsButton;
local explorerNoNtbksText = TortaParentFrameMainPageExplorerSubWindowNoNotebooksText;
local statsButton = TortaParentFrameMainPageCLTaskbarStatsButton;
 
local EXPLORER_LISTBUTTON_HEIGHT = 16;
local Torta = Torta;
 
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.");
noLoadedListText:SetText("|cffffd000No loaded list. I feel ignored. /cry|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("|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.");
 
31,7 → 43,7
Torta.gui.exListButtons = { TortaParentFrameMainPageExplorerSubWindowListButton1 };
-- Checklist subwindow stuff
Torta.gui.clRecycleBin = {};
Torta.gui.clListButtons = { TortaParentFrameMainPageDisplaySubWindowTaskButton1 };
Torta.gui.clListButtons = { TortaParentFrameMainPageCLDisplaySubWindowTaskButton1 };
 
----------------------------------------------------------------------------------------
Torta.gui.elements = {};
46,13 → 58,15
e.clTopButton = clTopButton;
e.cl3HeaderText = cl3HeaderText;
e.taskEditor = taskEditor;
e.taskBar = taskBar;
e.clTaskBar = clTaskBar;
e.nbTaskBar = nbTaskBar;
e.editTaskEB = editTaskEB;
e.uncheckAllButton = uncheckAllButton;
e.checkAllButton = checkAllButton;
e.addTaskButton = addTaskButton;
e.removeTaskButton = removeTaskButton;
e.explorerNoListsText = explorerNoListsText;
e.explorerNoNtbksText = explorerNoNtbksText
e.statsButton = statsButton;
e = nil;
----------------------------------------------------------------------------------------
60,7 → 74,7
frame:Hide();
end
 
local FADETIME = 0.2
local FADETIME = 0.25;
function Torta.gui:ToggleWindow(window)
window = window or mainWindow;
if self:IsFrameScaling(window) or UIFrameIsFading(window) then
86,8 → 100,23
startPage:Show();
mainPage:Hide();
else
self.tab = tabID;
startPage:Hide();
mainPage:Show();
if tabID == 2 then
clDisplayWindow:Show();
clTaskBar:Show();
 
nbDisplayWindow:Hide();
nbTaskBar:Hide();
else
clDisplayWindow:Hide();
clTaskBar:Hide();
 
nbDisplayWindow:Show();
nbTaskBar:Show();
end
self:UpdateExplorerScrollBar();
end
end
 
149,34 → 178,69
local lineplusoffset;
local button;
explorerNoListsText:Hide();
if #Torta.db.profile.lists > 0 then
local lists = Torta.db.profile.lists;
FauxScrollFrame_Update(explorerScrollBar, #Torta.db.profile.lists, #self.exListButtons, 16, nil, nil, nil, nil, nil, nil, true)
local loadedListID = Torta.db.profile.cfg.loadedList;
for line = 1, #self.exListButtons do
lineplusoffset = line + FauxScrollFrame_GetOffset(explorerScrollBar);
button = self.exListButtons[line];
if lineplusoffset <= #Torta.db.profile.lists then
if not lists[lineplusoffset] then return end
button:SetText(lists[lineplusoffset].meta.listName);
button:SetID(lineplusoffset);
 
if lineplusoffset ~= loadedListID then
button:UnlockHighlight();
explorerNoNtbksText:Hide();
 
if self.tab == 2 then -- if Torta Checklist is selected
if #Torta.db.profile.lists > 0 then
local lists = Torta.db.profile.lists;
FauxScrollFrame_Update(explorerScrollBar, #Torta.db.profile.lists, #self.exListButtons, 16, nil, nil, nil, nil, nil, nil, true)
local loadedListID = Torta.db.profile.cfg.loadedList;
for line = 1, #self.exListButtons do
lineplusoffset = line + FauxScrollFrame_GetOffset(explorerScrollBar);
button = self.exListButtons[line];
if lineplusoffset <= #Torta.db.profile.lists then
if not lists[lineplusoffset] then return end
button.text:SetText(lists[lineplusoffset].meta.listName);
button:SetID(lineplusoffset);
 
if lineplusoffset ~= loadedListID then
button:UnlockHighlight();
else
button:LockHighlight();
end
 
button:Show();
else
button:LockHighlight();
button:Hide();
end
 
button:Show();
else
button:Hide();
end
else
explorerScrollBar:Hide();
explorerNoListsText:Show();
for i = 1, #self.exListButtons do
self.exListButtons[i]:Hide();
end
end
else
explorerScrollBar:Hide();
explorerNoListsText:Show();
for i = 1, #self.exListButtons do
self.exListButtons[i]:Hide();
else -- if Torta Notebook is selected
if #Torta.db.profile.notes > 0 then
local notes = Torta.db.profile.notes;
FauxScrollFrame_Update(explorerScrollBar, #Torta.db.profile.notes, #self.exListButtons, 16, nil, nil, nil, nil, nil, nil, true)
local loadedListID = Torta.db.profile.cfg.loadedList;
for line = 1, #self.exListButtons do
lineplusoffset = line + FauxScrollFrame_GetOffset(explorerScrollBar);
button = self.exListButtons[line];
if lineplusoffset <= #Torta.db.profile.notes then
if not notes[lineplusoffset] then return end
button:SetText(notes[lineplusoffset].meta.name);
button:SetID(lineplusoffset);
 
if lineplusoffset ~= loadedListID then
button:UnlockHighlight();
else
button:LockHighlight();
end
 
button:Show();
else
button:Hide();
end
end
else
explorerScrollBar:Hide();
explorerNoNtbksText:Show();
for i = 1, #self.exListButtons do
self.exListButtons[i]:Hide();
end
end
end
end
234,19 → 298,21
noTasksText:Hide();
noLoadedListText:Hide();
 
if self.data then
clDisplayWindow:Show();
nbDisplayWindow:Hide();
if self.listData then
noLoadedListText:Hide();
cl3HeaderText:SetText(self.data.meta.listName);
FauxScrollFrame_Update(clScrollBar, #self.data.text, #self.clListButtons, 32, nil, nil, nil, nil, nil, nil, true)
cl3HeaderText:SetText(self.listData.meta.listName);
FauxScrollFrame_Update(clScrollBar, #self.listData.text, #self.clListButtons, 32, nil, nil, nil, nil, nil, nil, true)
if not isFromOnShow then
clScrollBar:Show();
end
for line = 1, #self.clListButtons do
lineplusoffset = line + FauxScrollFrame_GetOffset(clScrollBar);
button = self.clListButtons[line];
if lineplusoffset <= #self.data.text then
button.text:SetFormattedText("|cffffd000%i.)|r %s", lineplusoffset, self.data.text[lineplusoffset]);
button.check:SetChecked(self.data.stat[lineplusoffset]);
if lineplusoffset <= #self.listData.text then
button.text:SetFormattedText("|cffffd000%i.)|r %s", lineplusoffset, self.listData.text[lineplusoffset]);
button.check:SetChecked(self.listData.stat[lineplusoffset]);
button:SetID(lineplusoffset);
button.check:SetID(lineplusoffset);
button:SetID(lineplusoffset);
262,7 → 328,7
button:Hide();
end
end
if #self.data.text == 0 then
if #self.listData.text == 0 then
noTasksText:Show();
clScrollBar:Hide()
else
315,7 → 381,7
end
 
FauxScrollFrame_SetOffset(clScrollBar, offset);
FauxScrollFrame_Update(clScrollBar, #self.data.text, #self.clListButtons, 32, nil, nil, nil, nil, nil, nil, true)
FauxScrollFrame_Update(clScrollBar, #self:GetLoadedList().text, #self.clListButtons, 32, nil, nil, nil, nil, nil, nil, true)
self:CheckCLButtons();
self:UpdateCLScrollBar();
offset = offset + 1
332,7 → 398,7
-- ====================================================================
local clExplorerDropdownInfo = {
{
text = "Turtle Explorer",
text = "Tortoise Explorer",
isTitle = true
},
{
340,6 → 406,10
func = function() Torta.cl3:CreateList(); end
},
{
text = "Profiles... (NYI)",
func = function() end
},
{
text = "",
notClickable = true
},
354,10 → 424,6
isTitle = true
},
{
text = "Create a new list",
func = function() Torta.cl3:CreateList(); end,
},
{
text = "Rename this list",
func = function() Torta.cl3:RenameList(Torta.gui.selectedExplorerButton:GetID()); end
},
370,6 → 436,18
notClickable = true
},
{
text = "Create a new list",
func = function() Torta.cl3:CreateList(); end,
},
{
text = "Profiles... (NYI)",
func = function() end
},
{
text = "",
notClickable = true
},
{
text = "Close",
func = function() TortaDropDownMenuFrame:Hide(); end
}
379,7 → 457,7
function Torta.gui:clShowButtonDropdown(button)
assert(button);
self.selectedExplorerButton = button;
clListDropdownInfo[1].text = button:GetText();
clListDropdownInfo[1].text = button.text:GetText();
EasyMenu(clListDropdownInfo, dropdown, "cursor", 0, 0, "MENU", 3);
end
 
399,9 → 477,7
button:GetParent():Hide();
end,
EditBoxOnEnterPressed = function(editBox)
print(editBox:GetName());
local newName = editBox:GetText();
print(newName);
Torta.cl3:RenameList(Torta.gui.selectedExplorerButton:GetID(), newName);
editBox:GetParent():Hide();
end,
416,7 → 492,7
hideOnEscape = 1,
}
StaticPopupDialogs["TORTA_CLDELETELIST"] = {
text = "Are you REALLY sure you want to delete the list \"|cffffd000%s|r\"?",
text = "Are you ABSOLUTELY sure you want to delete the list \"|cffffd000%s|r\"?",
button1 = YES,
button2 = NO,
showAlert = true,
440,4 → 516,4
 
mainWindow:SetMinResize(820, 450);
PanelTemplates_SetNumTabs(mainWindow, 3);
Torta.gui:OnTabClicked(1);
\ No newline at end of file +Torta.gui:OnTabClicked(1);