Skip to content

Commit

Permalink
10.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
sirinsidiator committed Apr 16, 2024
1 parent 3bbbce3 commit 04e7e38
Show file tree
Hide file tree
Showing 290 changed files with 38,232 additions and 24,787 deletions.
677 changes: 579 additions & 98 deletions ESOUIDocumentation.txt

Large diffs are not rendered by default.

9 changes: 4 additions & 5 deletions README.md
@@ -1,14 +1,13 @@
© 2023 ZENIMAX MEDIA INC. TRADEMARKS BELONG TO THEIR RESPECTIVE OWNERS. ALL RIGHTS RESERVED.
© 2024 ZENIMAX MEDIA INC. TRADEMARKS BELONG TO THEIR RESPECTIVE OWNERS. ALL RIGHTS RESERVED.

This is the source code for "The Elder Scrolls Online" user interface and it's presented here unchanged for reference only.

If you're a Zenimax Media Inc. representative and have any objection to any of the contents in this repository please let me know.

This repo is also available at http://www.esoui.com/downloads/info1213-ESOUI-TheElderScrollsOnlinesourcecode.html

**Last update: 9.3.7 (API 101041) on 08 Apr 2024.**
**Last update: 10.0.0 (API 101042) on 16 Apr 2024.**

*Join ESOUI Dev Community on Gitter :*

[![Join the chat at https://gitter.im/esoui/esoui](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/ESOUI/ESOUI?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
*Join the ESOUI Dev Community on Matrix:*

[![Matrix](https://img.shields.io/matrix/esoui_esoui%3Agitter.im?server_fqdn=matrix.org)](https://matrix.to/#/#esoui_esoui:gitter.im)
4 changes: 2 additions & 2 deletions bin/update → bin/update-pts
Expand Up @@ -2,7 +2,7 @@

set -ue

git checkout master
git checkout pts
find esoui/ -type f -name "*.dds" > Textures.txt
grep -Phor 'EsoUI[^"]+?\.dds' esoui/ >> Textures.txt
cat Textures.txt | tr '[A-Z]\\' '[a-z]/' | sort -u > 1.txt
Expand All @@ -18,4 +18,4 @@ sed -i "s#API [0-9]\+#API ${new_apiversion:-$apiversion}#" README.md
sed -i "s# on .\+\?\.# on $today.#" README.md
git add esoui
git commit -am "${new_version:-$version}"
git archive --format zip -o esoui-${new_version:-$version}.zip HEAD
git archive --format zip -o esoui-pts-${new_version:-$version}.zip HEAD
18 changes: 9 additions & 9 deletions esoui/app/loadingscreen/sharedloadingscreen.lua
Expand Up @@ -170,16 +170,16 @@ end

local BATTLEGROUND_TEAM_TEXTURES =
{
[BATTLEGROUND_ALLIANCE_FIRE_DRAKES] = "EsoUI/Art/Battlegrounds/battlegrounds_teamIcon_orange.dds",
[BATTLEGROUND_ALLIANCE_STORM_LORDS] = "EsoUI/Art/Battlegrounds/battlegrounds_teamIcon_purple.dds",
[BATTLEGROUND_ALLIANCE_PIT_DAEMONS] = "EsoUI/Art/Battlegrounds/battlegrounds_teamIcon_green.dds",
[BATTLEGROUND_TEAM_FIRE_DRAKES] = "EsoUI/Art/Battlegrounds/battlegrounds_teamIcon_orange.dds",
[BATTLEGROUND_TEAM_STORM_LORDS] = "EsoUI/Art/Battlegrounds/battlegrounds_teamIcon_purple.dds",
[BATTLEGROUND_TEAM_PIT_DAEMONS] = "EsoUI/Art/Battlegrounds/battlegrounds_teamIcon_green.dds",
}

local GAMEPAD_BATTLEGROUND_TEAM_TEXTURES =
{
[BATTLEGROUND_ALLIANCE_FIRE_DRAKES] = "EsoUI/Art/Battlegrounds/Gamepad/gp_battlegrounds_teamIcon_orange.dds",
[BATTLEGROUND_ALLIANCE_STORM_LORDS] = "EsoUI/Art/Battlegrounds/Gamepad/gp_battlegrounds_teamIcon_purple.dds",
[BATTLEGROUND_ALLIANCE_PIT_DAEMONS] = "EsoUI/Art/Battlegrounds/Gamepad/gp_battlegrounds_teamIcon_green.dds",
[BATTLEGROUND_TEAM_FIRE_DRAKES] = "EsoUI/Art/Battlegrounds/Gamepad/gp_battlegrounds_teamIcon_orange.dds",
[BATTLEGROUND_TEAM_STORM_LORDS] = "EsoUI/Art/Battlegrounds/Gamepad/gp_battlegrounds_teamIcon_purple.dds",
[BATTLEGROUND_TEAM_PIT_DAEMONS] = "EsoUI/Art/Battlegrounds/Gamepad/gp_battlegrounds_teamIcon_green.dds",
}

function LoadingScreen_Base:Show(zoneName, zoneDescription, loadingTexture, zoneDisplayType)
Expand Down Expand Up @@ -233,9 +233,9 @@ function LoadingScreen_Base:Show(zoneName, zoneDescription, loadingTexture, zone
self:SetZoneDescription(LocalizeString("<<1>>", battlegroundDescription))

local activityAlliance = GetLatestActivityAlliance()
if activityAlliance ~= BATTLEGROUND_ALLIANCE_NONE then
local r, g, b, a = GetInterfaceColor(INTERFACE_COLOR_TYPE_BATTLEGROUND_ALLIANCE, activityAlliance)
local battlegroundTeamName = ZO_ColorizeString(r, g, b, GetString("SI_BATTLEGROUNDALLIANCE", activityAlliance))
if activityAlliance ~= BATTLEGROUND_TEAM_INVALID then
local r, g, b, a = GetInterfaceColor(INTERFACE_COLOR_TYPE_BATTLEGROUND_TEAM, activityAlliance)
local battlegroundTeamName = ZO_ColorizeString(r, g, b, GetString("SI_BATTLEGROUNDTEAM", activityAlliance))

local teamIcon
if IsInGamepadPreferredMode() then
Expand Down
2 changes: 2 additions & 0 deletions esoui/common/common.txt
Expand Up @@ -70,6 +70,8 @@ EsoUI\Common\ZO_SaveLoadDialog\ZO_SaveLoadDialog.lua

EsoUI\Common\Scenes\CommonFragments.lua

EsoUI\Common\TextSearch\TextSearchObject.lua

EsoUI\Common\ZO_PlayerInventoryFooter\Gamepad\ZO_PlayerInventoryFooter_Gamepad.lua
EsoUI\Common\ZO_PlayerInventoryFooter\Gamepad\ZO_PlayerInventoryFooter_Gamepad.xml

Expand Down
3 changes: 2 additions & 1 deletion esoui/common/gamepad/genericheaders/genericheaders.lua
Expand Up @@ -509,9 +509,10 @@ local function AdjustHeaderFocusControlAnchors(control, refreshResults)
anchorToControl = control.controls[previousTarget]
elseif control.tabBar and control.tabBar.control then
anchorToControl = control.tabBar.control
elseif control.controls[DIVIDER_SIMPLE] then
anchorToControl = control.controls[DIVIDER_SIMPLE]
end
control.headerFocusControl:ClearAnchors()
if anchorToControl then
control.headerFocusControl:SetAnchor(TOPLEFT, anchorToControl, BOTTOMLEFT, 0, 0)
Expand Down
141 changes: 141 additions & 0 deletions esoui/common/textsearch/textsearchobject.lua
@@ -0,0 +1,141 @@
ZO_TextSearchObject = ZO_InitializingObject:Subclass()

function ZO_TextSearchObject:Initialize(searchContext, searchEditBox)
self.searchContext = searchContext
self.searchEditBox = searchEditBox

self:SetupContextTextSearch()
self:SetupOnTextChangedHandler()
end

function ZO_TextSearchObject:SetupContextTextSearch()
-- Can be overridden
-- Context can be setup elsewhere in the code to be used here.
-- The TEXT_SEARCH_MANAGER function will override the filter target descriptors for a context that already exists.
--[[
Expected format for filterTargetDescriptors:
filterTargetDescriptors =
{
[<FilterTarget>] =
{
searchFilterList =
{
BACKGROUND_LIST_FILTER_TYPE_<FilterType>,
...
},
primaryKeys =
{
<List of keys> (ie. BAG_BACKPACK, BAG_BANK for FILTER_TARGET_BAG_SLOT or filterFunction() for filter like slottable in FILTER_TARGET_COLLECTIBLE)
},
},
}
TEXT_SEARCH_MANAGER:SetupContextTextSearch(self.searchContext, filterTargetDescriptor)
]]--
end

function ZO_TextSearchObject:SetupOnTextChangedHandler()
local currentSearchEditBox = self:GetSearchEditBox()
if currentSearchEditBox then
local function OnTextSearchTextChanged(editBox)
self:OnTextSearchTextChanged(editBox)
end
currentSearchEditBox:SetHandler("OnTextChanged", OnTextSearchTextChanged)
end
end

function ZO_TextSearchObject:SetTextSearchContext(context)
self.searchContext = context
end

function ZO_TextSearchObject:SetSearchEditBox(searchEditBox)
self.searchEditBox = searchEditBox
self:SetupOnTextChangedHandler()
end

function ZO_TextSearchObject:GetSearchEditBox()
return self.searchEditBox
end

function ZO_TextSearchObject:SetSearchCriteria(filterType, context, editBox)
local previousContextActive = TEXT_SEARCH_MANAGER:IsActiveTextSearch(self.searchContext)
if previousContextActive then
self:DeactivateTextSearch()
end
self.searchFilterType = filterType
self.searchContext = context
if editBox then
self:SetSearchEditBox(editBox)
end
if previousContextActive then
self:ActivateTextSearch()
end
end

function ZO_TextSearchObject:OnTextSearchTextChanged(editBox)
if self.searchContext then
TEXT_SEARCH_MANAGER:SetSearchText(self.searchContext, editBox:GetText())
end
end

function ZO_TextSearchObject:OnUpdateSearchResults()
-- To be overridden
end

function ZO_TextSearchObject:SetSearchText()
if self.searchContext then
TEXT_SEARCH_MANAGER:SetSearchText(self.searchContext, self:GetTextSearchText())
end
end

function ZO_TextSearchObject:GetTextSearchText()
local searchEditBox = self:GetSearchEditBox()
if searchEditBox then
return searchEditBox:GetText()
end
return ""
end

function ZO_TextSearchObject:UpdateSearchText()
if self.searchEditBox and self.searchContext then
self.searchEditBox:SetText(TEXT_SEARCH_MANAGER:GetSearchText(self.searchContext))
end
end

function ZO_TextSearchObject:ActivateTextSearch()
if self.searchContext and not TEXT_SEARCH_MANAGER:IsActiveTextSearch(self.searchContext) then
self:UpdateSearchText()

local function OnTextSearchResults()
self.dirty = true
self:OnUpdateSearchResults()
end
self.onTextSearchResults = OnTextSearchResults

TEXT_SEARCH_MANAGER:ActivateTextSearch(self.searchContext)
TEXT_SEARCH_MANAGER:RegisterCallback("UpdateSearchResults", OnTextSearchResults)
end
end

function ZO_TextSearchObject:DeactivateTextSearch()
if self.searchContext then
TEXT_SEARCH_MANAGER:DeactivateTextSearch(self.searchContext)
TEXT_SEARCH_MANAGER:UnregisterCallback("UpdateSearchResults", self.onTextSearchResults)
end
end

function ZO_TextSearchObject:HasSearchFilter()
return TEXT_SEARCH_MANAGER:HasSearchFilter(self.searchContext)
end

function ZO_TextSearchObject:SetSearchFilterType(searchFilterType)
self.searchFilterType = searchFilterType
end

function ZO_TextSearchObject:IsDataInSearchTextResults(dataId)
if self.searchContext and self.searchFilterType then
return TEXT_SEARCH_MANAGER:IsDataInSearchTextResults(self.searchContext, self.searchFilterType, dataId)
end
-- Return true for every result if we don't have a context search
return true
end
4 changes: 4 additions & 0 deletions esoui/common/tooltip/tooltipstyles.lua
Expand Up @@ -114,6 +114,10 @@ ZO_TOOLTIP_STYLES =
{
fontColorField = GAMEPAD_TOOLTIP_COLOR_FAILED,
},
disabled =
{
fontColorField = GENERAL_COLOR_GREY,
},
bodySection =
{
customSpacing = 30,
Expand Down
6 changes: 5 additions & 1 deletion esoui/common/zo_gamemenu/zo_gamemenu.lua
Expand Up @@ -34,6 +34,10 @@ function ZO_GameMenu_Base:InitializeTree()
BaseTreeHeaderSetup(node, control, data, open)

if open and userRequested then
if data.selectedCallback then
data.selectedCallback(control)
end

self.navigationTree:SelectFirstChild(node)
end
end
Expand Down Expand Up @@ -121,7 +125,7 @@ function ZO_GameMenu_Base:AddEntry(data)
else
-- It's a header...determine what type
if not self.headerControls[data.name] then
if data.callback then
if data.callback then --TODO: Changing behavior on existence of callback is strange.
-- No children...does it have a selected state?
if data.hasSelectedState then
self.headerControls[data.name] = self.navigationTree:AddNode("ZO_GameMenu_ChildlessHeader_WithSelectedState", data)
Expand Down
9 changes: 8 additions & 1 deletion esoui/ingame/achievements/gamepad/achievements_gamepad.lua
Expand Up @@ -747,6 +747,12 @@ function ZO_Achievements_Gamepad:AddAchievements(categoryIndex, subCategoryIndex

local postSelectedPadding = IsAchievementALine(nextAchievementId) and 48 or 0
self.itemList:AddEntry(template, entryData, nil, nil, nil, postSelectedPadding)

if self.achievementId and DoesAchievementLineContainAchievement(achievementId, self.achievementId) then
-- currentIndex is only in the current category. self.itemList:GetNumItems() has all current items.
self.selectedAchievementIndices[self.selectedCategoryId] = self.itemList:GetNumItems()
self.achievementId = nil
end
end
end
end
Expand Down Expand Up @@ -822,8 +828,9 @@ function ZO_Achievements_Gamepad:PerformUpdate()
self:SetRecentAchievementsHidden(false)
self.headerData.titleText = GetString(SI_JOURNAL_MENU_ACHIEVEMENTS)
else
selectedIndex = self.selectedAchievementIndices[self.visibleCategoryId] or 1
self:PopulateAchievements(self.visibleCategoryId)
-- Determine the selected index AFTER PopulateAchievements because Populate will mark any specific self.achievementId requested.
selectedIndex = self.selectedAchievementIndices[self.visibleCategoryId] or 1
self:SetRecentAchievementsHidden(true)
self.headerData.titleText = GetAchievementCategoryInfo(self.visibleCategoryId)
end
Expand Down
24 changes: 16 additions & 8 deletions esoui/ingame/actionbar/actionbar.lua
Expand Up @@ -9,6 +9,12 @@ local g_activeHotbar = HOTBAR_CATEGORY_PRIMARY
local g_backHotbar = HOTBAR_CATEGORY_BACKUP
local MINIMUM_ACTION_BAR_TIMER_DISPLAYED_TIME_MS = 1000

ZO_ABILITY_DROP_CALLOUT_VALIDITY_FUNCTION_BY_ACTION_TYPE =
{
[ACTION_TYPE_ABILITY] = IsValidAbilityForSlot,
[ACTION_TYPE_CRAFTED_ABILITY] = IsValidCraftedAbilityForSlot,
}

function ZO_ActionBar_HasAnyActionSlotted()
for physicalSlot in pairs(g_actionBarButtons) do
if GetSlotType(physicalSlot, g_activeHotbar) ~= ACTION_TYPE_NOTHING then
Expand Down Expand Up @@ -202,17 +208,17 @@ local function HideAllAbilityActionButtonDropCallouts()
end
end

local function ShowAppropriateAbilityActionButtonDropCallouts(abilityIndex)
local function ShowAppropriateAbilityActionButtonDropCallouts(actionType, actionValue)
HideAllAbilityActionButtonDropCallouts()

local validityFunction = ZO_ABILITY_DROP_CALLOUT_VALIDITY_FUNCTION_BY_ACTION_TYPE[actionType]
for i = ACTION_BAR_FIRST_NORMAL_SLOT_INDEX + 1, ACTION_BAR_ULTIMATE_SLOT_INDEX + 1 do
local isValid = IsValidAbilityForSlot(abilityIndex, i)
local callout = ZO_ActionBar_GetButton(i).slot:GetNamedChild("DropCallout")

if not isValid then
callout:SetColor(1, 0, 0, 1)
else
if validityFunction(actionValue, i) then
callout:SetColor(1, 1, 1, 1)
else
callout:SetColor(1, 0, 0, 1)
end

callout:SetHidden(false)
Expand Down Expand Up @@ -452,7 +458,7 @@ function ZO_ActionBar_RegisterEvents()
for _, physicalSlot in pairs(g_actionBarButtons) do
if physicalSlot then
local slotType = GetSlotType(physicalSlot:GetSlot())
if slotType == ACTION_TYPE_ABILITY then
if slotType == ACTION_TYPE_ABILITY or slotType == ACTION_TYPE_CRAFTED_ABILITY then
physicalSlot:UpdateState()
end
end
Expand Down Expand Up @@ -485,8 +491,8 @@ function ZO_ActionBar_RegisterEvents()
ShowHiddenButtons()
end

if cursorType == MOUSE_CONTENT_ACTION and param1 == ACTION_TYPE_ABILITY then
ShowAppropriateAbilityActionButtonDropCallouts(param3)
if cursorType == MOUSE_CONTENT_ACTION and ZO_ABILITY_DROP_CALLOUT_VALIDITY_FUNCTION_BY_ACTION_TYPE[param1] then
ShowAppropriateAbilityActionButtonDropCallouts(param1, param3)
end
end
EVENT_MANAGER:RegisterForEvent("ZO_ActionBar", EVENT_CURSOR_PICKUP, OnCursorPickup)
Expand Down Expand Up @@ -656,6 +662,7 @@ function ZO_ActionBar_OnInitialized(control)
ultimateButton:SetupTimerSwapAnimation()

ultimateButton:UpdateUltimateMeter()
EVENT_MANAGER:RegisterForEvent("ZO_ActionBar", EVENT_ULTIMATE_ABILITY_COST_CHANGED, function() ultimateButton:UpdateUltimateMeter() end)

local COMPANION_ULTIMATE_BUTTON_STYLE =
{
Expand All @@ -674,6 +681,7 @@ function ZO_ActionBar_OnInitialized(control)

companionUltimateButton:UpdateUltimateMeter()
SetCompanionAnchors()
EVENT_MANAGER:RegisterForEvent("ZO_ActionBar", EVENT_ULTIMATE_ABILITY_COST_CHANGED, function() companionUltimateButton:UpdateUltimateMeter() end)

local BACK_BAR_STYLE =
{
Expand Down

0 comments on commit 04e7e38

Please sign in to comment.