diff --git a/LeoAltholic.lua b/LeoAltholic.lua
index c201c67..2f3bb8f 100644
--- a/LeoAltholic.lua
+++ b/LeoAltholic.lua
@@ -13,26 +13,26 @@ local THIEVES_GUILD = 117
local LEGERDEMAIN = 111
function LeoAltholic.GetMaxRank(skillType, skillLine)
- if skillType == SKILL_TYPE_AVA or
+ if skillType == SKILL_TYPE_AVA or
skillType == SKILL_TYPE_GUILD then
- local _, _, _, skillLineId = GetSkillLineInfo(skillType, skillLine)
- if skillLineId == THIEVES_GUILD then
- return 12
- end
- if skillLineId == DARK_BROTHERHOOD then
- return 12
- end
- return 10
- end
- if skillType == SKILL_TYPE_WORLD then
- local _, _, _, skillLineId = GetSkillLineInfo(skillType, skillLine)
- if skillLineId == LEGERDEMAIN then
- return 20
- else
- return 10
- end
- end
- return 50
+ local _, _, _, skillLineId = GetSkillLineInfo(skillType, skillLine)
+ if skillLineId == THIEVES_GUILD then
+ return 12
+ end
+ if skillLineId == DARK_BROTHERHOOD then
+ return 12
+ end
+ return 10
+ end
+ if skillType == SKILL_TYPE_WORLD then
+ local _, _, _, skillLineId = GetSkillLineInfo(skillType, skillLine)
+ if skillLineId == LEGERDEMAIN then
+ return 20
+ else
+ return 10
+ end
+ end
+ return 50
end
local function loadPlayerDataPart(skillType, baseElem)
diff --git a/LeoAltholic.txt b/LeoAltholic.txt
index a9f383a..4f2be3d 100644
--- a/LeoAltholic.txt
+++ b/LeoAltholic.txt
@@ -1,7 +1,7 @@
## Title: Leo's Altholic
## APIVersion: 100029 100030
-## Version: 1.7.4
-## AddOnVersion: 174
+## Version: 1.7.5
+## AddOnVersion: 175
## Author: |c39B027@LeandroSilva|r
## SavedVariables: LeoAltholicSavedVariables LeoAltholicCharVariables
## DependsOn: LibStub LibFeedback LibAddonMenu-2.0
diff --git a/LeoAltholic.xml b/LeoAltholic.xml
index e6ecfed..e079fe3 100644
--- a/LeoAltholic.xml
+++ b/LeoAltholic.xml
@@ -1905,14 +1905,14 @@
<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>
+ <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">
diff --git a/LeoAltholicInit.lua b/LeoAltholicInit.lua
index 30d6e5d..efbe5c4 100644
--- a/LeoAltholicInit.lua
+++ b/LeoAltholicInit.lua
@@ -6,7 +6,7 @@ LeoAltholicToolbarUI = LeoAltholicToolbarUI or {}
LeoAltholic.name = "LeoAltholic"
LeoAltholic.displayName = "Leo's Altholic"
-LeoAltholic.version = "1.7.4"
+LeoAltholic.version = "1.7.5"
LeoAltholic.chatPrefix = "|c39B027" .. LeoAltholic.name .. "|r: "
LeoAltholic.TAB_BIO = "Bio"
diff --git a/LeoAltholic_API.lua b/LeoAltholic_API.lua
index 48c607a..d5bd893 100644
--- a/LeoAltholic_API.lua
+++ b/LeoAltholic_API.lua
@@ -94,8 +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) --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)
+-- 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 bdee599..db69e1e 100644
--- a/Settings.lua
+++ b/Settings.lua
@@ -12,292 +12,292 @@ function LeoAltholic_Settings:Initialize()
end
function LeoAltholic_Settings:CreatePanel()
- local OptionsName = "LeoAltholicOptions"
- local panelData = {
- type = "panel",
- name = LeoAltholic.name,
+ local OptionsName = "LeoAltholicOptions"
+ local panelData = {
+ type = "panel",
+ name = LeoAltholic.name,
slashCommand = "/leoaltoptions",
- displayName = "|c39B027"..LeoAltholic.displayName.."|r",
- author = "@LeandroSilva",
- version = LeoAltholic.version,
- registerForRefresh = true,
- registerForDefaults = true,
- website = "http://www.esoui.com/downloads/info2140-LeosAltholic.html"
- }
- LAM:RegisterAddonPanel(OptionsName, panelData)
+ displayName = "|c39B027"..LeoAltholic.displayName.."|r",
+ author = "@LeandroSilva",
+ version = LeoAltholic.version,
+ registerForRefresh = true,
+ registerForDefaults = true,
+ website = "http://www.esoui.com/downloads/info2140-LeosAltholic.html"
+ }
+ LAM:RegisterAddonPanel(OptionsName, panelData)
- local optionsData = {
- {
- type = "header",
- name = "|c3f7fff"..GetString(LEOALT_CHECKLIST).."|r"
- },{
- type = "checkbox",
- name = GetString(SI_ADDON_MANAGER_ENABLED),
- default = true,
- getFunc = LeoAltholicChecklistUI.IsEnabled,
- setFunc = LeoAltholicChecklistUI.SetEnabled,
- },{
- type = "button",
- name = GetString(SI_OUTFIT_STYLES_BOOK_PREVIEW_KEYBIND),
- func = function() LeoAltholicChecklistUI.ShowUI() end,
- width = "full",
- },{
- type = "slider",
- name = GetString(SI_VIDEO_OPTIONS_UI_USE_CUSTOM_SCALE),
- getFunc = LeoAltholicChecklistUI.GetFontScale,
- setFunc = LeoAltholicChecklistUI.SetFontScale,
- min = 80,
- max = 120,
- default = 100,
- },{
- type = "checkbox",
- name = GetString(LEOALT_CHECKLIST_UPWARDS),
- default = false,
- getFunc = LeoAltholicChecklistUI.IsUpwards,
- setFunc = LeoAltholicChecklistUI.SetUpwards,
- },{
- type = "checkbox",
- name = GetString(SI_GAMEPAD_INTERFACE_OPTIONS_PRIMARY_PLAYER_NAME),
- default = false,
- getFunc = LeoAltholicChecklistUI.DisplayName,
- setFunc = LeoAltholicChecklistUI.SetDisplayName
- },{
- type = "checkbox",
- name = GetString(LEOALT_CHECKLIST_HIDE_WHEN_TOOLBAR),
- default = false,
- getFunc = LeoAltholicChecklistUI.IsHideWhenToolbar,
- setFunc = LeoAltholicChecklistUI.SetHideWhenToolbar
- },{
- type = "submenu",
- name = GetString(LEOALT_ENTRIES),
- controls = {
- {
- type = "description",
- text = GetString(LEOALT_CHAR_CONFIGURATION)
- },{
- type = "checkbox",
- name = GetString(SI_ITEMFILTERTYPE16),
- default = true,
- disabled = function() return not LeoAltholicChecklistUI.IsEnabled() end,
- width = "half",
- getFunc = function() return LeoAltholicChecklistUI.GetCraft(CRAFTING_TYPE_ALCHEMY) end,
- setFunc = function(value)
- LeoAltholicChecklistUI.SetCraft(CRAFTING_TYPE_ALCHEMY, value)
- end,
- },{
- type = "checkbox",
- name = GetString(SI_ITEMFILTERTYPE13),
- default = true,
- disabled = function() return not LeoAltholicChecklistUI.IsEnabled() end,
- width = "half",
- getFunc = function() return LeoAltholicChecklistUI.GetCraft(CRAFTING_TYPE_BLACKSMITHING) end,
- setFunc = function(value)
- LeoAltholicChecklistUI.SetCraft(CRAFTING_TYPE_BLACKSMITHING, value)
- end,
- },{
- type = "checkbox",
- name = GetString(SI_ITEMFILTERTYPE14),
- default = true,
- disabled = function() return not LeoAltholicChecklistUI.IsEnabled() end,
- width = "half",
- getFunc = function() return LeoAltholicChecklistUI.GetCraft(CRAFTING_TYPE_CLOTHIER) end,
- setFunc = function(value)
- LeoAltholicChecklistUI.SetCraft(CRAFTING_TYPE_CLOTHIER, value)
- end,
- },{
- type = "checkbox",
- name = GetString(SI_ITEMFILTERTYPE17),
- default = true,
- disabled = function() return not LeoAltholicChecklistUI.IsEnabled() end,
- width = "half",
- getFunc = function() return LeoAltholicChecklistUI.GetCraft(CRAFTING_TYPE_ENCHANTING) end,
- setFunc = function(value)
- LeoAltholicChecklistUI.SetCraft(CRAFTING_TYPE_ENCHANTING, value)
- end,
- },{
- type = "checkbox",
- name = GetString(SI_ITEMFILTERTYPE25),
- default = true,
- disabled = function() return not LeoAltholicChecklistUI.IsEnabled() end,
- width = "half",
- getFunc = function() return LeoAltholicChecklistUI.GetCraft(CRAFTING_TYPE_JEWELRYCRAFTING) end,
- setFunc = function(value)
- LeoAltholicChecklistUI.SetCraft(CRAFTING_TYPE_JEWELRYCRAFTING, value)
- end,
- },{
- type = "checkbox",
- name = GetString(SI_ITEMFILTERTYPE18),
- default = true,
- disabled = function() return not LeoAltholicChecklistUI.IsEnabled() end,
- width = "half",
- getFunc = function() return LeoAltholicChecklistUI.GetCraft(CRAFTING_TYPE_PROVISIONING) end,
- setFunc = function(value)
- LeoAltholicChecklistUI.SetCraft(CRAFTING_TYPE_PROVISIONING, value)
- end,
- },{
- type = "checkbox",
- name = GetString(SI_ITEMFILTERTYPE15),
- default = true,
- disabled = function() return not LeoAltholicChecklistUI.IsEnabled() end,
- width = "half",
- getFunc = function() return LeoAltholicChecklistUI.GetCraft(CRAFTING_TYPE_WOODWORKING) end,
- setFunc = function(value)
- LeoAltholicChecklistUI.SetCraft(CRAFTING_TYPE_WOODWORKING, value)
- end,
- },{
- type = "checkbox",
- name = GetString(SI_STAT_GAMEPAD_RIDING_HEADER_TRAINING),
- default = false,
- disabled = function() return not LeoAltholicChecklistUI.IsEnabled() end,
- width = "half",
- getFunc = LeoAltholicChecklistUI.GetRiding,
- setFunc = LeoAltholicChecklistUI.SetRiding,
- }
- }
- },{
- type = "header",
- name = "|c3f7fff"..GetString(LEOALT_TOOLBAR).."|r"
- },{
- type = "description",
- text = GetString(LEOALT_ACCOUNT_CONFIGURATION)
- },{
- type = "checkbox",
- name = GetString(SI_ADDON_MANAGER_ENABLED),
- default = true,
- getFunc = LeoAltholicToolbarUI.IsEnabled,
- setFunc = LeoAltholicToolbarUI.SetEnabled,
- },{
- type = "checkbox",
- name = GetString(LEOALT_BUMP_COMPASS),
- 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 = {
- {
- type = "checkbox",
- name = GetString(SI_GAMEPAD_PLAYER_INVENTORY_CAPACITY_FOOTER_LABEL),
- default = true,
- disabled = function() return not LeoAltholicToolbarUI.IsEnabled() end,
- width = "half",
- getFunc = function() return LeoAltholicToolbarUI.GetItem(LeoAltholicToolbarUI.items.INVENTORY) end,
- setFunc = function(value)
- LeoAltholicToolbarUI.SetItem(LeoAltholicToolbarUI.items.INVENTORY, value)
- 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),
- default = true,
- disabled = function() return not LeoAltholicToolbarUI.IsEnabled() end,
- width = "half",
- getFunc = function() return LeoAltholicToolbarUI.GetItem(LeoAltholicToolbarUI.items.RIDING) end,
- setFunc = function(value)
- LeoAltholicToolbarUI.SetItem(LeoAltholicToolbarUI.items.RIDING, value)
- LeoAltholicToolbarUI.RestorePosition()
- LeoAltholicToolbarUI.update()
- end,
- },{
- type = "checkbox",
- name = GetString(SI_GAMEPAD_SMITHING_CURRENT_RESEARCH_HEADER),
- default = true,
- disabled = function() return not LeoAltholicToolbarUI.IsEnabled() end,
- width = "half",
- getFunc = function() return LeoAltholicToolbarUI.GetItem(LeoAltholicToolbarUI.items.RESEARCH) end,
- setFunc = function(value)
- LeoAltholicToolbarUI.SetItem(LeoAltholicToolbarUI.items.RESEARCH, value)
- LeoAltholicToolbarUI.RestorePosition()
- LeoAltholicToolbarUI.update()
- end,
- },{
- type = "checkbox",
- 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.WRITSTATUS) end,
- setFunc = function(value)
- LeoAltholicToolbarUI.SetItem(LeoAltholicToolbarUI.items.WRITSTATUS, value)
- LeoAltholicToolbarUI.RestorePosition()
- LeoAltholicToolbarUI.update()
- end,
- }
- }
- },{
- type = "header",
- name = "|c3f7fff"..GetString(LEOALT_TRACKED_QUESTS).."|r"
- },{
- type = "description",
- text = GetString(LEOALT_ACCOUNT_CONFIGURATION)
- },{
- type = "checkbox",
- name = GetString(LEOALT_AUTO_TRACK_WRIT),
- default = true,
- getFunc = function() return LeoAltholic.globalData.settings.tracked.dailyWrits end,
- setFunc = function(value)
- LeoAltholic.globalData.settings.tracked.dailyWrits = value
- end,
- },{
- type = "checkbox",
- name = GetString(LEOALT_AUTO_TRACK_DAILY),
- default = true,
- getFunc = function() return LeoAltholic.globalData.settings.tracked.allDaily end,
- setFunc = function(value)
- LeoAltholic.globalData.settings.tracked.allDaily = value
- end,
- },{
- type = "header",
- name = "|c3f7fff"..GetString(LEOALT_COMPLETED_RESEARCH).."|r"
- },{
- type = "description",
- text = GetString(LEOALT_ACCOUNT_CONFIGURATION)
- },{
- type = "checkbox",
- name = GetString(LEOALT_CHAT_ALL),
- tooltip = GetString(LEOALT_CHAT_ALL_TOOLTIP),
- default = true,
- getFunc = function() return LeoAltholic.globalData.settings.completedResearch.chat end,
- setFunc = function(value)
- LeoAltholic.globalData.settings.completedResearch.chat = value
- end,
- },{
- type = "checkbox",
- name = GetString(LEOALT_CENTERSCREEN_CURRENT),
- tooltip = GetString(LEOALT_CENTERSCREEN_CURRENT_TOOLTIP),
- default = true,
- getFunc = function() return LeoAltholic.globalData.settings.completedResearch.screen end,
- setFunc = function(value)
- LeoAltholic.globalData.settings.completedResearch.screen = value
- end,
- }
- }
- LAM:RegisterOptionControls(OptionsName, optionsData)
+ local optionsData = {
+ {
+ type = "header",
+ name = "|c3f7fff"..GetString(LEOALT_CHECKLIST).."|r"
+ },{
+ type = "checkbox",
+ name = GetString(SI_ADDON_MANAGER_ENABLED),
+ default = true,
+ getFunc = LeoAltholicChecklistUI.IsEnabled,
+ setFunc = LeoAltholicChecklistUI.SetEnabled,
+ },{
+ type = "button",
+ name = GetString(SI_OUTFIT_STYLES_BOOK_PREVIEW_KEYBIND),
+ func = function() LeoAltholicChecklistUI.ShowUI() end,
+ width = "full",
+ },{
+ type = "slider",
+ name = GetString(SI_VIDEO_OPTIONS_UI_USE_CUSTOM_SCALE),
+ getFunc = LeoAltholicChecklistUI.GetFontScale,
+ setFunc = LeoAltholicChecklistUI.SetFontScale,
+ min = 80,
+ max = 120,
+ default = 100,
+ },{
+ type = "checkbox",
+ name = GetString(LEOALT_CHECKLIST_UPWARDS),
+ default = false,
+ getFunc = LeoAltholicChecklistUI.IsUpwards,
+ setFunc = LeoAltholicChecklistUI.SetUpwards,
+ },{
+ type = "checkbox",
+ name = GetString(SI_GAMEPAD_INTERFACE_OPTIONS_PRIMARY_PLAYER_NAME),
+ default = false,
+ getFunc = LeoAltholicChecklistUI.DisplayName,
+ setFunc = LeoAltholicChecklistUI.SetDisplayName
+ },{
+ type = "checkbox",
+ name = GetString(LEOALT_CHECKLIST_HIDE_WHEN_TOOLBAR),
+ default = false,
+ getFunc = LeoAltholicChecklistUI.IsHideWhenToolbar,
+ setFunc = LeoAltholicChecklistUI.SetHideWhenToolbar
+ },{
+ type = "submenu",
+ name = GetString(LEOALT_ENTRIES),
+ controls = {
+ {
+ type = "description",
+ text = GetString(LEOALT_CHAR_CONFIGURATION)
+ },{
+ type = "checkbox",
+ name = GetString(SI_ITEMFILTERTYPE16),
+ default = true,
+ disabled = function() return not LeoAltholicChecklistUI.IsEnabled() end,
+ width = "half",
+ getFunc = function() return LeoAltholicChecklistUI.GetCraft(CRAFTING_TYPE_ALCHEMY) end,
+ setFunc = function(value)
+ LeoAltholicChecklistUI.SetCraft(CRAFTING_TYPE_ALCHEMY, value)
+ end,
+ },{
+ type = "checkbox",
+ name = GetString(SI_ITEMFILTERTYPE13),
+ default = true,
+ disabled = function() return not LeoAltholicChecklistUI.IsEnabled() end,
+ width = "half",
+ getFunc = function() return LeoAltholicChecklistUI.GetCraft(CRAFTING_TYPE_BLACKSMITHING) end,
+ setFunc = function(value)
+ LeoAltholicChecklistUI.SetCraft(CRAFTING_TYPE_BLACKSMITHING, value)
+ end,
+ },{
+ type = "checkbox",
+ name = GetString(SI_ITEMFILTERTYPE14),
+ default = true,
+ disabled = function() return not LeoAltholicChecklistUI.IsEnabled() end,
+ width = "half",
+ getFunc = function() return LeoAltholicChecklistUI.GetCraft(CRAFTING_TYPE_CLOTHIER) end,
+ setFunc = function(value)
+ LeoAltholicChecklistUI.SetCraft(CRAFTING_TYPE_CLOTHIER, value)
+ end,
+ },{
+ type = "checkbox",
+ name = GetString(SI_ITEMFILTERTYPE17),
+ default = true,
+ disabled = function() return not LeoAltholicChecklistUI.IsEnabled() end,
+ width = "half",
+ getFunc = function() return LeoAltholicChecklistUI.GetCraft(CRAFTING_TYPE_ENCHANTING) end,
+ setFunc = function(value)
+ LeoAltholicChecklistUI.SetCraft(CRAFTING_TYPE_ENCHANTING, value)
+ end,
+ },{
+ type = "checkbox",
+ name = GetString(SI_ITEMFILTERTYPE25),
+ default = true,
+ disabled = function() return not LeoAltholicChecklistUI.IsEnabled() end,
+ width = "half",
+ getFunc = function() return LeoAltholicChecklistUI.GetCraft(CRAFTING_TYPE_JEWELRYCRAFTING) end,
+ setFunc = function(value)
+ LeoAltholicChecklistUI.SetCraft(CRAFTING_TYPE_JEWELRYCRAFTING, value)
+ end,
+ },{
+ type = "checkbox",
+ name = GetString(SI_ITEMFILTERTYPE18),
+ default = true,
+ disabled = function() return not LeoAltholicChecklistUI.IsEnabled() end,
+ width = "half",
+ getFunc = function() return LeoAltholicChecklistUI.GetCraft(CRAFTING_TYPE_PROVISIONING) end,
+ setFunc = function(value)
+ LeoAltholicChecklistUI.SetCraft(CRAFTING_TYPE_PROVISIONING, value)
+ end,
+ },{
+ type = "checkbox",
+ name = GetString(SI_ITEMFILTERTYPE15),
+ default = true,
+ disabled = function() return not LeoAltholicChecklistUI.IsEnabled() end,
+ width = "half",
+ getFunc = function() return LeoAltholicChecklistUI.GetCraft(CRAFTING_TYPE_WOODWORKING) end,
+ setFunc = function(value)
+ LeoAltholicChecklistUI.SetCraft(CRAFTING_TYPE_WOODWORKING, value)
+ end,
+ },{
+ type = "checkbox",
+ name = GetString(SI_STAT_GAMEPAD_RIDING_HEADER_TRAINING),
+ default = false,
+ disabled = function() return not LeoAltholicChecklistUI.IsEnabled() end,
+ width = "half",
+ getFunc = LeoAltholicChecklistUI.GetRiding,
+ setFunc = LeoAltholicChecklistUI.SetRiding,
+ }
+ }
+ },{
+ type = "header",
+ name = "|c3f7fff"..GetString(LEOALT_TOOLBAR).."|r"
+ },{
+ type = "description",
+ text = GetString(LEOALT_ACCOUNT_CONFIGURATION)
+ },{
+ type = "checkbox",
+ name = GetString(SI_ADDON_MANAGER_ENABLED),
+ default = true,
+ getFunc = LeoAltholicToolbarUI.IsEnabled,
+ setFunc = LeoAltholicToolbarUI.SetEnabled,
+ },{
+ type = "checkbox",
+ name = GetString(LEOALT_BUMP_COMPASS),
+ 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 = {
+ {
+ type = "checkbox",
+ name = GetString(SI_GAMEPAD_PLAYER_INVENTORY_CAPACITY_FOOTER_LABEL),
+ default = true,
+ disabled = function() return not LeoAltholicToolbarUI.IsEnabled() end,
+ width = "half",
+ getFunc = function() return LeoAltholicToolbarUI.GetItem(LeoAltholicToolbarUI.items.INVENTORY) end,
+ setFunc = function(value)
+ LeoAltholicToolbarUI.SetItem(LeoAltholicToolbarUI.items.INVENTORY, value)
+ 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),
+ default = true,
+ disabled = function() return not LeoAltholicToolbarUI.IsEnabled() end,
+ width = "half",
+ getFunc = function() return LeoAltholicToolbarUI.GetItem(LeoAltholicToolbarUI.items.RIDING) end,
+ setFunc = function(value)
+ LeoAltholicToolbarUI.SetItem(LeoAltholicToolbarUI.items.RIDING, value)
+ LeoAltholicToolbarUI.RestorePosition()
+ LeoAltholicToolbarUI.update()
+ end,
+ },{
+ type = "checkbox",
+ name = GetString(SI_GAMEPAD_SMITHING_CURRENT_RESEARCH_HEADER),
+ default = true,
+ disabled = function() return not LeoAltholicToolbarUI.IsEnabled() end,
+ width = "half",
+ getFunc = function() return LeoAltholicToolbarUI.GetItem(LeoAltholicToolbarUI.items.RESEARCH) end,
+ setFunc = function(value)
+ LeoAltholicToolbarUI.SetItem(LeoAltholicToolbarUI.items.RESEARCH, value)
+ LeoAltholicToolbarUI.RestorePosition()
+ LeoAltholicToolbarUI.update()
+ end,
+ },{
+ type = "checkbox",
+ 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.WRITSTATUS) end,
+ setFunc = function(value)
+ LeoAltholicToolbarUI.SetItem(LeoAltholicToolbarUI.items.WRITSTATUS, value)
+ LeoAltholicToolbarUI.RestorePosition()
+ LeoAltholicToolbarUI.update()
+ end,
+ }
+ }
+ },{
+ type = "header",
+ name = "|c3f7fff"..GetString(LEOALT_TRACKED_QUESTS).."|r"
+ },{
+ type = "description",
+ text = GetString(LEOALT_ACCOUNT_CONFIGURATION)
+ },{
+ type = "checkbox",
+ name = GetString(LEOALT_AUTO_TRACK_WRIT),
+ default = true,
+ getFunc = function() return LeoAltholic.globalData.settings.tracked.dailyWrits end,
+ setFunc = function(value)
+ LeoAltholic.globalData.settings.tracked.dailyWrits = value
+ end,
+ },{
+ type = "checkbox",
+ name = GetString(LEOALT_AUTO_TRACK_DAILY),
+ default = true,
+ getFunc = function() return LeoAltholic.globalData.settings.tracked.allDaily end,
+ setFunc = function(value)
+ LeoAltholic.globalData.settings.tracked.allDaily = value
+ end,
+ },{
+ type = "header",
+ name = "|c3f7fff"..GetString(LEOALT_COMPLETED_RESEARCH).."|r"
+ },{
+ type = "description",
+ text = GetString(LEOALT_ACCOUNT_CONFIGURATION)
+ },{
+ type = "checkbox",
+ name = GetString(LEOALT_CHAT_ALL),
+ tooltip = GetString(LEOALT_CHAT_ALL_TOOLTIP),
+ default = true,
+ getFunc = function() return LeoAltholic.globalData.settings.completedResearch.chat end,
+ setFunc = function(value)
+ LeoAltholic.globalData.settings.completedResearch.chat = value
+ end,
+ },{
+ type = "checkbox",
+ name = GetString(LEOALT_CENTERSCREEN_CURRENT),
+ tooltip = GetString(LEOALT_CENTERSCREEN_CURRENT_TOOLTIP),
+ default = true,
+ getFunc = function() return LeoAltholic.globalData.settings.completedResearch.screen end,
+ setFunc = function(value)
+ LeoAltholic.globalData.settings.completedResearch.screen = value
+ end,
+ }
+ }
+ LAM:RegisterOptionControls(OptionsName, optionsData)
end
function LeoAltholic_Settings_OnMouseEnter(control, tooltip)
- InitializeTooltip(InformationTooltip, control, BOTTOMLEFT, 0, -2, TOPLEFT)
- SetTooltipText(InformationTooltip, tooltip)
+ InitializeTooltip(InformationTooltip, control, BOTTOMLEFT, 0, -2, TOPLEFT)
+ SetTooltipText(InformationTooltip, tooltip)
end
diff --git a/ui/checklist.lua b/ui/checklist.lua
index 6477406..840f7ba 100644
--- a/ui/checklist.lua
+++ b/ui/checklist.lua
@@ -1,121 +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 = 950; top = 42; } --TevaNOTE was: { 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 = false end --TevaNOTE: was true
- 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 = true end --TevaNOTE: was false
- 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 --added by Teva
- LeoAltholicChecklist:SetHidden(false)
- LeoAltholicChecklistUI.MaximizeUI()
- else
- LeoAltholicChecklist:SetHidden(false)
- LeoAltholicChecklistUI.MinimizeUI()
- 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
@@ -127,357 +127,359 @@ 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
- panel:SetHidden(false)
- LeoAltholicChecklistMinButton:SetHidden(false)
- LeoAltholicChecklistMaxButton:SetHidden(true)
+ if not LeoAltholicChecklistUI.IsEnabled() then return end
+ 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
+ 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
+ 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
+ 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) --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)
+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 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 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 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"
+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) --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"
+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) --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"
+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) --Teva changed these settings
- texture:SetTexture("esoui/art/buttons/decline_up.dds")
- texture:SetColor(1,0,0,1) --red
- texture.tooltip = "Quest Abandoned"
+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()
+ 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
+ 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
+ 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
+ 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)
- lastUpdated = nil
- lastPreDeliver = 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")
- 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!
+ 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)
+ 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)
- lastStarted = nil
- lastUpdated = nil
- lastPreDeliver = nil
+ 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)
+ 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
- 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
+ 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
+ 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 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 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
+ 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
+ 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 > 0 and char.attributes.riding.time - GetTimeStamp() > 0 then
+ doneItem(label, texture)
+ LeoAltholicChecklistUI.checkAllDone()
+ else
+ betweenItem(label, texture)
+ 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 164f97d..52e936f 100644
--- a/ui/toolbar.lua
+++ b/ui/toolbar.lua
@@ -1,300 +1,301 @@
LeoAltholicToolbarUI.items = {
- INVENTORY = 1,
- BANKSIZE = 2,
- WRITSTATUS = 3,
- RESEARCH = 4,
- RIDING = 5
+ 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; } --original code
- return LeoAltholic.globalData.toolbar.position or { left = 1200; top = 1580; } --Teva's mod to personalize position for all accounts
+-- 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
+ 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
+ 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
+ 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
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
+ 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
+ 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
+ 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")
+ 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
+ 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
+ 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
+-- 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
+ 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
+ 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
+ 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)
+ 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)
+ if char.attributes.riding.time - GetTimeStamp() < 0 and LeoAltholicChecklistUI.GetRiding() then
+ shownChecklist = true
+ icon:SetHidden(false)
+ icon:SetColor(1,0,0,1)
+ icon:SetAnchor(TOPLEFT, checklist, TOPLEFT, checklistOffsetX, -4)
checklistOffsetX = checklistOffsetX + 35
- end
+ offsetX = offsetX + 30
+ end
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-- ChecklistLine (associated with Writs) --
- else
- checklist:SetHidden(true) --TevaNOTE: should show/hide all writ status icons
- end
+ 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
+ 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")
@@ -338,35 +339,35 @@ function LeoAltholicToolbarUI.update()
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
+ 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
+ if numSections > 0 then
+ toolbar:SetWidth(totalWidth)
+ GetControl(toolbar, "BG"):SetWidth(totalWidth)
+ checkCenter()
+ else
+ toolbar:SetHidden(true)
+ end
end