add bank size, visual refactor

Leandro Silva [02-15-20 - 13:35]
add bank size, visual refactor
Filename
Lang/de.lua
Lang/en.lua
Lang/fr.lua
Lang/jp.lua
LeoAltholic.xml
LeoAltholic_API.lua
Settings.lua
ui/checklist.lua
ui/toolbar.lua
diff --git a/Lang/de.lua b/Lang/de.lua
index 7a27b01..0251e60 100644
--- a/Lang/de.lua
+++ b/Lang/de.lua
@@ -17,6 +17,7 @@ ZO_CreateStringId("LEOALT_CHAT_ALL", "Chat Nachricht für alle Charaktere")
 ZO_CreateStringId("LEOALT_CHAT_ALL_TOOLTIP", "Zeigt eine Chat Nachricht an, wenn eine Analyse für einen Charakter abgeschlossen wurde.")
 ZO_CreateStringId("LEOALT_CENTERSCREEN_CURRENT", "Bildschirm Nachricht für aktuellen Charakter")
 ZO_CreateStringId("LEOALT_CENTERSCREEN_CURRENT_TOOLTIP", "Zeigt eine Bildschirm Nachricht oben in der Mitte an, wenn eine Analyse für den aktuellen Charakter abgeschlossen wurde.")
+ZO_CreateStringId("LEOALT_HIDE_DONE_WRIT", "Hide writ icon when done")

 ZO_CreateStringId("LEOALT_PLAYED", "Gespielt")
 ZO_CreateStringId("LEOALT_RIDING", "Reiten")
diff --git a/Lang/en.lua b/Lang/en.lua
index d549823..0a9b33b 100644
--- a/Lang/en.lua
+++ b/Lang/en.lua
@@ -17,6 +17,7 @@ ZO_CreateStringId("LEOALT_CHAT_ALL", "Chat message for all characters")
 ZO_CreateStringId("LEOALT_CHAT_ALL_TOOLTIP", "Display a chat message whenever a research is completed for a character")
 ZO_CreateStringId("LEOALT_CENTERSCREEN_CURRENT", "Center Screen message for current character")
 ZO_CreateStringId("LEOALT_CENTERSCREEN_CURRENT_TOOLTIP", "Display a center screen message whenever a research is completed for current character")
+ZO_CreateStringId("LEOALT_HIDE_DONE_WRIT", "Hide writ icon when done")

 ZO_CreateStringId("LEOALT_PLAYED", "Played")
 ZO_CreateStringId("LEOALT_RIDING", "Riding")
diff --git a/Lang/fr.lua b/Lang/fr.lua
index b0c45de..36c4d4f 100644
--- a/Lang/fr.lua
+++ b/Lang/fr.lua
@@ -17,6 +17,7 @@ ZO_CreateStringId("LEOALT_CHAT_ALL", "Chat message for all characters")
 ZO_CreateStringId("LEOALT_CHAT_ALL_TOOLTIP", "Display a chat message whenever a research is completed for a character")
 ZO_CreateStringId("LEOALT_CENTERSCREEN_CURRENT", "Center Screen message for current character")
 ZO_CreateStringId("LEOALT_CENTERSCREEN_CURRENT_TOOLTIP", "Display a center screen message whenever a research is completed for current character")
+ZO_CreateStringId("LEOALT_HIDE_DONE_WRIT", "Hide writ icon when done")

 ZO_CreateStringId("LEOALT_PLAYED", "Played")
 ZO_CreateStringId("LEOALT_RIDING", "Riding")
diff --git a/Lang/jp.lua b/Lang/jp.lua
index 7caee4c..27db2c7 100644
--- a/Lang/jp.lua
+++ b/Lang/jp.lua
@@ -17,6 +17,7 @@ ZO_CreateStringId("LEOALT_CHAT_ALL", "全てのキャラクタをチャットメ
 ZO_CreateStringId("LEOALT_CHAT_ALL_TOOLTIP", "キャラクターの研究が完了するたびにチャットメッセージを表示する")
 ZO_CreateStringId("LEOALT_CENTERSCREEN_CURRENT", "現在のキャラクタの中央画面にメッセージ")
 ZO_CreateStringId("LEOALT_CENTERSCREEN_CURRENT_TOOLTIP", "現在のキャラクターの研究が終了するたびに中央画面にメッセージを表示する")
+ZO_CreateStringId("LEOALT_HIDE_DONE_WRIT", "Hide writ icon when done")

 ZO_CreateStringId("LEOALT_PLAYED", "プレイ")
 ZO_CreateStringId("LEOALT_RIDING", "乗る")
diff --git a/LeoAltholic.xml b/LeoAltholic.xml
index 21d6a5c..e6ecfed 100644
--- a/LeoAltholic.xml
+++ b/LeoAltholic.xml
@@ -1904,6 +1904,16 @@
                     <Dimensions x="70" y="32" />
                     <Anchor point="TOPLEFT" relativeTo="$(parent)InventoryTexture" relativePoint="TOPRIGHT" offsetX="2"/>
                 </Label>
+<!--Teva added the section below-->
+				<Texture name="$(parent)BankSizeTexture" hidden="true" textureFile="/esoui/art/icons/mapkey/mapkey_bank.dds">
+					<Dimensions y="30" x="28"/>
+					<Anchor point="TOPLEFT" relativeTo="$(parent)" relativePoint="TOPLEFT" offsetX="0" verticalAlignment="CENTER"/>
+				</Texture>
+				<Label name="$(parent)Bank" hidden="true" font="LeoAltholicLargeFont" verticalAlignment="CENTER">
+					<Dimensions x="70" y="32" />
+					<Anchor point="TOPLEFT" relativeTo="$(parent)BankSizeTexture" relativePoint="TOPRIGHT" offsetX="7"/>
+				</Label>
+<!--Teva added the section above-->
                 <Line name="$(parent)RidingLine" color="777777" hidden="true" thickness="2" pixelRoundingEnabled="true"/>
                 <Texture name="$(parent)RidingTexture" hidden="true" textureFile="/esoui/art/icons/servicetooltipicons/gamepad/gp_servicetooltipicon_stablemaster.dds">
                     <Dimensions y="32" x="32"/>
diff --git a/LeoAltholic_API.lua b/LeoAltholic_API.lua
index b1389a2..48c607a 100644
--- a/LeoAltholic_API.lua
+++ b/LeoAltholic_API.lua
@@ -73,6 +73,18 @@ function LeoAltholic.FormatTime(seconds, short, colorizeCountdown)
     else return '|cFF4020'..ZO_CachedStrFormat(GetString(formats.m), 0)..'|r' end
 end

+function LeoAltholic.TimeAgo(timestamp)
+    local diff = GetTimeStamp() - timestamp
+    if diff < 3600 then
+        ago = ZO_CachedStrFormat(GetString(SI_TIME_FORMAT_MINUTES), math.floor(diff / 60))
+    elseif diff < 3600 then
+        ago = ZO_CachedStrFormat(GetString(SI_TIME_FORMAT_HOURS), math.floor(diff / 3600))
+    else
+        ago = ZO_CachedStrFormat(GetString(SI_TIME_FORMAT_DAYS), math.floor(diff / 86400))
+    end
+    return ZO_CachedStrFormat(GetString(SI_TIME_DURATION_AGO), ago)
+end
+
 --[[
 Return if the craft is done for the day for the charName (if not specified, the current character is used)
 ]]
@@ -82,7 +94,8 @@ function LeoAltholic.IsWritDoneToday(craft, charName)
     if not char then return end
     for _, writ in pairs(char.quests.writs) do
         if craft == writ.craft then
-            return writ.lastDone ~= nil and LeoAltholic.IsAfterReset(writ.lastDone)
+--			return writ.lastDone ~= nil and LeoAltholic.IsAfterReset(writ.lastDone)	--original code, Teva added 2 conditions as shown on the next line
+			return writ.lastDone ~= nil and LeoAltholic.IsAfterReset(writ.lastDone) and writ.lastDone > writ.lastStarted and LeoAltholic.IsAfterReset(writ.lastStarted)
         end
     end
     return false
diff --git a/Settings.lua b/Settings.lua
index 2cf6a1a..bdee599 100644
--- a/Settings.lua
+++ b/Settings.lua
@@ -147,7 +147,7 @@ function LeoAltholic_Settings:CreatePanel()
 				},{
 					type = "checkbox",
 					name = GetString(SI_STAT_GAMEPAD_RIDING_HEADER_TRAINING),
-					default = true,
+					default = false,
 					disabled = function() return not LeoAltholicChecklistUI.IsEnabled() end,
 					width = "half",
 					getFunc = LeoAltholicChecklistUI.GetRiding,
@@ -169,11 +169,18 @@ function LeoAltholic_Settings:CreatePanel()
 		},{
 			type = "checkbox",
 			name = GetString(LEOALT_BUMP_COMPASS),
-			default = true,
+			default = false,
 			disabled = function() return not LeoAltholicToolbarUI.IsEnabled() end,
 			getFunc = LeoAltholicToolbarUI.GetBumpCompass,
 			setFunc = LeoAltholicToolbarUI.SetBumpCompass,
 		},{
+			type = "checkbox",
+			name = GetString(LEOALT_HIDE_DONE_WRIT),
+			default = false,
+			disabled = function() return not LeoAltholicToolbarUI.IsEnabled() end,
+			getFunc = LeoAltholicToolbarUI.GetHideDoneWrit,
+			setFunc = LeoAltholicToolbarUI.SetHideDoneWrit,
+		},{
 			type = "submenu",
 			name = GetString(LEOALT_ENTRIES),
 			controls = {
@@ -189,6 +196,18 @@ function LeoAltholic_Settings:CreatePanel()
 						LeoAltholicToolbarUI.RestorePosition()
 						LeoAltholicToolbarUI.update()
 					end,
+				},{	--Teva added this section
+					type = "checkbox",
+					name = GetString(SI_INTERACT_OPTION_BANK),
+					default = true,
+					disabled = function() return not LeoAltholicToolbarUI.IsEnabled() end,
+					width = "half",
+					getFunc = function() return LeoAltholicToolbarUI.GetItem(LeoAltholicToolbarUI.items.BANKSIZE) end,
+					setFunc = function(value)
+						LeoAltholicToolbarUI.SetItem(LeoAltholicToolbarUI.items.BANKSIZE, value)
+						LeoAltholicToolbarUI.RestorePosition()
+						LeoAltholicToolbarUI.update()
+					end,
 				},{
 					type = "checkbox",
 					name = GetString(SI_STAT_GAMEPAD_RIDING_HEADER_TRAINING),
@@ -215,13 +234,13 @@ function LeoAltholic_Settings:CreatePanel()
 					end,
 				},{
 					type = "checkbox",
-					name = GetString(LEOALT_CHECKLIST),
+					name = GetString(LEOALT_WRIT),
 					default = true,
 					disabled = function() return not LeoAltholicToolbarUI.IsEnabled() or not LeoAltholicChecklistUI.IsEnabled() end,
 					width = "half",
-					getFunc = function() return LeoAltholicToolbarUI.GetItem(LeoAltholicToolbarUI.items.CHECKLIST) end,
+					getFunc = function() return LeoAltholicToolbarUI.GetItem(LeoAltholicToolbarUI.items.WRITSTATUS) end,
 					setFunc = function(value)
-						LeoAltholicToolbarUI.SetItem(LeoAltholicToolbarUI.items.CHECKLIST, value)
+						LeoAltholicToolbarUI.SetItem(LeoAltholicToolbarUI.items.WRITSTATUS, value)
 						LeoAltholicToolbarUI.RestorePosition()
 						LeoAltholicToolbarUI.update()
 					end,
@@ -244,7 +263,7 @@ function LeoAltholic_Settings:CreatePanel()
 		},{
 			type = "checkbox",
 			name = GetString(LEOALT_AUTO_TRACK_DAILY),
-			default = false,
+			default = true,
 			getFunc = function() return LeoAltholic.globalData.settings.tracked.allDaily end,
 			setFunc = function(value)
 				LeoAltholic.globalData.settings.tracked.allDaily = value
diff --git a/ui/checklist.lua b/ui/checklist.lua
index a1e478e..6477406 100644
--- a/ui/checklist.lua
+++ b/ui/checklist.lua
@@ -1,123 +1,121 @@
-
 function LeoAltholicChecklistUI.normalizeSettings()
-    if not LeoAltholic.globalData.checklist then LeoAltholic.globalData.checklist = {} end
-    if not LeoAltholic.globalData.settings.checklist then LeoAltholic.globalData.settings.checklist = {} end
-    if not LeoAltholic.charData.settings.checklist then LeoAltholic.charData.settings.checklist = {} end
+	if not LeoAltholic.globalData.checklist then LeoAltholic.globalData.checklist = {} end
+	if not LeoAltholic.globalData.settings.checklist then LeoAltholic.globalData.settings.checklist = {} end
+	if not LeoAltholic.charData.settings.checklist then LeoAltholic.charData.settings.checklist = {} end
 end

 function LeoAltholicChecklistUI.SetPosition(left, top)
-    LeoAltholic.globalData.checklist.position = {
-        left = left,
-        top = top
-    }
+	LeoAltholic.globalData.checklist.position = {
+		left = left,
+		top = top
+	}
 end
 function LeoAltholicChecklistUI.GetPosition()
-    return LeoAltholic.globalData.checklist.position or { left = 100; top = 200; }
+	return LeoAltholic.globalData.checklist.position or { left = 950; top = 42; }	--TevaNOTE was: { left = 100; top = 200; }
 end

 function LeoAltholicChecklistUI.SetFontScale(value)
-    LeoAltholic.globalData.settings.checklist.fontScale = value
-    LeoAltholicChecklistUI.update()
+	LeoAltholic.globalData.settings.checklist.fontScale = value
+	LeoAltholicChecklistUI.update()
 end
 function LeoAltholicChecklistUI.GetFontScale()
-    return LeoAltholic.globalData.settings.checklist.fontScale or 100
+	return LeoAltholic.globalData.settings.checklist.fontScale or 100
 end
 function LeoAltholicChecklistUI.SetMinimized(value)
-    LeoAltholic.globalData.settings.checklist.minimized = value
-    LeoAltholicChecklistUI.update()
+	LeoAltholic.globalData.settings.checklist.minimized = value
+	LeoAltholicChecklistUI.update()
 end
 function LeoAltholicChecklistUI.IsMinimized()
-    if LeoAltholic.globalData.settings.checklist.minimized == nil then LeoAltholic.globalData.settings.checklist.minimized = false end
-    return LeoAltholic.globalData.settings.checklist.minimized
+	if LeoAltholic.globalData.settings.checklist.minimized == nil then LeoAltholic.globalData.settings.checklist.minimized = false end
+	return LeoAltholic.globalData.settings.checklist.minimized
 end
 function LeoAltholicChecklistUI.SetDisplayName(value)
-    LeoAltholic.globalData.settings.checklist.displayName = value
-    LeoAltholicChecklistUI.update()
+	LeoAltholic.globalData.settings.checklist.displayName = value
+	LeoAltholicChecklistUI.update()
 end
 function LeoAltholicChecklistUI.DisplayName()
-    if LeoAltholic.globalData.settings.checklist.displayName == nil then LeoAltholic.globalData.settings.checklist.displayName = true end
-    return LeoAltholic.globalData.settings.checklist.displayName
+	if LeoAltholic.globalData.settings.checklist.displayName == nil then LeoAltholic.globalData.settings.checklist.displayName = false end	--TevaNOTE: was true
+	return LeoAltholic.globalData.settings.checklist.displayName
 end
 function LeoAltholicChecklistUI.SetHideWhenToolbar(value)
-    LeoAltholic.globalData.settings.checklist.hideWhenToolbar = value
-    LeoAltholicChecklistUI.update()
+	LeoAltholic.globalData.settings.checklist.hideWhenToolbar = value
+	LeoAltholicChecklistUI.update()
 end
 function LeoAltholicChecklistUI.IsHideWhenToolbar()
-    if LeoAltholic.globalData.settings.checklist.hideWhenToolbar == nil then LeoAltholic.globalData.settings.checklist.hideWhenToolbar = false end
-    return LeoAltholic.globalData.settings.checklist.hideWhenToolbar
+	if LeoAltholic.globalData.settings.checklist.hideWhenToolbar == nil then LeoAltholic.globalData.settings.checklist.hideWhenToolbar = true end	--TevaNOTE: was false
+	return LeoAltholic.globalData.settings.checklist.hideWhenToolbar
 end

 function LeoAltholicChecklistUI.SetUpwards(value)
-    LeoAltholic.globalData.settings.checklist.upwards = value
-    LeoAltholicChecklistUI.update()
+	LeoAltholic.globalData.settings.checklist.upwards = value
+	LeoAltholicChecklistUI.update()
 end
 function LeoAltholicChecklistUI.IsUpwards()
-    return LeoAltholic.globalData.settings.checklist.upwards or false
+	return LeoAltholic.globalData.settings.checklist.upwards or false
 end

 function LeoAltholicChecklistUI.SetEnabled(value)
-    LeoAltholic.charData.settings.checklist.enabled = value
-    LeoAltholicChecklistUI.RestorePosition()
+	LeoAltholic.charData.settings.checklist.enabled = value
+	LeoAltholicChecklistUI.RestorePosition()
 end
 function LeoAltholicChecklistUI.IsEnabled()
-    if LeoAltholic.charData.settings.checklist.enabled == nil then LeoAltholic.charData.settings.checklist.enabled = true end
-    return LeoAltholic.charData.settings.checklist.enabled
+	if LeoAltholic.charData.settings.checklist.enabled == nil then LeoAltholic.charData.settings.checklist.enabled = true end
+	return LeoAltholic.charData.settings.checklist.enabled
 end

 function LeoAltholicChecklistUI.SetCraft(craft, value)
-    if not LeoAltholic.charData.settings.checklist.craft then LeoAltholic.charData.settings.checklist.craft = {} end
-    LeoAltholic.charData.settings.checklist.craft[craft] = value
-    LeoAltholicChecklistUI.update()
+	if not LeoAltholic.charData.settings.checklist.craft then LeoAltholic.charData.settings.checklist.craft = {} end
+	LeoAltholic.charData.settings.checklist.craft[craft] = value
+	LeoAltholicChecklistUI.update()
 end
 function LeoAltholicChecklistUI.GetCraft(craft)
-    if not LeoAltholic.charData.settings.checklist.craft then LeoAltholic.charData.settings.checklist.craft = {} end
-    return LeoAltholic.charData.settings.checklist.craft[craft]
+	if not LeoAltholic.charData.settings.checklist.craft then LeoAltholic.charData.settings.checklist.craft = {} end
+	return LeoAltholic.charData.settings.checklist.craft[craft]
 end
 function LeoAltholicChecklistUI.SetRiding(value)
-    LeoAltholic.charData.settings.checklist.riding = value
-    LeoAltholicChecklistUI.update()
+	LeoAltholic.charData.settings.checklist.riding = value
+	LeoAltholicChecklistUI.update()
 end
 function LeoAltholicChecklistUI.GetRiding()
-    if LeoAltholic.charData.settings.checklist.riding == nil then LeoAltholic.charData.settings.checklist.riding = true end
-    local char = LeoAltholic.GetMyself()
-    return LeoAltholic.charData.settings.checklist.riding and
-        (char.attributes.riding.speed < char.attributes.riding.speedMax or
-        char.attributes.riding.stamina < char.attributes.riding.staminaMax or
-        char.attributes.riding.capacity < char.attributes.riding.capacityMax)
+	if LeoAltholic.charData.settings.checklist.riding == nil then LeoAltholic.charData.settings.checklist.riding = true end
+	local char = LeoAltholic.GetMyself()
+	return LeoAltholic.charData.settings.checklist.riding and
+		(char.attributes.riding.speed < char.attributes.riding.speedMax or
+		char.attributes.riding.stamina < char.attributes.riding.staminaMax or
+		char.attributes.riding.capacity < char.attributes.riding.capacityMax)
 end

-
 function LeoAltholicChecklistUI.OnWindowMoveStop()
-    LeoAltholicChecklistUI.SetPosition(LeoAltholicChecklist:GetLeft(), LeoAltholicChecklist:GetTop())
+	LeoAltholicChecklistUI.SetPosition(LeoAltholicChecklist:GetLeft(), LeoAltholicChecklist:GetTop())
 end

 function LeoAltholicChecklistUI.ToggleUI()
-    if not LeoAltholicChecklistUI.IsEnabled() then return end
-    LeoAltholicChecklist:SetHidden(not LeoAltholicChecklist:IsHidden())
+	if not LeoAltholicChecklistUI.IsEnabled() then return end
+	LeoAltholicChecklist:SetHidden(not LeoAltholicChecklist:IsHidden())
 end

 function LeoAltholicChecklistUI.ShowUI()
-    if not LeoAltholicChecklistUI.IsEnabled() then return end
-    LeoAltholicChecklist:SetHidden(false)
+	if not LeoAltholicChecklistUI.IsEnabled() then return end
+	LeoAltholicChecklist:SetHidden(false)
 end

 function LeoAltholicChecklistUI.RestorePosition()
-    local position = LeoAltholicChecklistUI.GetPosition()
-    local left = position.left
-    local top = position.top
-
-    LeoAltholicChecklist:ClearAnchors()
-    LeoAltholicChecklist:SetAnchor(TOPLEFT, GuiRoot, TOPLEFT, left, top)
-    if LeoAltholicChecklistUI.IsEnabled() and not LeoAltholicChecklistUI.IsHideWhenToolbar() then
-        if not LeoAltholicChecklistUI.checkAllDone() then
-            LeoAltholicChecklist:SetHidden(false)
-            if LeoAltholicChecklistUI.IsMinimized() then
-                LeoAltholicChecklistUI.MinimizeUI()
-            end
-        end
-    else
-        LeoAltholicChecklist:SetHidden(true)
-    end
+	local position = LeoAltholicChecklistUI.GetPosition()
+	local left = position.left
+	local top = position.top
+	LeoAltholicChecklist:ClearAnchors()
+	LeoAltholicChecklist:SetAnchor(TOPLEFT, GuiRoot, TOPLEFT, left, top)
+	if LeoAltholicChecklistUI.IsEnabled() and not LeoAltholicChecklistUI.IsHideWhenToolbar() then
+		if not LeoAltholicChecklistUI.checkAllDone() then	--added by Teva
+			LeoAltholicChecklist:SetHidden(false)
+			LeoAltholicChecklistUI.MaximizeUI()
+		else
+			LeoAltholicChecklist:SetHidden(false)
+			LeoAltholicChecklistUI.MinimizeUI()
+		end
+	else
+		LeoAltholicChecklist:SetHidden(true)
+	end
 end

 local SPACE = 34
@@ -129,294 +127,357 @@ local checklistSavedTop = 0
 local lastChecklist = GetTimeStamp()

 function LeoAltholicChecklistUI.MinimizeUI()
-    if not LeoAltholicChecklistUI.IsEnabled() then return end
-
-    checklistSavedTop = checklist:GetTop()
-
-    local header = GetControl(checklist, "BGHeader")
-    local headerHeight = header:GetHeight()
-    local headerTop = header:GetTop()
-    local headerBottom = header:GetBottom()
+	if not LeoAltholicChecklistUI.IsEnabled() then return end
+	checklistSavedTop = checklist:GetTop()
+	local header = GetControl(checklist, "BGHeader")
+	local headerHeight = header:GetHeight()
+	local headerTop = header:GetTop()
+	local headerBottom = header:GetBottom()

-    panel:SetHidden(true)
-    LeoAltholicChecklistMinButton:SetHidden(true)
-    LeoAltholicChecklistMaxButton:SetHidden(false)
+	panel:SetHidden(true)
+	LeoAltholicChecklistMinButton:SetHidden(true)
+	LeoAltholicChecklistMaxButton:SetHidden(false)

-    checklist:SetHeight(headerHeight)
-    checklist:ClearAnchors()
+	checklist:SetHeight(headerHeight)
+--	checklist:ClearAnchors()

-    if LeoAltholicChecklistUI.IsUpwards() then
-        checklist:SetAnchor(BOTTOMLEFT, GuiRoot, TOPLEFT, checklist:GetLeft(), headerBottom)
-    else
-        checklist:SetAnchor(TOPLEFT, GuiRoot, TOPLEFT, checklist:GetLeft(), headerTop)
-    end
+	if LeoAltholicChecklistUI.IsUpwards() then
+		checklist:SetAnchor(BOTTOMLEFT, GuiRoot, TOPLEFT, checklist:GetLeft(), headerBottom)
+	else
+		checklist:SetAnchor(TOPLEFT, GuiRoot, TOPLEFT, checklist:GetLeft(), headerTop)
+	end

-    LeoAltholicChecklistUI.SetMinimized(true)
+	LeoAltholicChecklistUI.SetMinimized(true)
 end

 function LeoAltholicChecklistUI.MaximizeUI()
-    if not LeoAltholicChecklistUI.IsEnabled() then return end
+	if not LeoAltholicChecklistUI.IsEnabled() then return end
+	panel:SetHidden(false)
+	LeoAltholicChecklistMinButton:SetHidden(false)
+	LeoAltholicChecklistMaxButton:SetHidden(true)

-    panel:SetHidden(false)
-    LeoAltholicChecklistMinButton:SetHidden(false)
-    LeoAltholicChecklistMaxButton:SetHidden(true)
+--	checklist:ClearAnchors()
+--	checklist:SetAnchor(TOPLEFT, GuiRoot, TOPLEFT, checklist:GetLeft(), checklistSavedTop)
+	checklist:SetHeight(checklistHeight)

-    checklist:ClearAnchors()
-    checklist:SetAnchor(TOPLEFT, GuiRoot, TOPLEFT, checklist:GetLeft(), checklistSavedTop)
-    checklist:SetHeight(checklistHeight)
-
-    LeoAltholicChecklistUI.SetMinimized(false)
+	LeoAltholicChecklistUI.SetMinimized(false)
 end

 local function createItem(label, labelText, texture, craftIcon, canShow)
-    if canShow == true then
-        texture:SetTexture("esoui/art/buttons/decline_up.dds")
-        texture:SetColor(1,0,0,1)
-        texture:SetDimensions(32, 32)
-        texture:SetAnchor(TOPLEFT, panel, TOPLEFT, 10, height)
-        texture.tooltip = "Quest not started"
-
-        local scaledSpace = SPACE * (LeoAltholicChecklistUI.GetFontScale() / 100)
-        height = height + scaledSpace
-        if LeoAltholicChecklistUI.DisplayName() then
-            label:SetText(labelText)
-            label:SetHidden(false)
-            craftIcon:SetHidden(true)
-        else
-            craftIcon:SetHidden(false)
-            label:SetHidden(true)
-        end
-        texture:SetHidden(false)
-    else
-        label:SetHidden(true)
-        texture:SetHidden(true)
-        craftIcon:SetHidden(true)
-    end
+	if canShow == true then
+--Teva changed lines below
+		texture:SetTexture("esoui/art/buttons/decline_up.dds")
+		texture.tooltip = "Never Done or Needs /reloadUI"
+--		texture:SetColor(1,0,0,1) --red
+--Teva changed lines above
+		texture:SetDimensions(32, 32)
+		texture:SetAnchor(TOPLEFT, panel, TOPLEFT, 10, height)
+		local scaledSpace = SPACE * (LeoAltholicChecklistUI.GetFontScale() / 100)
+		height = height + scaledSpace
+		if LeoAltholicChecklistUI.DisplayName() then
+			label:SetText(labelText)
+			label:SetHidden(false)
+			craftIcon:SetHidden(true)
+		else
+			craftIcon:SetHidden(false)
+			label:SetHidden(true)
+		end
+		texture:SetHidden(false)
+	else
+		label:SetHidden(true)
+		texture:SetHidden(true)
+		craftIcon:SetHidden(true)
+	end
 end

 function LeoAltholicChecklistUI.checkReset()
-    if LeoAltholic.IsBeforeReset(lastChecklist) then
-        LeoAltholicChecklistUI.update()
-        lastChecklist = GetTimeStamp()
-    end
+	if LeoAltholic.IsBeforeReset(lastChecklist) then
+		LeoAltholicChecklistUI.update()
+		lastChecklist = GetTimeStamp()
+	end
 end

-local function doneItem(label, texture)
-    texture:SetTexture("esoui/art/loot/loot_finesseItem.dds")
-    texture:SetColor(0,1,0,1)
-    texture.tooltip = GetString(SI_ACHIEVEMENTS_TOOLTIP_COMPLETE)
+local function doneItem(label, texture)	--Teva changed these settings
+	texture:SetTexture("esoui/art/cadwell/checkboxicon_checked.dds")	--("esoui/art/buttons/checkbox_checked.dds") --("esoui/art/loot/loot_finesseItem.dds")
+	texture:SetColor(0.7,0.7,0.7,1) --now gray instead of green(0,1,0,1)
+	texture.tooltip = "Done for Today"	--TevaNOTE: consider labeling as "Delivered, /reloadUI to check if new writ may be available" after was GetString(SI_ACHIEVEMENTS_TOOLTIP_COMPLETE)
 end

-local function startItem(label, texture)
-    texture:SetTexture("esoui/art/buttons/pointsminus_up.dds")
-    texture:SetColor(1,1,1,1)
-    texture.tooltip = "Quest Started"
+local function writdoneItem(label, texture)	--Teva added this function
+	texture:SetTexture("esoui/art/buttons/checkbox_checked.dds")		--("esoui/art/cadwell/checkboxicon_checked.dds")	--("esoui/art/cadwell/checkboxicon_unchecked.dds") --("esoui/art/buttons/decline_up.dds")
+	texture:SetColor(1,1,1,1)			--TevaNOTE: was (1,0,0,1) --red
+	texture.tooltip = "Quest Completed, /reloadUI or look to toolbar to see if Today's Writ may be available"
+end				--Teva added this function
+
+local function betweenItem(label, texture)	--Teva added this function
+	texture:SetTexture("esoui/art/cadwell/checkboxicon_unchecked.dds") --("esoui/art/buttons/decline_up.dds")
+	texture:SetColor(1,0,0,1) --red
+	texture.tooltip = "Need Today's Writ"
+end	--eof added by Teva
+
+local function startItem(label, texture)	--Teva changed these settings
+	texture:SetTexture("esoui/art/buttons/pointsminus_up.dds")
+	texture:SetColor(1,0.5,0,1) --now orange instead of white(1,1,1,1)
+	texture.tooltip = "Have Quest, No Progress"
 end

-local function updateItem(label, texture)
-    texture:SetTexture("esoui/art/buttons/pointsplus_up.dds")
-    texture:SetColor(1,0.9,0,1)
-    texture.tooltip = "Quest Updated"
+local function updateItem(label, texture)	--Teva changed these settings
+	texture:SetTexture("esoui/art/buttons/pointsplus_up.dds")
+	texture:SetColor(1,1,0,1) --now yellow instead of darkyellow(1,0.9,0,1)
+	texture.tooltip = "Partially Complete"
 end

-local function preDeliverItem(label, texture)
-    texture:SetTexture("esoui/art/loot/loot_finesseItem.dds")
-    texture:SetColor(1,1,0,1)
-    texture.tooltip = "Ready for deliver"
+local function preDeliverItem(label, texture)	--Teva changed these settings
+	texture:SetTexture("esoui/art/loot/loot_finesseItem.dds") --("esoui/art/buttons/decline_up.dds" or "esoui/art/loot/loot_finesseItem.dds")
+	texture:SetColor(0,1,0,1) --now green instead of yellow(1,1,0,1)
+	texture.tooltip = "Ready for Delivery"
 end

-local function stoppedItem(label, texture)
-    texture:SetTexture("esoui/art/buttons/decline_up.dds")
-    texture:SetColor(1,0,0,1)
-    texture.tooltip = "Quest Deleted"
+local function stoppedItem(label, texture)	--Teva changed these settings
+	texture:SetTexture("esoui/art/buttons/decline_up.dds")
+	texture:SetColor(1,0,0,1) --red
+	texture.tooltip = "Quest Abandoned"
 end

 function LeoAltholicChecklistUI.checkAllDone()
-    local char = LeoAltholic.GetMyself()
-
-    for _, craft in pairs(LeoAltholic.allCrafts) do
-        if LeoAltholicChecklistUI.GetCraft(craft) then
-            for _, writ in pairs(char.quests.writs) do
-                if craft == writ.craft then
-                    if writ.lastDone == nil or not LeoAltholic.IsAfterReset(writ.lastDone) then return false end
-                end
-            end
-        end
-    end
-    if LeoAltholicChecklistUI.GetRiding() and char.attributes.riding.time - GetTimeStamp() < 0 then
-        return false
-    end
-    LeoAltholicChecklist:SetHidden(true)
-    return true
+	local char = LeoAltholic.GetMyself()
+
+	for _, craft in pairs(LeoAltholic.allCrafts) do
+		if LeoAltholicChecklistUI.GetCraft(craft) then
+			for _, writ in pairs(char.quests.writs) do
+				if craft == writ.craft then
+--					if writ.lastDone == nil or not LeoAltholic.IsAfterReset(writ.lastDone) then return false end
+--next section modified by Teva to add more conditions
+					if writ.lastDone == nil or writ.lastStarted == nil then
+						return false
+					elseif LeoAltholic.IsBeforeReset(writ.lastStarted) then
+						return false
+					elseif LeoAltholic.IsBeforeReset(writ.lastDone) then
+						return false
+					elseif writ.lastDone < writ.lastStarted then
+						return false
+					end
+--end Teva's mods
+				end
+			end
+		end
+	end
+	if LeoAltholicChecklistUI.GetRiding() and char.attributes.riding.time - GetTimeStamp() < 0 then
+		return false
+	end
+--	LeoAltholicChecklist:SetHidden(true)
+	return true
 end

 function LeoAltholicChecklistUI.doneWrit(craft)
-    if not LeoAltholicChecklistUI.IsEnabled() then return end
-
-    local label = GetControl(panel, "Craft"..craft)
-    local texture = GetControl(panel, "Craft"..craft.."Status")
-    doneItem(label, texture)
-    LeoAltholicChecklistUI.checkAllDone()
+	lastUpdated = nil
+	lastPreDeliver = nil
+--TevaNOTE: above lines added by Teva
+	if not LeoAltholicChecklistUI.IsEnabled() then return end
+	local label = GetControl(panel, "Craft"..craft)
+	local texture = GetControl(panel, "Craft"..craft.."Status")
+	writdoneItem(label, texture)		--TevaNOTE: was doneItem but was always saying that instead of between, so modified to at least warn it might be wrong
+	LeoAltholicChecklistUI.checkAllDone()
+	if LeoAltholicChecklistUI.checkAllDone() then LeoAltholicChecklistUI.MinimizeUI() end
+	LeoAltholicChecklistUI.update()	--TevaNOTE: this line may be the key to solving the between/done issue in the checklist!
+end
+
+function LeoAltholicChecklistUI.betweenWrit(craft) --Teva added this function
+	lastUpdated = nil
+	lastPreDeliver = nil
+	if not LeoAltholicChecklistUI.IsEnabled() then return end
+	local label = GetControl(panel, "Craft"..craft)
+	local texture = GetControl(panel, "Craft"..craft.."Status")
+	betweenItem(label, texture)
 end

 function LeoAltholicChecklistUI.startedWrit(craft)
-    if not LeoAltholicChecklistUI.IsEnabled() then return end
-
-    local label = GetControl(panel, "Craft"..craft)
-    local texture = GetControl(panel, "Craft"..craft.."Status")
-    startItem(label, texture)
+	if not LeoAltholicChecklistUI.IsEnabled() then return end
+	local label = GetControl(panel, "Craft"..craft)
+	local texture = GetControl(panel, "Craft"..craft.."Status")
+	startItem(label, texture)
 end

 function LeoAltholicChecklistUI.updateWrit(craft)
-    if not LeoAltholicChecklistUI.IsEnabled() then return end
-
-    local label = GetControl(panel, "Craft"..craft)
-    local texture = GetControl(panel, "Craft"..craft.."Status")
-    updateItem(label, texture)
+	if not LeoAltholicChecklistUI.IsEnabled() then return end
+	local label = GetControl(panel, "Craft"..craft)
+	local texture = GetControl(panel, "Craft"..craft.."Status")
+	updateItem(label, texture)
 end

 function LeoAltholicChecklistUI.preDeliverWrit(craft)
-    if not LeoAltholicChecklistUI.IsEnabled() then return end
-
-    local label = GetControl(panel, "Craft"..craft)
-    local texture = GetControl(panel, "Craft"..craft.."Status")
-    preDeliverItem(label, texture)
+	if not LeoAltholicChecklistUI.IsEnabled() then return end
+	local label = GetControl(panel, "Craft"..craft)
+	local texture = GetControl(panel, "Craft"..craft.."Status")
+	preDeliverItem(label, texture)
 end

 function LeoAltholicChecklistUI.stoppedWrit(craft)
-    if not LeoAltholicChecklistUI.IsEnabled() then return end
-
-    local label = GetControl(panel, "Craft"..craft)
-    local texture = GetControl(panel, "Craft"..craft.."Status")
-    stoppedItem(label, texture)
+	lastStarted = nil
+	lastUpdated = nil
+	lastPreDeliver = nil
+--TevaNOTE: above lines added by Teva
+	if not LeoAltholicChecklistUI.IsEnabled() then return end
+	local label = GetControl(panel, "Craft"..craft)
+	local texture = GetControl(panel, "Craft"..craft.."Status")
+	stoppedItem(label, texture)
 end

 function LeoAltholicChecklistUI.doneRiding()
-    if not LeoAltholicChecklistUI.IsEnabled() then return end
-
-    local label = GetControl(panel, "Riding")
-    local texture = GetControl(panel, "RidingStatus")
-    doneItem(label, texture)
+	if not LeoAltholicChecklistUI.IsEnabled() then return end
+	local label = GetControl(panel, "Riding")
+	local texture = GetControl(panel, "RidingStatus")
+	doneItem(label, texture)
 end

 function LeoAltholicChecklistUI.initializeQuests()
-    for i,trackedQuest in pairs(LeoAltholic.globalData.CharList[LeoAltholic.CharName].quests.writs) do
-        for questIndex = 1, MAX_JOURNAL_QUESTS do
-            if IsValidQuestIndex(questIndex) and GetJournalQuestName(questIndex) == trackedQuest.name then
-
-                LeoAltholic.globalData.CharList[LeoAltholic.CharName].quests.writs[i].questIndex = questIndex
-                LeoAltholic.globalData.CharList[LeoAltholic.CharName].quests.writs[i].lastStarted = GetTimeStamp()
-                LeoAltholic.globalData.CharList[LeoAltholic.CharName].quests.writs[i].lastPreDeliver = nil
-                LeoAltholic.globalData.CharList[LeoAltholic.CharName].quests.writs[i].lastUpdated = nil
-                LeoAltholicChecklistUI.startedWrit(trackedQuest.craft)
-
-                local hasUpdated = false
-                local numConditions = GetJournalQuestNumConditions(questIndex, QUEST_MAIN_STEP_INDEX)
-                for condition = 1, numConditions do
-                    local current, max =  GetJournalQuestConditionValues(questIndex, QUEST_MAIN_STEP_INDEX, condition)
-                    if hasUpdated == false and current > 0 then
-                        hasUpdated = true
-                    end
-                    local condText = GetJournalQuestConditionInfo(questIndex, QUEST_MAIN_STEP_INDEX, condition)
-                    if string.find(condText, GetString(LEOALT_DELIVER)) then
-                        LeoAltholic.globalData.CharList[LeoAltholic.CharName].quests.writs[i].lastPreDeliver = GetTimeStamp()
-                        LeoAltholicChecklistUI.preDeliverWrit(trackedQuest.craft)
-                        break
-                    end
-                end
-                if hasUpdated then
-                    LeoAltholic.globalData.CharList[LeoAltholic.CharName].quests.writs[i].lastUpdated = GetTimeStamp()
-                    LeoAltholicChecklistUI.updateWrit(trackedQuest.craft)
-                end
-                break
-            end
-        end
-    end
+	for i,trackedQuest in pairs(LeoAltholic.globalData.CharList[LeoAltholic.CharName].quests.writs) do
+		for questIndex = 1, MAX_JOURNAL_QUESTS do
+			if IsValidQuestIndex(questIndex) and GetJournalQuestName(questIndex) == trackedQuest.name then
+				if LeoAltholic.globalData.CharList[LeoAltholic.CharName].quests.writs[i].lastStarted == nil then
+					LeoAltholic.globalData.CharList[LeoAltholic.CharName].quests.writs[i].questIndex = questIndex
+					LeoAltholic.globalData.CharList[LeoAltholic.CharName].quests.writs[i].lastPreDeliver = nil
+					LeoAltholic.globalData.CharList[LeoAltholic.CharName].quests.writs[i].lastUpdated = nil
+					LeoAltholic.globalData.CharList[LeoAltholic.CharName].quests.writs[i].lastStarted = GetTimeStamp()	--TevaNOTE: had this commented out earlier, consider again if between becomes broken
+--TevaNOTE: nest these above lines in an if or move the line above that is commented out here to where it only happens at the start of the quest, this function is called in initialize() onAddonLoaded
+				end
+				LeoAltholicChecklistUI.startedWrit(trackedQuest.craft)
+
+				local hasUpdated = false
+				local numConditions = GetJournalQuestNumConditions(questIndex, QUEST_MAIN_STEP_INDEX)
+				for condition = 1, numConditions do
+					local current, max =  GetJournalQuestConditionValues(questIndex, QUEST_MAIN_STEP_INDEX, condition)
+					if hasUpdated == false and current > 0 then hasUpdated = true end
+					local condText = GetJournalQuestConditionInfo(questIndex, QUEST_MAIN_STEP_INDEX, condition)
+					if string.find(condText, GetString(LEOALT_DELIVER)) then
+						LeoAltholic.globalData.CharList[LeoAltholic.CharName].quests.writs[i].lastPreDeliver = GetTimeStamp()
+						LeoAltholicChecklistUI.preDeliverWrit(trackedQuest.craft)
+						break
+					end
+				end
+				if hasUpdated then
+					LeoAltholic.globalData.CharList[LeoAltholic.CharName].quests.writs[i].lastUpdated = GetTimeStamp()
+					LeoAltholicChecklistUI.updateWrit(trackedQuest.craft)
+				end
+				break
+			end
+		end
+		if not isDone then LeoAltholicChecklistUI.MaximizeUI() end		--Teva added this function here
+	end
 end

 function LeoAltholicChecklistUI.update()
-
-    if not LeoAltholicChecklistUI.IsEnabled() then return end
-
-    local char = LeoAltholic.GetMyself()
-
-    local texture, label, craftIcon
-
-    height = 0
-
-    local scale = LeoAltholicChecklistUI.GetFontScale() / 100
-
-    for _, craft in pairs(LeoAltholic.allCrafts) do
-        label = GetControl(panel, "Craft"..craft)
-        craftIcon = GetControl(panel, "Craft"..craft.."Icon")
-        texture = GetControl(panel, "Craft"..craft.."Status")
-
-        local isDone = false
-        local isPreDeliver = false
-        local isUpdated = false
-        local isStarted = false
-        for _, writ in pairs(char.quests.writs) do
-            if craft == writ.craft then
-                if writ.lastDone ~= nil and LeoAltholic.IsAfterReset(writ.lastDone) then
-                    isDone = true
-                elseif writ.lastPreDeliver ~= nil and LeoAltholic.IsAfterReset(writ.lastPreDeliver) then
-                    isPreDeliver = true
-                elseif writ.lastUpdated ~= nil and LeoAltholic.IsAfterReset(writ.lastUpdated) then
-                    isUpdated = true
-                elseif writ.lastStarted ~= nil and LeoAltholic.IsAfterReset(writ.lastStarted) then
-                    isStarted = true
-                end
-            end
-        end
-
-        local canShow = LeoAltholicChecklistUI.GetCraft(craft)
-
-        createItem(label, ZO_CachedStrFormat(SI_ABILITY_NAME, ZO_GetCraftingSkillName(craft)), texture, craftIcon, canShow)
-        if canShow then
-            if isDone then
-                doneItem(label, texture)
-                LeoAltholicChecklistUI.checkAllDone()
-            elseif isPreDeliver then
-                preDeliverItem(label, texture)
-            elseif isUpdated then
-                updateItem(label, texture)
-            elseif isStarted then
-                startItem(label, texture)
-            end
-        end
-    end
-
-    label = GetControl(panel, "Riding")
-    label:SetColor(1,1,1,1)
-    texture = GetControl(panel, "RidingStatus")
-    craftIcon = GetControl(panel, "RidingIcon")
-    createItem(label, GetString(SI_STAT_GAMEPAD_RIDING_HEADER_TRAINING), texture, craftIcon, LeoAltholicChecklistUI.GetRiding())
-    if char.attributes.riding.time - GetTimeStamp() > 0 then
-        doneItem(label, texture)
-        LeoAltholicChecklistUI.checkAllDone()
-    end
-
-    checklistHeight = height + 2*(100 - LeoAltholicChecklistUI.GetFontScale())
-    checklist:SetHeight(checklistHeight)
-    panel:SetHeight(checklistHeight)
-    panel:ClearAnchors()
-    local header = GetControl(checklist, "BGHeader")
-    header:ClearAnchors()
-    if LeoAltholicChecklistUI.IsUpwards() then
-        header:SetAnchor(BOTTOMLEFT, checklist, BOTTOMLEFT, 0, 0)
-        panel:SetAnchor(BOTTOMLEFT, header, TOPLEFT, 0, 2)
-    else
-        header:SetAnchor(TOPLEFT, checklist, TOPLEFT, 0, 0)
-        panel:SetAnchor(TOPLEFT, header, BOTTOMLEFT, 0, 2)
-    end
-
-    local width = 200
-    if not LeoAltholicChecklistUI.DisplayName() then
-        width = 120
-    end
-    checklist:SetWidth(width)
-    panel:SetWidth(width)
-    header:SetWidth(width)
-
-    checklist:SetScale(scale)
+	if not LeoAltholicChecklistUI.IsEnabled() then return end
+	local char = LeoAltholic.GetMyself()
+	local texture, label, craftIcon
+	height = 0
+	local scale = LeoAltholicChecklistUI.GetFontScale() / 100
+	for _, craft in pairs(LeoAltholic.allCrafts) do
+		label = GetControl(panel, "Craft"..craft)
+		craftIcon = GetControl(panel, "Craft"..craft.."Icon")
+		texture = GetControl(panel, "Craft"..craft.."Status")
+		local isDone = false
+		local isBetween = false
+		local isPreDeliver = false
+		local isUpdated = false
+		local isStarted = false
+		for _, writ in pairs(char.quests.writs) do
+			if craft == writ.craft then
+				if writ.lastStarted ~= nil then
+					if writ.lastDone ~= nil and writ.lastDone > writ.lastStarted then
+						if LeoAltholic.IsBeforeReset(writ.lastStarted) then	--
+							isBetween = true			--Status: Need Today's Writ, completed old writ
+						--	icon:SetColor(1,0,0,1)		--red
+						elseif LeoAltholic.IsAfterReset(writ.lastStarted) then		--
+							isDone = true				--Status: Done for Today	--
+						--	icon:SetColor(1,1,1,1)		--Teva added this line to make icons white when complete
+						end															--
+					elseif writ.lastPreDeliver ~= nil then
+						isPreDeliver = true			--Status: Ready to Deliver
+					--	icon:SetColor(0,1,0,1)		--now green, was yellow(1,1,0,1)
+					elseif writ.lastUpdated ~= nil then
+						isUpdated = true
+					--	icon:SetColor(1,1,0,1)		--now yellow, was darkyellow(1,0.8,0,1)
+					else	--if writ.lastStarted ~= nil then
+						isStarted = true			--Status: Quest Acquired, No Progress
+					--	icon:SetColor(1,0.5,0,1)	--now orange,was???(0.8,0.8,0.8,1)
+					end
+				else	--if writ.lastStarted == nil then
+					texture:SetTexture("esoui/art/cadwell/checkboxicon_unchecked.dds")
+					texture:SetColor(1,0,0,1) --red
+					texture.tooltip = "Not Started While this Addon was active"
+				end
+			end
+		end
+		local canShow = LeoAltholicChecklistUI.GetCraft(craft)
+		createItem(label, ZO_CachedStrFormat(SI_ABILITY_NAME, ZO_GetCraftingSkillName(craft)), texture, craftIcon, canShow)
+		if canShow == true then
+			if isDone then
+				doneItem(label, texture)
+				LeoAltholicChecklistUI.checkAllDone()
+			elseif isBetween then	--Teva added the isBetween condition and effects
+				betweenItem(label, texture)
+			elseif isPreDeliver then
+				preDeliverItem(label, texture)
+			elseif isUpdated then
+				updateItem(label, texture)
+			elseif isStarted then
+				startItem(label, texture)
+			else
+				texture:SetTexture("esoui/art/buttons/decline_up.dds")
+				texture.tooltip = "Never Done or Needs Reload UI"
+				--texture:SetColor(1,0,0,1) --red
+			end
+--[[--
+			if isStarted then
+				startItem(label, texture)
+			elseif isUpdated then
+				updateItem(label, texture)
+			elseif isPreDeliver then
+				preDeliverItem(label, texture)
+			elseif isBetween then	--Teva added isBetween condition and effects
+				betweenItem(label, texture)
+			elseif isDone then
+				doneItem(label, texture)
+--				LeoAltholicChecklistUI.checkAllDone()
+			else
+				texture:SetTexture("esoui/art/buttons/decline_up.dds")
+				texture.tooltip = "Never Done or Needs Reload UI"
+				--texture:SetColor(1,0,0,1) --red
+			end
+--]]--
+		end
+	end
+
+	label = GetControl(panel, "Riding")
+	label:SetColor(1,1,1,1)
+	texture = GetControl(panel, "RidingStatus")
+	craftIcon = GetControl(panel, "RidingIcon")
+	createItem(label, GetString(SI_STAT_GAMEPAD_RIDING_HEADER_TRAINING), texture, craftIcon, LeoAltholicChecklistUI.GetRiding())
+	if char.attributes.riding.time - GetTimeStamp() > 0 then
+		doneItem(label, texture)
+		LeoAltholicChecklistUI.checkAllDone()
+	end
+	checklistHeight = height + 2*(100 - LeoAltholicChecklistUI.GetFontScale())
+	checklist:SetHeight(checklistHeight)
+	panel:SetHeight(checklistHeight)
+	panel:ClearAnchors()
+	local header = GetControl(checklist, "BGHeader")
+	header:ClearAnchors()
+	if LeoAltholicChecklistUI.IsUpwards() then
+		header:SetAnchor(BOTTOMLEFT, checklist, BOTTOMLEFT, 0, 0)
+		panel:SetAnchor(BOTTOMLEFT, header, TOPLEFT, 0, 2)
+	else
+		header:SetAnchor(TOPLEFT, checklist, TOPLEFT, 0, 0)
+		panel:SetAnchor(TOPLEFT, header, BOTTOMLEFT, 0, 2)
+	end
+
+	local width = 200
+	if not LeoAltholicChecklistUI.DisplayName() then
+		width = 120
+	end
+	checklist:SetWidth(width)
+	panel:SetWidth(width)
+	header:SetWidth(width)
+	checklist:SetScale(scale)
 end
diff --git a/ui/toolbar.lua b/ui/toolbar.lua
index 31814fd..164f97d 100644
--- a/ui/toolbar.lua
+++ b/ui/toolbar.lua
@@ -1,209 +1,302 @@

 LeoAltholicToolbarUI.items = {
-    INVENTORY = 1,
-    RIDING = 2,
-    RESEARCH = 3,
-    CHECKLIST = 4
+	INVENTORY = 1,
+	BANKSIZE = 2,
+	WRITSTATUS = 3,
+	RESEARCH = 4,
+	RIDING = 5
 }

 function LeoAltholicToolbarUI.normalizeSettings()
-    if not LeoAltholic.globalData.toolbar then LeoAltholic.globalData.toolbar = {} end
-    if not LeoAltholic.globalData.settings.toolbar then LeoAltholic.globalData.settings.toolbar = {} end
+	if not LeoAltholic.globalData.toolbar then LeoAltholic.globalData.toolbar = {} end
+	if not LeoAltholic.globalData.settings.toolbar then LeoAltholic.globalData.settings.toolbar = {} end
 end

 function LeoAltholicToolbarUI.SetPosition(left, top)
-    LeoAltholic.globalData.toolbar.position = {
-        left = left,
-        top = top
-    }
+	LeoAltholic.globalData.toolbar.position = {
+		left = left,
+		top = top
+	}
 end
 function LeoAltholicToolbarUI.GetPosition()
-    return LeoAltholic.globalData.toolbar.position or { left = 100; top = 200; }
+--	return LeoAltholic.globalData.toolbar.position or	{ left = 100; top = 200; }		--original code
+	return LeoAltholic.globalData.toolbar.position or	{ left = 1200; top = 1580; }	--Teva's mod to personalize position for all accounts
 end

 function LeoAltholicToolbarUI.SetEnabled(value)
-    LeoAltholic.globalData.settings.toolbar.enabled = value
-    LeoAltholicToolbarUI.RestorePosition()
+	LeoAltholic.globalData.settings.toolbar.enabled = value
+	LeoAltholicToolbarUI.RestorePosition()
 end
 function LeoAltholicToolbarUI.IsEnabled()
-    if LeoAltholic.globalData.settings.toolbar.enabled == nil then LeoAltholic.globalData.settings.toolbar.enabled = false end
-    return LeoAltholic.globalData.settings.toolbar.enabled
+	if LeoAltholic.globalData.settings.toolbar.enabled == nil then LeoAltholic.globalData.settings.toolbar.enabled = false end
+	return LeoAltholic.globalData.settings.toolbar.enabled
+end
+
+function LeoAltholicToolbarUI.SetHideDoneWrit(value)
+	LeoAltholic.globalData.settings.toolbar.hideDoneWrit = value
+end
+function LeoAltholicToolbarUI.GetHideDoneWrit()
+	if LeoAltholic.globalData.settings.toolbar.hideDoneWrit == nil then LeoAltholic.globalData.settings.toolbar.hideDoneWrit = false end
+	return LeoAltholic.globalData.settings.toolbar.hideDoneWrit
 end

 function LeoAltholicToolbarUI.SetBumpCompass(value)
-    LeoAltholic.globalData.settings.toolbar.bumpCompass = value
-    LeoAltholicToolbarUI.BumpCompass()
+	LeoAltholic.globalData.settings.toolbar.bumpCompass = value
+	LeoAltholicToolbarUI.BumpCompass()
 end
 function LeoAltholicToolbarUI.GetBumpCompass()
-    if LeoAltholic.globalData.settings.toolbar.bumpCompass == nil then LeoAltholic.globalData.settings.toolbar.bumpCompass = false end
-    return LeoAltholic.globalData.settings.toolbar.bumpCompass
+	if LeoAltholic.globalData.settings.toolbar.bumpCompass == nil then LeoAltholic.globalData.settings.toolbar.bumpCompass = false end
+	return LeoAltholic.globalData.settings.toolbar.bumpCompass
+end
+function LeoAltholicToolbarUI.BumpCompass()
+	local hasWykkydsToolbar = false
+	if WYK_Toolbar and wykkydsToolbar then hasWykkydsToolbar = true end
+	if not hasWykkydsToolbar and LeoAltholicToolbarUI.IsEnabled() and LeoAltholicToolbarUI.GetBumpCompass() then
+		if LeoAltholicToolbar:GetTop() <= 60 then
+			if math.floor(ZO_CompassFrame:GetTop()) ~= math.floor(LeoAltholicToolbar:GetTop()) + 60 then
+				ZO_CompassFrame:ClearAnchors()
+				ZO_CompassFrame:SetAnchor( TOP, GuiRoot, TOP, 0, LeoAltholicToolbar:GetTop() + 60)
+				ZO_TargetUnitFramereticleover:ClearAnchors()
+				ZO_TargetUnitFramereticleover:SetAnchor( TOP, GuiRoot, TOP, 0, LeoAltholicToolbar:GetTop() + 110)
+			end
+		elseif ZO_CompassFrame:GetTop() ~= 40 then
+			ZO_CompassFrame:ClearAnchors()
+			ZO_CompassFrame:SetAnchor( TOP, GuiRoot, TOP, 0, 40 )
+			ZO_TargetUnitFramereticleover:ClearAnchors()
+			ZO_TargetUnitFramereticleover:SetAnchor( TOP, GuiRoot, TOP, 0, 88 )
+		end
+	end
 end

 function LeoAltholicToolbarUI.SetItem(item, value)
-    if not LeoAltholic.globalData.settings.toolbar.items then LeoAltholic.globalData.settings.toolbar.items = {} end
-    LeoAltholic.globalData.settings.toolbar.items[item] = value
-    LeoAltholicToolbarUI.update()
+	if not LeoAltholic.globalData.settings.toolbar.items then LeoAltholic.globalData.settings.toolbar.items = {} end
+	LeoAltholic.globalData.settings.toolbar.items[item] = value
+	LeoAltholicToolbarUI.update()
 end
 function LeoAltholicToolbarUI.GetItem(item)
-    if not LeoAltholic.globalData.settings.toolbar.items then LeoAltholic.globalData.settings.toolbar.items = {} end
-    if LeoAltholic.globalData.settings.toolbar.items[item] == nil then LeoAltholic.globalData.settings.toolbar.items[item] = true end
-    return LeoAltholic.globalData.settings.toolbar.items[item]
+	if not LeoAltholic.globalData.settings.toolbar.items then LeoAltholic.globalData.settings.toolbar.items = {} end
+	if LeoAltholic.globalData.settings.toolbar.items[item] == nil then LeoAltholic.globalData.settings.toolbar.items[item] = true end
+	return LeoAltholic.globalData.settings.toolbar.items[item]
 end

-local function checkCenter()
-    if LeoAltholicToolbar:GetTop() <= 60 then
-        local x = LeoAltholicToolbar:GetCenter()
-        local guiRootX = GuiRoot:GetCenter()
-        if x ~= guiRootX then
-            x = LeoAltholicToolbar:GetLeft() + (guiRootX - x)
-            LeoAltholicToolbar:ClearAnchors()
-            LeoAltholicToolbar:SetAnchor(TOPLEFT, GuiRoot, TOPLEFT, x, LeoAltholicToolbar:GetTop())
-            LeoAltholicToolbarUI.SetPosition(x, LeoAltholicToolbar:GetTop())
-        end
-    end
+function checkCenter()
+	if LeoAltholicToolbar:GetTop() <= 60 or LeoAltholicToolbar:GetTop() >= 1500 then --Teva added the second condition
+		local x = LeoAltholicToolbar:GetCenter()
+		local guiRootX = GuiRoot:GetCenter()
+		if x ~= guiRootX then
+			x = LeoAltholicToolbar:GetLeft() + (guiRootX - x)
+			LeoAltholicToolbar:ClearAnchors()
+			LeoAltholicToolbar:SetAnchor(TOPLEFT, GuiRoot, TOPLEFT, x, LeoAltholicToolbar:GetTop())
+			LeoAltholicToolbarUI.SetPosition(x, LeoAltholicToolbar:GetTop())
+		end
+	end
 end

 function LeoAltholicToolbarUI.OnWindowMoveStop()
-    checkCenter()
-    LeoAltholicToolbarUI.SetPosition(LeoAltholicToolbar:GetLeft(), LeoAltholicToolbar:GetTop())
+	checkCenter()
+	LeoAltholicToolbarUI.SetPosition(LeoAltholicToolbar:GetLeft(), LeoAltholicToolbar:GetTop())
 end

 function LeoAltholicToolbarUI.RestorePosition()
-    local position = LeoAltholicToolbarUI.GetPosition()
-    local left = position.left
-    local top = position.top
-
-    LeoAltholicToolbar:ClearAnchors()
-    LeoAltholicToolbar:SetAnchor(TOPLEFT, GuiRoot, TOPLEFT, left, top)
-    if LeoAltholicToolbarUI.IsEnabled() then
-        LeoAltholicToolbar:SetHidden(false)
-    else
-        LeoAltholicToolbar:SetHidden(true)
-    end
-end
-
-function LeoAltholicToolbarUI.BumpCompass()
-    local hasWykkydsToolbar = false
-    if WYK_Toolbar and wykkydsToolbar then hasWykkydsToolbar = true end
-    if not hasWykkydsToolbar and LeoAltholicToolbarUI.IsEnabled() and LeoAltholicToolbarUI.GetBumpCompass() then
-        if LeoAltholicToolbar:GetTop() <= 60 then
-            if math.floor(ZO_CompassFrame:GetTop()) ~= math.floor(LeoAltholicToolbar:GetTop()) + 60 then
-                ZO_CompassFrame:ClearAnchors()
-                ZO_CompassFrame:SetAnchor( TOP, GuiRoot, TOP, 0, LeoAltholicToolbar:GetTop() + 60)
-                ZO_TargetUnitFramereticleover:ClearAnchors()
-                ZO_TargetUnitFramereticleover:SetAnchor( TOP, GuiRoot, TOP, 0, LeoAltholicToolbar:GetTop() + 110)
-            end
-        elseif ZO_CompassFrame:GetTop() ~= 40 then
-            ZO_CompassFrame:ClearAnchors()
-            ZO_CompassFrame:SetAnchor( TOP, GuiRoot, TOP, 0, 40 )
-            ZO_TargetUnitFramereticleover:ClearAnchors()
-            ZO_TargetUnitFramereticleover:SetAnchor( TOP, GuiRoot, TOP, 0, 88 )
-        end
-    end
+	local position = LeoAltholicToolbarUI.GetPosition()
+	local left = position.left
+	local top = position.top
+
+	LeoAltholicToolbar:ClearAnchors()
+	LeoAltholicToolbar:SetAnchor(TOPLEFT, GuiRoot, TOPLEFT, left, top)
+	if LeoAltholicToolbarUI.IsEnabled() then
+		LeoAltholicToolbar:SetHidden(false)
+	else
+		LeoAltholicToolbar:SetHidden(true)
+	end
 end

 local function addLine(tooltip, text, color)
-    if not color then color = ZO_SELECTED_TEXT end
-    local r, g, b = color:UnpackRGB()
-    tooltip:AddLine(text, "LeoAltholicNormalFont", r, g, b, CENTER, MODIFY_TEXT_TYPE_NONE, TEXT_ALIGN_LEFT, true)
+	if not color then color = ZO_SELECTED_TEXT end
+	local r, g, b = color:UnpackRGB()
+	tooltip:AddLine(text, "LeoAltholicNormalFont", r, g, b, CENTER, MODIFY_TEXT_TYPE_NONE, TEXT_ALIGN_LEFT, true)
 end

 local function hasExpiredQueue()
-    for x,data in pairs(LeoAltholic.timerQueue) do
-        if GetDiffBetweenTimeStamps(data.time, GetTimeStamp()) <= 0 then
-            return true
-        end
-    end
-    return false
+	for x,data in pairs(LeoAltholic.timerQueue) do
+		if GetDiffBetweenTimeStamps(data.time, GetTimeStamp()) <= 0 then
+			return true
+		end
+	end
+	return false
 end

 function LeoAltholicUI.TooltipWarning(control, visible)

-    if visible and hasExpiredQueue() then
-        if not parent then parent = control end
-
-        InitializeTooltip(InformationTooltip, control, TOPLEFT, -100, 40, TOPLEFT)
-
-        for x,data in pairs(LeoAltholic.timerQueue) do
-            if GetDiffBetweenTimeStamps(data.time, GetTimeStamp()) <= 0 then
-                addLine(InformationTooltip, data.info)
-            end
-        end
-
-        InformationTooltip:SetHidden(false)
-        InformationTooltipTopLevel:BringWindowToTop()
-    else
-        ClearTooltip(InformationTooltip)
-        InformationTooltip:SetHidden(true)
-    end
+	if visible and hasExpiredQueue() then
+		if not parent then parent = control end
+		InitializeTooltip(InformationTooltip, control, TOPLEFT, -100, 40, TOPLEFT)
+		for x,data in pairs(LeoAltholic.timerQueue) do
+			if GetDiffBetweenTimeStamps(data.time, GetTimeStamp()) <= 0 then
+				addLine(InformationTooltip, data.info)
+			end
+		end
+		InformationTooltip:SetHidden(false)
+		InformationTooltipTopLevel:BringWindowToTop()
+	else
+		ClearTooltip(InformationTooltip)
+		InformationTooltip:SetHidden(true)
+	end
 end

-
 function LeoAltholicToolbarUI.update()
-
-    if not LeoAltholicToolbarUI.IsEnabled() then return end
-
-    LeoAltholicToolbarUI.BumpCompass()
-
-    local char = LeoAltholic.GetMyself()
-    local toolbar = WINDOW_MANAGER:GetControlByName("LeoAltholicToolbar")
-
-    local warning = GetControl(toolbar, "WarningIcon")
-    if hasExpiredQueue() then
-        warning:SetHidden(false)
-        local line = GetControl(toolbar, "WarningLine")
-        line:SetHidden(false)
-        line:SetAnchor(TOPLEFT, warning, TOPLEFT, 2, 0)
-        line:SetAnchor(BOTTOMRIGHT, warning, BOTTOMLEFT, 2, 0)
-    else
-        warning:SetHidden(true)
-    end
-
-    local offsetX = 0
-    local width = 120
-    local numSections = 0
-    local totalWidth = 0
-
-    local line
-    local label = GetControl(toolbar, "Inventory")
-    local texture = GetControl(toolbar, "InventoryTexture")
-    label:SetHidden(true)
-    texture:SetHidden(true)
-    if LeoAltholicToolbarUI.GetItem(LeoAltholicToolbarUI.items.INVENTORY) then
-        local color = '|c' .. LeoAltholic.color.hex.green
-        if char.inventory.free <= 25 then color = '|c'..LeoAltholic.color.hex.yellow end
-        if char.inventory.free <= 10 then color = '|c'..LeoAltholic.color.hex.red end
-        label:SetText(color .. char.inventory.used .. "|r / " .. char.inventory.size)
-        label:SetHidden(false)
-        texture:SetHidden(false)
-        texture:SetAnchor(TOPLEFT, toolbar, TOPLEFT, offsetX, 0)
-        offsetX = offsetX + 100
-        numSections = numSections + 1
-        totalWidth = totalWidth + 105
-    end
-
-    line = GetControl(toolbar, "RidingLine")
-    label = GetControl(toolbar, "Riding")
-    texture = GetControl(toolbar, "RidingTexture")
-    line:SetHidden(true)
-    label:SetHidden(true)
-    texture:SetHidden(true)
-    if LeoAltholicToolbarUI.GetItem(LeoAltholicToolbarUI.items.RIDING) and
-            (char.attributes.riding.speed < char.attributes.riding.speedMax or
-            char.attributes.riding.stamina < char.attributes.riding.staminaMax or
-            char.attributes.riding.capacity < char.attributes.riding.capacityMax) then
-        label:SetText(LeoAltholic.FormatTime(char.attributes.riding.time - GetTimeStamp(), true, true))
-        label:SetHidden(false)
-        texture:SetHidden(false)
-        line:SetHidden(false)
-        texture:SetAnchor(TOPLEFT, toolbar, TOPLEFT, offsetX, 0)
-        line:SetAnchor(TOPLEFT, texture, TOPLEFT, 2, 0)
-        line:SetAnchor(BOTTOMRIGHT, texture, BOTTOMLEFT, 2, 0)
-        offsetX = offsetX + 100
-        numSections = numSections + 1
-        totalWidth = totalWidth + 130
-    end
-
+	if not LeoAltholicToolbarUI.IsEnabled() then return end
+	LeoAltholicToolbarUI.BumpCompass()
+	local char = LeoAltholic.GetMyself()
+	local toolbar = WINDOW_MANAGER:GetControlByName("LeoAltholicToolbar")
+--Teva moved these definitions up so can adjust offsetX and prevent warning from visually stacking atop an icon
+	local checklistOffsetX = 0
+	local offsetX = 0 --TevaNote: affects left of inventory count
+	local width = 120
+	local numSections = 0
+	local totalWidth = 0 --TevaNote: affects right of inventory count and left of research warning
+-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
+-- INVENTORY --
+	local line
+	local label = GetControl(toolbar, "Inventory")
+	local texture = GetControl(toolbar, "InventoryTexture")
+	label:SetHidden(true)
+	texture:SetHidden(true)
+	if LeoAltholicToolbarUI.GetItem(LeoAltholicToolbarUI.items.INVENTORY) then
+		local color = '|c' .. LeoAltholic.color.hex.green
+		if char.inventory.free <= 25 then color = '|c'..LeoAltholic.color.hex.yellow end
+		if char.inventory.free <= 10 then color = '|c'..LeoAltholic.color.hex.red end
+		label:SetText(color .. char.inventory.used .. "|r / " .. char.inventory.size)
+		label:SetHidden(false)
+		texture:SetHidden(false)
+		texture:SetAnchor(TOPLEFT, toolbar, TOPLEFT, offsetX, 0)
+		offsetX = offsetX + 100
+		numSections = numSections + 1
+		totalWidth = totalWidth + 105
+	end
+-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
+-- BANKSIZE	-- Teva added this section
+	local bankfree = GetNumBagFreeSlots(BAG_BANK) + GetNumBagFreeSlots(BAG_SUBSCRIBER_BANK)
+	local bankused = GetNumBagUsedSlots(BAG_BANK) + GetNumBagUsedSlots(BAG_SUBSCRIBER_BANK)
+	local banksize = bankfree + bankused
+
+	line = GetControl(toolbar, "BankSize")
+	label = GetControl(toolbar, "Bank")
+	texture = GetControl(toolbar, "BankSizeTexture")
+	label:SetHidden(true)
+	texture:SetHidden(true)
+	if LeoAltholicToolbarUI.GetItem(LeoAltholicToolbarUI.items.BANKSIZE) then
+		local bankcolor = '|c' .. LeoAltholic.color.hex.green
+		if bankfree <= 25 then bankcolor = '|c'..LeoAltholic.color.hex.yellow end
+		if bankfree <= 10 then bankcolor = '|c'..LeoAltholic.color.hex.red end
+		label:SetText(bankcolor..bankused.."|r / ".. banksize)
+		label:SetHidden(false)
+		texture:SetHidden(false)
+		texture:SetAnchor(TOPLEFT, toolbar, TOPLEFT, offsetX, 0)
+		offsetX = offsetX + 100
+		numSections = numSections + 1
+		totalWidth = totalWidth + 105
+	end
+--Teva added the code section above
+-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
+-- RESEARCH, complete --
+	local warning = GetControl(toolbar, "WarningIcon")
+	if hasExpiredQueue() then
+		totalWidth = totalWidth + 25	--added by Teva to stop the warning icon stacking
+		warning:SetHidden(false)
+		local line = GetControl(toolbar, "WarningLine")
+		line:SetHidden(false)
+		line:SetAnchor(TOPLEFT, warning, TOPLEFT, 2, 0)
+		line:SetAnchor(BOTTOMRIGHT, warning, BOTTOMLEFT, 2, 0)
+	else
+		warning:SetHidden(true)
+	end
+-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
+-- STATUS aka WRITSTATUS: SECTIONS FOR WRIT STATUS & RIDING --
+	local checklist = GetControl(toolbar, "Checklist")
+	local shownChecklist = false
+	if LeoAltholicToolbarUI.GetItem(LeoAltholicToolbarUI.items.WRITSTATUS) then
+		checklist:SetAnchor(TOPLEFT, toolbar, TOPLEFT, offsetX, 0)
+		checklist:SetHidden(false)
+		local icon
+		for _, craft in pairs(LeoAltholic.allCrafts) do
+			icon = GetControl(checklist, "Craft"..craft.."Icon")
+			if LeoAltholicChecklistUI.GetCraft(craft) then
+				local isDone = false	--Teva commented this out, don't recall why... double-check if it tests right with it back in now that all else works
+				for _, writ in pairs(char.quests.writs) do
+					if craft == writ.craft then
+--Teva adjusted colors and conditions below
+						if writ.lastStarted ~= nil then		-- and LeoAltholic.IsAfterReset(writ.lastStarted)
+							if writ.lastDone ~= nil and writ.lastDone > writ.lastStarted then
+								if LeoAltholic.IsAfterReset(writ.lastStarted) then
+									isDone = true				--Status: Done for Today
+									icon:SetColor(0.8,0.8,0.8,1)		--Teva added this line to make icons white when complete
+								--	label:SetText("Done for Today")		--Teva is trying to add a tooltip to the icon, but neither tooltip nor label seem to do it
+								--	label:SetAnchor(TOPLEFT, texture, TOPRIGHT, 2, 0)
+								elseif LeoAltholic.IsBeforeReset(writ.lastStarted) then
+								--	isBetween = true			--Status: Need Today's Writ, completed old writ
+									icon:SetColor(0.9,0,0,1)		--red
+								--	label:SetText("Need Today's Writ (completed old writ)")	--Teva is trying to add a tooltip to the icon, but neither tooltip nor label seem to do it
+								--TevaNOTE: try adjusting the labels above until show as tooltip
+								end
+							elseif writ.lastPreDeliver ~= nil then
+							--	isPreDeliver = true			--Status: Ready to Deliver
+								icon:SetColor(0,1,0,1)		--now green, was yellow(1,1,0,1)
+							elseif writ.lastUpdated ~= nil then
+							--	isUpdated = true			--Status: Partially Complete
+								icon:SetColor(1,1,0,1)		--now yellow, was darkyellow(1,0.8,0,1)
+							else
+							--	isStarted = true			--Status: Quest Acquired, No Progress
+								icon:SetColor(1,0.5,0,1)	--now orange, was (0.8,0.8,0.8,1)
+							end
+						else	--TevaNOTE: if writ.lastStarted == nil then
+							icon:SetColor(1,0,0,1)		--red
+						end
+						--Teva adjusted colors and conditions above
+						if not isDone or not LeoAltholicToolbarUI.GetHideDoneWrit() then
+							shownChecklist = true
+							icon:SetHidden(false)
+							icon:SetAnchor(TOPLEFT, checklist, TOPLEFT, checklistOffsetX, -2)
+							checklistOffsetX = checklistOffsetX + 30	--TevaNOTE: was +35
+							offsetX = offsetX + 30			--TevaNOTE: was +35
+						else
+						--Teva plans to add an "if" condition to not hide the checklist if lastStart time was before DailyReset time
+						--	if LeoAltholic.IsBeforeReset(writ.lastStarted) then icon:SetHidden(false) end
+							icon:SetHidden(true)
+						end
+					end
+				end
+			else
+				icon:SetHidden(true)	--TevaNOTE: making false should make that craft's writ status always show on the toolbar even if not shown on the checklist
+			end
+		end
+		-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
+		-- RIDING --
+		icon = GetControl(checklist, "RidingIcon")
+		icon:SetHidden(true)
+--Teva added 2nd condition on next line: and riding training not complete
+		if char.attributes.riding.time - GetTimeStamp() < 0 and LeoAltholicChecklistUI.doneRiding()==false then
+			shownChecklist = true
+			icon:SetHidden(false)
+			icon:SetColor(1,0,0,1)
+			icon:SetAnchor(TOPLEFT, checklist, TOPLEFT, checklistOffsetX, -4)
+			checklistOffsetX = checklistOffsetX + 35
+		end
+-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
+-- ChecklistLine (associated with Writs) --
+	else
+		checklist:SetHidden(true) --TevaNOTE: should show/hide all writ status icons
+	end
+
+	if shownChecklist then
+		line = GetControl(toolbar, "ChecklistLine")
+		line:SetHidden(false)
+		line:SetAnchor(TOPLEFT, checklist, TOPLEFT, 2, 0)
+		line:SetAnchor(BOTTOMRIGHT, checklist, BOTTOMLEFT, 2, 0)
+	end
+	totalWidth = totalWidth + checklistOffsetX
+-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
+-- RESEARCH ON TOOLBAR --
     line = GetControl(toolbar, "CraftLine")
     line:SetHidden(true)
     for _,craft in pairs(LeoAltholic.craftResearch) do
@@ -243,73 +336,37 @@ function LeoAltholicToolbarUI.update()
             line:SetAnchor(BOTTOMRIGHT, firstTexture, BOTTOMLEFT, 2, 0)
         end
     end
-
-    local checklistOffsetX = 0
-    local checklist = GetControl(toolbar, "Checklist")
-    local shownChecklist = false
-    if LeoAltholicToolbarUI.GetItem(LeoAltholicToolbarUI.items.CHECKLIST) then
-        checklist:SetAnchor(TOPLEFT, toolbar, TOPLEFT, offsetX, 0)
-        checklist:SetHidden(false)
-        local icon
-        for _, craft in pairs(LeoAltholic.allCrafts) do
-            icon = GetControl(checklist, "Craft"..craft.."Icon")
-            if LeoAltholicChecklistUI.GetCraft(craft) then
-
-                local isDone = false
-                for _, writ in pairs(char.quests.writs) do
-                    if craft == writ.craft then
-                        if writ.lastDone ~= nil and LeoAltholic.IsAfterReset(writ.lastDone) then
-                            isDone = true
-                        elseif writ.lastPreDeliver ~= nil and LeoAltholic.IsAfterReset(writ.lastPreDeliver) then
-                            icon:SetColor(1,1,0,1)
-                        elseif writ.lastUpdated ~= nil and LeoAltholic.IsAfterReset(writ.lastUpdated) then
-                            icon:SetColor(1,0.8,0,1)
-                        elseif writ.lastStarted ~= nil and LeoAltholic.IsAfterReset(writ.lastStarted) then
-                            icon:SetColor(0.8,0.8,0.8,1)
-                        else
-                            icon:SetColor(1,0,0,1)
-                        end
-
-                        if not isDone then
-                            shownChecklist = true
-                            icon:SetHidden(false)
-                            icon:SetAnchor(TOPLEFT, checklist, TOPLEFT, checklistOffsetX, -2)
-                            checklistOffsetX = checklistOffsetX + 35
-                        else
-                            icon:SetHidden(true)
-                        end
-                    end
-                end
-            else
-                icon:SetHidden(true)
-            end
-        end
-
-        icon = GetControl(checklist, "RidingIcon")
-        icon:SetHidden(true)
-        if char.attributes.riding.time - GetTimeStamp() < 0 then
-            shownChecklist = true
-            icon:SetHidden(false)
-            icon:SetColor(1,0,0,1)
-            icon:SetAnchor(TOPLEFT, checklist, TOPLEFT, checklistOffsetX, -4)
-            checklistOffsetX = checklistOffsetX + 35
-        end
-    else
-        checklist:SetHidden(true)
-    end
-    if shownChecklist then
-        line = GetControl(toolbar, "ChecklistLine")
-        line:SetHidden(false)
-        line:SetAnchor(TOPLEFT, checklist, TOPLEFT, 2, 0)
-        line:SetAnchor(BOTTOMRIGHT, checklist, BOTTOMLEFT, 2, 0)
-    end
-    totalWidth = totalWidth + checklistOffsetX
-
-    if numSections > 0 then
-        toolbar:SetWidth(totalWidth)
-        GetControl(toolbar, "BG"):SetWidth(totalWidth)
-        checkCenter()
-    else
-        toolbar:SetHidden(true)
-    end
+-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
+-- RIDING --
+	line = GetControl(toolbar, "RidingLine")
+	label = GetControl(toolbar, "Riding")
+	texture = GetControl(toolbar, "RidingTexture")
+	line:SetHidden(true)
+	label:SetHidden(true)
+	texture:SetHidden(true)
+	if LeoAltholicToolbarUI.GetItem(LeoAltholicToolbarUI.items.RIDING) and
+			(char.attributes.riding.speed < char.attributes.riding.speedMax or
+			char.attributes.riding.stamina < char.attributes.riding.staminaMax or
+			char.attributes.riding.capacity < char.attributes.riding.capacityMax) then
+		label:SetText(LeoAltholic.FormatTime(char.attributes.riding.time - GetTimeStamp(), true, true))
+		label:SetHidden(false)
+		texture:SetHidden(false)
+		line:SetHidden(false)
+		texture:SetAnchor(TOPLEFT, toolbar, TOPLEFT, offsetX, 0)
+		line:SetAnchor(TOPLEFT, texture, TOPLEFT, 2, 0)
+		line:SetAnchor(BOTTOMRIGHT, texture, BOTTOMLEFT, 2, 0)
+		offsetX = offsetX + 100
+		numSections = numSections + 1
+		totalWidth = totalWidth + 100 --TevaNOTE: was +130
+	end
+-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
+
+-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
+	if numSections > 0 then
+		toolbar:SetWidth(totalWidth)
+		GetControl(toolbar, "BG"):SetWidth(totalWidth)
+		checkCenter()
+	else
+		toolbar:SetHidden(true)
+	end
 end