WoWInterface SVN Torta

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /trunk
    from Rev 28 to Rev 29
    Reverse comparison

Rev 28 → Rev 29

Torta/DataHandler.lua
11,7 → 11,7
listName = "CL3 Test List"
},
text = {
[1] = "Hello, World!"
[1] = "Hello, world from Lua!"
},
stat = {
[1] = true
Torta/UIManager.lua
6,6 → 6,7
local clDisplayWindow = TortaParentFrameMainPageDisplaySubWindow;
local clScrollBar = TortaParentFrameMainPageDisplaySubWindowScrollBar;
local noLoadedListText = TortaParentFrameMainPageDisplaySubWindowNoLoadedListText;
local noTasksText = TortaParentFrameMainPageDisplaySubWindowNoTasksText;
local clTopButton = TortaParentFrameMainPageDisplaySubWindowTaskButton1;
local cl3HeaderText = TortaParentFrameMainPageDisplaySubWindowHeaderText;
local taskEditor = TortaParentFrameMainPageTaskEditorSubWindow;
18,6 → 19,10
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.");
 
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.");
 
-- Explorer subwindow stuff
Torta.gui.exRecycleBin = {};
Torta.gui.exListButtons = { TortaParentFrameMainPageExplorerSubWindowListButton1 };
214,6 → 219,10
self = Torta.gui;
local lineplusoffset;
local button;
 
noTasksText:Hide();
noLoadedListText:Hide();
 
if self.data then
noLoadedListText:Hide();
FauxScrollFrame_Update(clScrollBar, #self.data.text, #self.clListButtons, 32, nil, nil, nil, nil, nil, nil, true)
241,6 → 250,13
button:Hide();
end
end
if #self.data.text == 0 then
noTasksText:Show();
clScrollBar:Hide()
else
noTasksText:Hide();
clScrollBar:Show();
end
else
noLoadedListText:Show();
clScrollBar:Hide();
295,6 → 311,64
-- print(offset, scrollBar:GetValue());
end
 
-- Dropdown menu stuff
local clExplorerDropdownInfo = {
{
text = "Turtle Explorer",
isTitle = true
},
{
text = "Create a new list",
func = function() Torta.cl3:CreateList(); end
},
{
text = "",
notClickable = true
},
{
text = "Close",
func = function() TortaDropDownMenuFrame:Hide(); end
}
}
local clListDropdownInfo = {
{
text = "<will get replaced by list name>",
isTitle = true
},
{
text = "Create a new list",
func = function() Torta.cl3:CreateList(); end,
},
{
text = "Rename this list",
func = function() end
},
{
text = "Delete this list",
func = function() end
},
{
text = "",
notClickable = true
},
{
text = "Close",
func = function() TortaDropDownMenuFrame:Hide(); end
}
}
local dropdown = CreateFrame("Frame", "TortaDropDownMenuFrame", explorerWindow, "UIDropDownMenuTemplate");
 
function Torta.gui:clShowButtonDropdown(button)
assert(button);
clListDropdownInfo[1].text = button:GetText();
EasyMenu(clListDropdownInfo, dropdown, "cursor", 0, 0, "MENU", 3);
end
 
 
function Torta.gui:clShowExplorerDropdownMenu()
EasyMenu(clExplorerDropdownInfo, dropdown, "cursor", 0, 0, "MENU", 3);
end
 
FauxScrollFrame_SetOffset(explorerScrollBar, 0);
FauxScrollFrame_SetOffset(clScrollBar, 0);
 
Torta/Windows/Templates.xml
78,8 → 78,15
<Button name="TortaExplorerButtonTemplate" inherits="TortaListboxButtonTemplate" virtual="true">
<Scripts>
<OnClick>
Torta.cl3:LoadList(self:GetID());
if button == "LeftButton" then
Torta.cl3:LoadList(self:GetID());
else
Torta.gui:clShowButtonDropdown(self);
end
</OnClick>
<OnLoad>
self:RegisterForClicks("LeftButtonDown", "RightButtonDown");
</OnLoad>
</Scripts>
</Button>
 
Torta/Windows/Explorer.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="$parentExplorerSubWindow" parent="TortaParentFrameMainPage" inherits="TortaSubWindowTemplate">
<Frame name="$parentExplorerSubWindow" parent="TortaParentFrameMainPage" enableMouse="true" inherits="TortaSubWindowTemplate">
<Anchors>
<Anchor point="TOPLEFT">
<Offset y="-2"/>
63,6 → 63,11
Torta.gui:CheckExplorerWindow();
end
</OnUpdate>
<OnMouseDown>
if button == "RightButton" then
Torta.gui:clShowExplorerDropdownMenu()
end
</OnMouseDown>
</Scripts>
</Frame>
</Ui>
\ No newline at end of file
Torta/Windows/DisplayWindow.xml
7,13 → 7,13
</Anchors>
<Layers>
<Layer level="ARTWORK">
<FontString name="$parentHeaderText" inherits="GameFontNormal" text="List Name Goes Here - Torta Checklist">
<FontString name="$parentHeaderText" inherits="GameFontNormal" text="List Name Goes Here">
<Anchors>
<Anchor point="LEFT" relativeTo="$parentHeaderTexture"/>
<Anchor point="RIGHT" relativeTo="$parentHeaderTexture"/>
</Anchors>
</FontString>
<FontString name="$parentNoLoadedListText" inherits="GameFontHighlight" text="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.">
<FontString name="$parentNoLoadedListText" inherits="GameFontHighlight">
<Anchors>
<Anchor point="LEFT">
<Offset x="30"/>
25,6 → 25,18
<Anchor point="BOTTOM"/>
</Anchors>
</FontString>
<FontString name="$parentNoTasksText" inherits="GameFontHighlight" hidden="true">
<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>
<Frames>
Torta/LICENSE.txt
1,4 → 1,4
Copyright (c) 2008, Lawrence Patrick Calulo
Copyright (c) 2008, Lawrence Patrick Calulo (Quezacolt)
All rights reserved.
 
Redistribution and use in source and binary forms, with or without
Torta/CL3.lua
160,3 → 160,23
gui:UpdateCLScrollBar();
self:HideTaskEditor();
end
 
 
function Checklist3:CreateList()
tinsert(Torta.db.profile.lists, {
meta = {
listName = "New List"
},
text = {},
stat = {}
});
gui:UpdateExplorerScrollBar();
end
 
function Checklist3:DeleteList(index)
 
end
 
function Checklist3:RestoreList()
 
end