log stuff doesn't work yet, needs more attention
git [04-12-18 - 06:19]
log stuff doesn't work yet, needs more attention
diff --git a/DailyAutoShare/DailyAutoShare.txt b/DailyAutoShare/DailyAutoShare.txt
index a953f41..37256ab 100644
--- a/DailyAutoShare/DailyAutoShare.txt
+++ b/DailyAutoShare/DailyAutoShare.txt
@@ -1,6 +1,6 @@
## Title: DailyAutoShare
## Author: manavortex
-## Version: 3.0.7
+## Version: 3.0.7a
## APIVersion: 100022
## SavedVariables: DAS_Settings DAS_Globals
## OptionalDependsOn: LibStub LibAddonMenu-2.0 LibMediaProvider-1.0 LibBinaryEncode pchat
diff --git a/DailyAutoShare/DailyAutoShare.xml b/DailyAutoShare/DailyAutoShare.xml
index 278ed75..f406fe5 100644
--- a/DailyAutoShare/DailyAutoShare.xml
+++ b/DailyAutoShare/DailyAutoShare.xml
@@ -50,7 +50,7 @@
<Button name="DasButtonRefresh">
<Anchor point="RIGHT" relativeTo="DasHandle" relativePoint="RIGHT" offsetX="-40"/>
- <Dimensions x="28" y="28" />
+ <Dimensions x="20" y="20" />
<Textures
normal ="/esoui/art/help/help_tabicon_feedback_up.dds"
pressed ="/esoui/art/help/help_tabicon_feedback_down.dds "
@@ -84,10 +84,10 @@
</Backdrop>
<Control name="DasHeader">
<Anchor point="TOPLEFT" relativeTo="DasList_Backdrop" relativePoint="TOPLEFT" offsetX="20" offsetY="15"/>
- <Anchor point="BOTTOMRIGHT" relativeTo="DasList_Backdrop" relativePoint="TOPRIGHT" offsetX="-20" offsetY="40" />
+ <Anchor point="BOTTOMRIGHT" relativeTo="DasList_Backdrop" relativePoint="TOPRIGHT" offsetX="-20" offsetY="30" />
<Controls>
<Button name="DasButtonInvite">
- <Dimensions x="28" y="28" />
+ <Dimensions x="20" y="20" />
<Anchor point="TOPLEFT" relativeTo="$(parent)" relativePoint="TOPLEFT" />
<Textures
normal="/DailyAutoShare/textures/invite_up.dds"
@@ -102,7 +102,7 @@
</Button>
<Button name="DasButtonAccept" >
- <Dimensions x="28" y="28" />
+ <Dimensions x="20" y="20" />
<Anchor point="TOPLEFT" relativeTo="DasButtonInvite" relativePoint="TOPRIGHT" offsetX="10" />
<Textures
@@ -116,7 +116,7 @@
</Button>
<Button name="DasButtonShare" >
- <Dimensions x="28" y="28" />
+ <Dimensions x="20" y="20" />
<Anchor point="TOPLEFT" relativeTo="DasButtonAccept" relativePoint="TOPRIGHT" offsetX="10" />
<Textures
@@ -132,7 +132,7 @@
<Button name="DasButtonSpam">
<Anchor point="TOPLEFT" relativeTo="DasButtonShare" relativePoint="TOPRIGHT" offsetX="50" />
- <Dimensions x="28" y="28" />
+ <Dimensions x="20" y="20" />
<Textures
normal="DailyAutoShare/textures/speaker_up.dds"
pressed="DailyAutoShare/textures/speaker_down.dds"
@@ -146,7 +146,7 @@
<Button name="DasButtonDonate" alpha="0.6">
<Anchor point="TOPRIGHT" relativeTo="$(parent)" relativePoint="TOPRIGHT" offsetY="-4" />
- <Dimensions x="40" y="40" />
+ <Dimensions x="30" y="30" />
<Textures
normal="esoui/art/chatwindow/chat_mail_up.dds"
pressed="esoui/art/chatwindow/chat_mail_down.dds"
diff --git a/DailyAutoShare/DasTooltip.lua b/DailyAutoShare/DasTooltip.lua
index 5209cff..29d2580 100644
--- a/DailyAutoShare/DasTooltip.lua
+++ b/DailyAutoShare/DasTooltip.lua
@@ -31,7 +31,13 @@ end
function DAS.CreateControlTooltip(control)
DailyAutoShare_Tooltip:ClearAnchors()
- DailyAutoShare_Tooltip:SetAnchor(BOTTOM, DasList, TOP)
+ local controlSettings = DAS.GetSettings().DasControl
+ local anchorX = controlSettings.x > 100 and RIGHT or LEFT
+ local anchorY = controlSettings.y > 100 and BOTTOM or TOP
+
+ local anchorParent = anchorX + anchorY == TOPLEFT and TOP or BOTTOM
+
+ DailyAutoShare_Tooltip:SetAnchor(anchorX + anchorY, DasHeader, anchorParent)
SetTooltipText(control)
diff --git a/DailyAutoShare/startup.lua b/DailyAutoShare/startup.lua
index d01fa3b..4420001 100644
--- a/DailyAutoShare/startup.lua
+++ b/DailyAutoShare/startup.lua
@@ -381,9 +381,12 @@ local function handleLog()
local afterEight = tonumber(GetTimeString():sub(0, 2)) >= 08
local currentDate = tonumber(GetDate())
local lastDate
- DAS.globalSettings.completionLog = DAS.globalSettings.completionLog or {}
- for dateString, dateLog in pairs(DAS.globalSettings.completionLog) do
- if dateString < currentDate -5 then
+ local completionLog = DAS.globalSettings.completionLog or {}
+ local logSize = NonContiguousCount(completionLog)
+ local counter = 0
+ for dateString, dateLog in pairs(completionLog) do
+ counter = counter +1
+ if counter < logSize -2 and dateString < currentDate then
DAS.globalSettings.completionLog[dateString] = nil
else
lastDate = dateString
@@ -392,8 +395,9 @@ local function handleLog()
if not afterEight then
DAS.globalSettings.completionLog[currentDate] = DAS.globalSettings.completionLog[dateString]
end
+ DAS.globalSettings.completionLog = completionLog
end
-
+DAS.handleLog = handleLog
--==============================
--===== Rise, my minion! ======
--==============================
@@ -413,7 +417,7 @@ function DailyAutoShare_Initialize(eventCode, addonName)
zo_callLater(OnPlayerActivated, 5000)
- handleLog()
+ -- handleLog()
EVENT_MANAGER:UnregisterForEvent("DailyAutoShare", EVENT_ADD_ON_LOADED)
end