Mercurial > wow > buffalo2
changeset 55:dd9b5f59632c v1.0a-release
Core
- updated comment notes
Objectives
- force hide blocks when their tracker is hidden
Clock
- convert clock into its own module
- display zone coordinates alongside time
author | Nenue |
---|---|
date | Fri, 10 Jun 2016 20:52:27 -0400 |
parents | ed74c5cabe98 |
children | 159855c2e9ae |
files | ObjectiveTracker/Layout.lua ObjectiveTracker/Widgets.xml TimeManager/TimeManager.lua TimeManager/TimeManager.xml Veneer.lua |
diffstat | 5 files changed, 30 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/ObjectiveTracker/Layout.lua Wed Jun 01 20:48:14 2016 -0400 +++ b/ObjectiveTracker/Layout.lua Fri Jun 10 20:52:27 2016 -0400 @@ -76,7 +76,7 @@ local widgetTextFont, widgetTextSize, widgetTextOutline = [[Interface\Addons\SharedMedia_MyMedia\font\XOIREQE.TTF]], 11, 'OUTLINE' local widgetTextColor = {1,1,1,1 } local widgetHeight, widgetBorder = 17, 1 - +local widgetWidth = 250 local selectionbg = {'HORIZONTAL', 1, 1, 1, 0, 1, 1, 1, 0.225} local titleSpacing, textSpacing, blockSpacing = 3, 3, 1 @@ -611,6 +611,7 @@ self:SetMinMaxValues(0, self.maxValue) self:SetHeight(widgetHeight) + self:SetWidth(widgetWidth) self.height = widgetHeight self.status:SetFont(widgetTextFont, widgetTextSize, widgetTextOutline)
--- a/ObjectiveTracker/Widgets.xml Wed Jun 01 20:48:14 2016 -0400 +++ b/ObjectiveTracker/Widgets.xml Fri Jun 10 20:52:27 2016 -0400 @@ -2,7 +2,7 @@ <!-- houses objective widget templates --> <StatusBar name="VeneerObjectiveCriteriaStatusBar" drawLayer="BACKGROUND" virtual="true" hidden="true" minValue="0" maxValue="100" defaultValue="0"> - <Size x="250" y="30" /> + <Size x="100" y="30" /> <Scripts> <OnLoad> self.widgetType = 'StatusBar'
--- a/TimeManager/TimeManager.lua Wed Jun 01 20:48:14 2016 -0400 +++ b/TimeManager/TimeManager.lua Fri Jun 10 20:52:27 2016 -0400 @@ -14,6 +14,7 @@ local print = B.print('XML') -- debug hook -- weekday abbreviations used in display local weekDays = {'Su', 'M', 'T', 'W', 'R' ,'F', 'Sa' } +local months = {'JA', 'FB', 'MR', 'AP', 'MY', 'JN', 'JL', 'AG', 'SP', 'OC', 'NV', 'DC'} -- runs when visible clock.OnUpdate = function(self) @@ -26,11 +27,13 @@ local posFormat = "|cFF00FFFF%0.1f %0.1f|r" if self:IsMouseOver() then posFunc = _G.UnitPosition - posFormat = "|cFFFFFF00%d %d|r" + posFormat = "yds |cFFFFFF00%d %d|r" posF = 1 end + local posX, posY = posFunc('player') - self.time:SetFormattedText(posFormat.. " |cAAFFFFFF%s|r |cFF44FFFF%s|r|c88FFFFFF/|r|cFF44FFFF%s|r %d:%02d", posX * posF, posY * posF, weekDays[weekday], month, day, hour, min) + self.coords:SetFormattedText(posFormat, posX * posF, posY * posF) + self.time:SetFormattedText("%s |cFF44FFFF%s|r|c88FFFFFF%s|r %d:%02d", weekDays[weekday], day, months[month], hour, min) end -- hide/show toggler @@ -57,4 +60,9 @@ self:SetScript('OnUpdate', clock.OnUpdate) self:Show() self.time:SetText('Clock stuff') +end + +clock.Open = function(self) +end +clock.Close = function(self) end \ No newline at end of file
--- a/TimeManager/TimeManager.xml Wed Jun 01 20:48:14 2016 -0400 +++ b/TimeManager/TimeManager.xml Fri Jun 10 20:52:27 2016 -0400 @@ -22,6 +22,16 @@ </Anchors> <Color r="1" g="1" b="1" a="1" /> </FontString> + <FontString font="Interface\Addons\SharedMedia_MyMedia\font\ArchivoNarrow-Bold.ttf" parentKey="coords" text="MAP_COORDS" outline="NORMAL"> + <FontHeight> + <AbsValue val="14" /> + </FontHeight> + + <Anchors> + <Anchor point="RIGHT" relativePoint="LEFT" relativeKey="$parent.time" /> + </Anchors> + <Color r="1" g="1" b="1" a="1" /> + </FontString> </Layer> </Layers> <Scripts>
--- a/Veneer.lua Wed Jun 01 20:48:14 2016 -0400 +++ b/Veneer.lua Fri Jun 10 20:52:27 2016 -0400 @@ -507,7 +507,7 @@ self:SetScript('OnDragStart', prototypes.OnDragStart) if self.OnDragStop then self:SetScript('OnDragStop', function(self, ...) - print('|cFFFF0088end of dragging') + print('|cFFFF0088end of dragging'). self:OnDragStop(self, ...) prototypes.OnDragStop(self, ...) end) @@ -518,6 +518,7 @@ self:EnableMouse(false) end + -- establish internal storage if not V.Conf[name] then V.Conf[name] = { enabled = self.enabled, @@ -525,13 +526,15 @@ end local c = V.Conf[name] + -- establish position data; if undefined, round the API values if not c.position then local anchor, _, point, x, y = self:GetPoint(1) - print('seeding default position', anchor, point, x, y) + x = floor(x+.5) + y = floor(y+.5) + print('obtained frame position', name, anchor, point, x, y) c.position = {anchor, point, x, y} else - - print('restoring frame position', unpack(c.position)) + print('restoring frame position', name, unpack(c.position)) self:ClearAllPoints() local anchorTo, relativePoint, x, y = unpack(c.position) self:SetPoint(anchorTo, UIParent, relativePoint, x, y)