WoWInterface SVN Torta

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /
    from Rev 19 to Rev 20
    Reverse comparison

Rev 19 → Rev 20

trunk/Torta/Core.lua
25,21 → 25,14
local WoWISVNRevision = GetAddOnMetadata("Torta", "X-WoWISVNRevision");
local version = GetAddOnMetadata("Torta", "Version");
 
 
if tonumber(WoWISVNRevision) then
vLabel:SetFormattedText("Torta v%s.%s", version, WoWISVN_Revision);
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);
end
vLabel:SetJustifyH("LEFT");
vLabel:SetAlpha(0.7);
 
-- stand-in data for the scrollbars to scroll through while the data storage
-- stuff is being worked on
self.data = {};
for i = 1, 100 do
self.data[i] = "Item " .. i;
end
 
Torta.gui:Initialize();
Torta.cl3:InitializeChecklist();
trunk/Torta/UIManager.lua
10,6 → 10,7
local clTopButton = TortaParentFrameMainPageDisplaySubWindowTaskButton1;
local taskEditor = TortaParentFrameMainPageTaskEditorSubWindow;
local taskBar = TortaParentFrameMainPageTaskbar;
local editTaskEB = TortaParentFrameMainPageTaskEditorSubWindowEditBox;
 
local cl3HeaderText = TortaParentFrameMainPageDisplaySubWindowHeaderText;
 
41,6 → 42,7
e.cl3HeaderText = cl3HeaderText;
e.taskEditor = taskEditor;
e.taskBar = taskBar;
e.editTaskEB = editTaskEB;
e = nil;
----------------------------------------------------------------------------------------
function Torta.gui.scalingFinishedFunc(frame)
trunk/Torta/Windows/DisplayWindow.xml
76,7 → 76,7
<Anchors>
<Anchor point="BOTTOMLEFT" relativeTo="$parentExplorerSubWindow" relativePoint="BOTTOMRIGHT"/>
<Anchor point="TOPRIGHT" relativeTo="$parentTaskbar" relativePoint="BOTTOMRIGHT">
<Offset y="125"/>
<Offset y="150"/>
</Anchor>
</Anchors>
<Layers>
89,5 → 89,38
</FontString>
</Layer>
</Layers>
<Frames>
<Button name="$parentEnterButton" inherits="UIPanelButtonTemplate" text="Enter">
<Size x="100" y="23"/>
<Anchors>
<Anchor point="BOTTOMRIGHT">
<Offset x="-3" y="3"/>
</Anchor>
</Anchors>
<Scripts>
<OnClick>
Torta.cl3:ModifyOpenTask(getglobal(self:GetParent():GetName() .. "EditBox"):GetText());
getglobal(self:GetParent():GetName() .. "EditBox"):ClearFocus();
Torta.gui:UpdateCLScrollBar();
</OnClick>
</Scripts>
</Button>
<EditBox name="$parentEditBox" multiLine="true" autoFocus="false">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="$parentHeaderText" relativePoint="BOTTOMLEFT"/>
<Anchor point="BOTTOMRIGHT" relativeTo="$parentEnterButton" relativePoint="TOPRIGHT"/>
</Anchors>
<Scripts>
<OnEscapePressed>
self:ClearFocus();
</OnEscapePressed>
<OnEnterPressed>
self:ClearFocus();
print("Moo!");
</OnEnterPressed>
</Scripts>
<FontString inherits="GameFontHighlight" setAllPoints="true"/>
</EditBox>
</Frames>
</Frame>
</Ui>
\ No newline at end of file
trunk/Torta/Windows/Templates.xml
83,6 → 83,8
</Scripts>
</Button>
 
<FontString name="TortaCLFontStringTemplate" inherits="GameFontHighlight" maxLines="3" virtual="true"/>
 
<Button name="TortaChecklistTaskButton" inherits="TortaListboxButtonTemplate" virtual="true">
<Size y="32"/>
<!-- LISTBUTTON SCRIPTS -->
102,7 → 104,7
<!-- CHECKBUTTON SCRIPTS -->
<Scripts>
<OnLoad>
local fs = self:CreateFontString(nil, "ARTWORK", "GameFontHighlight");
local fs = self:CreateFontString(nil, "ARTWORK", "TortaCLFontStringTemplate");
fs:SetPoint("LEFT", self, "RIGHT", 3);
fs:SetPoint("RIGHT", self:GetParent(), "RIGHT", -3);
fs:SetText("Hello, World!");
113,7 → 115,6
</Scripts>
</CheckButton>
</Frames>
 
</Button>
 
</Ui>
\ No newline at end of file
trunk/Torta/CL3.lua
21,19 → 21,20
 
widgets.cl3HeaderText:SetText("Torta Checklist");
gui:UpdateCLScrollBar();
Torta.db.profile.cfg.loadedList = false;
else
-- Do the opposite!
Torta.gui.data = lists[listID];
FauxScrollFrame_SetOffset(Torta.gui.elements.clScrollBar, 0);
getglobal(widgets.clScrollBar:GetName() .. "ScrollBar"):SetValue(0);
widgets.cl3HeaderText:SetText(lists[listID].meta.listName);
Torta.db.profile.cfg.loadedList = listID;
gui:UpdateCLScrollBar();
end
end
 
 
function Checklist3:EditTask(taskID)
print(taskID)
if self.openTask and self.openTask == taskID then
-- close the task editor
self.openTask = nil;
42,9 → 43,18
-- open the task editor
self:ShowTaskEditor(taskID);
self.openTask = taskID;
widgets.editTaskEB:SetText(Torta.db.profile.lists[Torta.db.profile.cfg.loadedList].text[taskID]);
end
end
 
 
function Checklist3:ModifyOpenTask(newText)
assert(type(self.openTask) == "number");
local profile = Torta.db.profile;
profile.lists[profile.cfg.loadedList].text[self.openTask] = newText;
end
 
 
function Checklist3:HideTaskEditor()
dispWnd:ClearAllPoints();
dispWnd:SetPoint(unpack(displayWindowPoints));
52,6 → 62,7
tEditor:Hide();
end
 
 
function Checklist3:ShowTaskEditor(taskID)
tEditor:Show();
dispWnd:ClearAllPoints();
59,3 → 70,4
dispWnd:SetPoint("BOTTOMRIGHT", tEditor, "TOPRIGHT");
getglobal(tEditor:GetName() .. "HeaderText"):SetText("Task Editor: " .. (taskID or "|cffff0000No task ID|r"))
end
 
trunk/Torta/NB2.lua
2,5 → 2,5
local Notebook = Torta.nb2;
 
function Notebook:InitializeNotebook()
 
PanelTemplates_DisableTab(TortaParentFrame, 3);
end