Quantcast

Started adding report module.

Peter Eliasson [01-24-15 - 16:56]
Started adding report module.
Filename
src/gui.lua
src/report.lua
src/src_include.xml
diff --git a/src/gui.lua b/src/gui.lua
index 7372aab..5362090 100644
--- a/src/gui.lua
+++ b/src/gui.lua
@@ -174,7 +174,7 @@ function gui:CreateActionContainer()
 	reportBtn:SetDisabled(true);
 	reportBtn:SetRelativeWidth(0.5);
 	reportBtn:SetCallback("OnClick", function()
-		self:Debug("Report you...");
+		addon.report:ShowReportWindow(self.displayedParses);
 	end);

 	actionContainer:AddChild(purgeBtn);
diff --git a/src/report.lua b/src/report.lua
new file mode 100644
index 0000000..26588ad
--- /dev/null
+++ b/src/report.lua
@@ -0,0 +1,30 @@
+local addonName, addonTable = ...
+
+-- Global functions for faster access
+local tinsert = tinsert;
+
+-- Set up module
+local addon = addonTable[1];
+local report = addon:NewModule("report", "AceHook-3.0")
+addon.report = report;
+
+-- AceGUI
+local AceGUI = LibStub("AceGUI-3.0");
+
+
+function report:ShowReportWindow(parses)
+	self.parses = parses;
+
+	-- Using Frame instead of Window because ElvUI does not
+	-- currently skin Window (1/24-15)
+	--[[
+	local frame = AceGUI:Create("Frame")
+	frame:EnableResize(false)
+	frame:SetWidth(400);
+	frame:SetHeight(300);
+	frame:SetTitle("Report Data");
+	frame:SetLayout("Flow");
+	frame:SetCallback("OnClose", function()
+	end)
+	--]]
+end
\ No newline at end of file
diff --git a/src/src_include.xml b/src/src_include.xml
index 1ad2cc5..28ad07e 100644
--- a/src/src_include.xml
+++ b/src/src_include.xml
@@ -3,5 +3,6 @@
 	<Script file="inspect.lua"/>
 	<Script file="highscore.lua"/>
 	<Script file="gui.lua"/>
+	<Script file="report.lua"/>
 	<Include file="parse_modules\parse_modules_include.xml"/>
 </Ui>
\ No newline at end of file