WoWInterface SVN Torta

Compare Revisions

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

Rev 34 → Rev 35

trunk/Torta/UIManager.lua
45,7 → 45,9
Torta.gui.clRecycleBin = {};
Torta.gui.clListButtons = { TortaParentFrameMainPageCLDisplaySubWindowTaskButton1 };
 
----------------------------------------------------------------------------------------
-- ====================================================================
-- Allow public access to our "shortcuts"
-- ====================================================================
Torta.gui.elements = {};
local e = Torta.gui.elements;
e.mainWindow = mainWindow;
69,7 → 71,8
e.explorerNoNtbksText = explorerNoNtbksText
e.statsButton = statsButton;
e = nil;
----------------------------------------------------------------------------------------
-- ====================================================================
 
function Torta.gui.scalingFinishedFunc(frame)
frame:Hide();
end
83,7 → 86,7
if not window:IsVisible() then
window.scalingFinishedFunc = nil;
window:Show();
self:ScaleIn(window, FADETIME, 0.7, 1);
self:ScaleIn(window, FADETIME, 0.8, 1);
UIFrameFadeIn(window, FADETIME, 0, 1);
else
window.scalingFinishedFunc = self.scalingFinishedFunc;
118,15 → 121,14
end
self:UpdateExplorerScrollBar();
end
if Torta.cl3.HideTaskEditor then
Torta.cl3:HideTaskEditor();
end
end
 
 
function Torta.gui:Initialize()
--[[
-- Hack. Makes the scrollbar slider marker thingy show up.
FauxScrollFrame_OnVerticalScroll(explorerScrollBar, 0, 16, Torta.gui.UpdateExplorerScrollBar);
-- FauxScrollFrame_OnVerticalScroll(clScrollBar, 0, 32, Torta.gui.UpdateCLScrollBar);
]]
Torta.gui:clHideDropHandlers();
end
 
-- Explorer listbox code
390,6 → 392,36
-- print(offset, scrollBar:GetValue());
end
 
-- ====================================================================
-- Drop handler functions
-- ====================================================================
function Torta.gui:clShowDropHandlers()
for _, button in pairs(self.clListButtons) do
button.topDropHandler:Show();
button.bottomDropHandler:Show();
end
end
 
function Torta.gui:clHideDropHandlers()
for _, button in pairs(self.clListButtons) do
button.topDropHandler:Hide();
button.bottomDropHandler:Hide();
end
end
 
function Torta.gui:clTaskDragStart(taskButton)
local text = taskButton.text:GetText();
local stat = taskButton.check:GetChecked();
TortaDragThingy.text:SetText(text);
TortaDragThingy.check:SetChecked(stat);
TortaDragThingy:Show();
UIFrameFadeIn(TortaDragThingy, 0.25, 0.5, 1);
end
 
function Torta.gui:clTaskDragStop()
TortaDragThingy:Hide();
end
 
-- Note:
-- Add all UI management functions ABOVE!
 
trunk/Torta/Windows/Taskbar.xml
97,7 → 97,7
</OnClick>
</Scripts>
</Button>
<Button name="$parentStatsButton" text="Stats Button">
<Button name="$parentStatsButton" text="Stats Button" alpha="0.5">
<NormalFont style="GameFontNormal"/>
<Size y="22"/>
<Anchors>
108,6 → 108,12
<OnClick>
 
</OnClick>
<OnEnter>
UIFrameFadeIn(self, 0.25, self:GetAlpha(), 1);
</OnEnter>
<OnLeave>
UIFrameFadeOut(self, 0.25, self:GetAlpha(), 0.5);
</OnLeave>
</Scripts>
</Button>
</Frames>
trunk/Torta/Windows/Templates.xml
3,7 → 3,7
<!-- NOTE TO SELF: normal/pushed/disabled text uses style="fontname" now! -->
 
<!-- We may end up using a lot of this, so... -->
<Frame name="TortaTooltipStyleFrameTemplate" virtual="true">
<Frame name="TortaTooltipStyleFrameTemplate" virtual="true" toplevel="true">
<Backdrop bgFile="Interface\Tooltips\UI-Tooltip-Background" edgeFile="Interface\Tooltips\UI-Tooltip-Border" tile="true">
<EdgeSize>
<AbsValue val="16"/>
116,12 → 116,18
<OnClick>
Torta.cl3:EditTask(self:GetID());
</OnClick>
<OnDragStart>
 
</OnDragStart>
<OnDragStop>
 
</OnDragStop>
<OnMouseDown>
self.dragFlag = true;
</OnMouseDown>
<OnMouseUp>
self.dragFlag = false;
Torta.gui:clTaskDragStop();
</OnMouseUp>
<OnLeave>
if self.dragFlag then
Torta.gui:clTaskDragStart(self);
end
</OnLeave>
</Scripts>
<Frames>
<CheckButton name="$parentCheckButton" inherits="UICheckButtonTemplate">
154,6 → 160,34
</OnClick>
</Scripts>
</CheckButton>
<!-- Drop areas -->
<Button name="$parentTopDropHandler" text="Top" hidden="true">
<NormalFont style="GameFontNormal"/>
<Anchors>
<Anchor point="TOPLEFT"/>
<Anchor point="BOTTOMRIGHT" relativePoint="RIGHT"/>
</Anchors>
<Scripts>
<OnLoad>
self.tortaDropType = "CLTASK";
self:GetParent().topDropHandler = self;
</OnLoad>
</Scripts>
</Button>
<Button name="$parentBottomDropHandler" text="Bottom" hidden="true">
<NormalFont style="GameFontNormal"/>
<Anchors>
<Anchor point="TOPLEFT" relativePoint="LEFT"/>
<Anchor point="BOTTOMRIGHT"/>
</Anchors>
<Scripts>
<OnLoad>
self.tortaDropType = "CLTASK";
self:GetParent().bottomDropHandler = self;
</OnLoad>
</Scripts>
</Button>
<!-- End of drop areas -->
</Frames>
</Button>
 
175,4 → 209,29
</Layers>
</ScrollFrame>
 
<Frame name="TortaDragThingy" inherits="TortaTooltipStyleFrameTemplate" parent="UIParent" frameStrata="TOOLTIP">
<Size x="200" y="40"/>
<Anchors>
<Anchor point="CENTER"/>
</Anchors>
<Scripts>
<OnUpdate>
xPos, yPos = GetCursorPosition();
local scale = UIParent:GetScale();
self:ClearAllPoints();
self:SetPoint("BOTTOMLEFT", UIParent, "BOTTOMLEFT", (xPos + 1) / scale, (yPos + 1) / scale);
</OnUpdate>
</Scripts>
<Frames>
<Button name="$parentTaskButton" inherits="TortaChecklistTaskButton" setAllPoints="true">
<Scripts>
<OnLoad>
local parent = self:GetParent();
parent.text = self.text;
parent.check = self.check;
</OnLoad>
</Scripts>
</Button>
</Frames>
</Frame>
</Ui>
\ No newline at end of file
trunk/Torta/Windows/TortaParentFrame.xml
2,7 → 2,8
<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">
<!-- The main window -->
<Frame name="TortaParentFrame" inherits="TortaTooltipStyleFrameTemplate" parent="UIParent" hidden="true" movable="true" resizable="true">
<Frame name="TortaParentFrame" inherits="TortaTooltipStyleFrameTemplate" parent="UIParent" hidden="true"
movable="true" resizable="true" toplevel="true" clampedToScreen="true">
<Size x="800" y="415"/>
<Anchors>
<Anchor point="CENTER"/>
trunk/Torta/Windows/Explorer.xml
29,7 → 29,7
<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.">
<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"/>
trunk/Torta/UIEffects.lua
36,13 → 36,15
end
 
local index = 1;
--[[
while SCALEFRAMES[index] do
-- If frame is already set to resize width then return
-- If frame is already set to rescale then return
if ( SCALEFRAMES[index] == frame ) then
return;
end
index = index + 1;
end
]]
frame:SetScale(scaleInfo.startScale);
 
frame.scaleInfo = scaleInfo;
trunk/Torta/CL3.lua
80,6 → 80,7
else
-- open the task editor
self:ShowTaskEditor(taskID);
widgets.editTaskEB:SetFocus();
self.openTask = taskID;
widgets.editTaskEB:SetText(self:GetLoadedList().text[taskID]);
end
157,7 → 158,6
tinsert(list.text, index, "");
tinsert(list.stat, index, false);
gui:UpdateCLScrollBar();
 
end
 
function Checklist3:RemoveTask()