1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 |
return guildHistory
end
end
end )
end )
end
end )
else
end
end )
local narrations = { }
ZO_AppendNarration ( narrations , SCREEN_NARRATION_MANAGER : CreateNarratableObject ( zo_strformat ( SI_GAMEPAD_PAGED_LIST_PAGE_NUMBER_NARRATION , self . currPageNum ) ) )
end
return narrations
end
}
end )
if newState == SCENE_SHOWING then
--The category list is shared among all the guild screens so it needs to be built each time screen shows
elseif newState == SCENE_HIDING then
end
end )
end
end
end
end
local categoryId = targetData . categoryId
return DoesGuildHistoryCategoryHaveOutstandingRequest ( self . guildId , categoryId ) or IsGuildHistoryCategoryRequestQueued ( self . guildId , categoryId )
end
end
local categoryId = targetData . categoryId
if numEvents >= nextStartIndex then
return true
else
return DoesGuildHistoryCategoryHaveMoreEvents ( self . guildId , categoryId ) and not self : IsTryingToGetMoreEvents ( )
end
end
return
end
local categoryId = targetData . categoryId
--If we have enough events to fill the next page already or there are no more events to fetch then just show the next page, otherwise request more events.
if numEvents >= numEventsRequiredToFillPage or not DoesGuildHistoryCategoryHaveMoreEvents ( self . guildId , categoryId ) then
else
end
--Re-narrate the header when changing pages
local NARRATE_HEADER = true
end
return
end
end
--Re-narrate the header when changing pages
local NARRATE_HEADER = true
end
local PADDING = 0
local newControl = CreateControlFromVirtual ( "$(parent)ActivityItem" , parent , "ZO_GuildHistory_Gamepad_ActivityItem" , index )
return newControl
end
--Re-narrate when selecting a new entry
else
end
end
end
-- Add the hidden "previous page" item.
} )
-- Add the main items.
local itemIndex = 0
while ( previous : GetBottom ( ) + previous : GetHeight ( ) ) < containerBottom do -- We know all items have a uniform height, so add the height to the bottom to ensure we have enough room for another item.
itemIndex = itemIndex + 1
local itemIndexInternal = itemIndex -- Needs to be local to the loop for the capture just below.
--The narration for the description is handled by the tooltip, so just narrate the time here
end ,
} )
end
-- Add the hidden "next page" item.
} )
end
self . control : RegisterForEvent ( EVENT_GUILD_HISTORY_CATEGORY_UPDATED , function ( _ , guildId , category ) self : OnGuildHistoryCategoryUpdated ( guildId , category ) end )
self . control : RegisterForEvent ( EVENT_GUILD_HISTORY_RESPONSE_RECEIVED , function ( ) self : OnGuildHistoryResponseReceived ( ) end )
end
-- The keybind descriptor for when focus is on the category list.
GAME_NAVIGATION_TYPE_BUTTON ,
nil , -- default name
nil , -- always visible
)
ZO_Gamepad_AddBackNavigationKeybindDescriptors ( self . categoryKeybindStripDescriptor , GAME_NAVIGATION_TYPE_BUTTON , function ( )
end )
end
-- The keybind descriptor for when focus is on the activity log list.
{
--Even though this is an ethereal keybind, the name will still be read during screen narration
etherealNarrationOrder = 1 ,
end ,
-- The shown page shows the items in self.activityList.data starting from the 2nd to the 2nd to last index.
-- By selecting the first index a transition to the previous page will be initiated, this transition will ultimately call PreviousPage() when it calls the activate function on this entry
-- The member variable selectFirstIndexOnPage is set to jump to the first item in the list on the previous page, otherwise PreviousPage() will select the last be default
end ,
} ,
{
--Even though this is an ethereal keybind, the name will still be read during screen narration
etherealNarrationOrder = 2 ,
end ,
-- The shown page shows the items in self.activityList.data starting from the 2nd to the 2nd to last index.
-- By selecting the last index a transition to the next page will be initiated, this transition will ultimately call NextPage() when it calls the activate function on this entry
end ,
}
}
ZO_Gamepad_AddBackNavigationKeybindDescriptorsWithSound ( self . logKeybindStripDescriptor , GAME_NAVIGATION_TYPE_BUTTON , function ( ) self : SelectCategoryList ( ) end )
end
end
end
-- We are not showing the log, the buttons are hidden.
else -- We are showing the log, buttons depend on page state.
end
end
end
end
end
--Narrate the header when first entering the list
local NARRATE_HEADER = true
end
end
end
end
local categoryId = targetData . categoryId
end
end
local categoryId = targetData . categoryId
if DoesGuildHistoryCategoryHaveMoreEvents ( self . guildId , categoryId ) or not HasGuildHistoryCategoryEverBeenRequested ( self . guildId , categoryId ) then
local QUEUE_REQUEST_IF_ON_COOLDOWN = true
end
end
end
end
end
end
if targetData . categoryId == category then
end
else
--Technically we only need to mark a specific category dirty, but that level of granularity only prevents rebuilding the general category first page on show which probably isn't worth the complexity.
end
end
end
end
local categoryId = targetData . categoryId
local subcategoryId = targetData . subcategoryId
-- Build and filter the event list.
local eventType , secsSinceEvent , param1 , param2 , param3 , param4 , param5 , param6 , eventId = GetGuildEventInfo ( self . guildId , categoryId , eventIndex )
if ( subcategoryId == nil ) or ( subcategoryId == eventSubcategoryID ) then
local eventData = {
eventId = eventId ,
eventType = eventType ,
secsSinceEvent = secsSinceEvent ,
param1 = param1 ,
param2 = param2 ,
param3 = param3 ,
param4 = param4 ,
param5 = param5 ,
param6 = param6 ,
}
end
end
end
end
--Update keybinds
-- Update the trigger buttons.
--If this page isn't full then we may not have gotten enough new events in this category to fill it...
--if we can request more then try that
else
--if we can't request more then we need to go back to the previous page since if this page is empty because there will be nothing to fill it
end
end
end
local description = eventData . formatFunction ( eventData . eventType , eventData . param1 , eventData . param2 , eventData . param3 , eventData . param4 , eventData . param5 , eventData . param6 )
local descriptionNarration = nil
descriptionNarration = eventData . narrationFormatFunction ( eventData . eventType , eventData . param1 , eventData . param2 , eventData . param3 , eventData . param4 , eventData . param5 , eventData . param6 )
end
displayItem . descriptionNarration = descriptionNarration
end
-- Display a "no items" item if there are truly no items.
displayItem . timeText = nil
displayItem . descriptionNarration = nil
end
end
local categoryData = GUILD_HISTORY_CATEGORIES [ categoryId ]
if categoryData then
local entryData = ZO_GamepadEntryData : New ( GetString ( SI_GAMEPAD_GUILD_HISTORY_SUBCATEGORY_ALL ) , "EsoUI/Art/Guild/gamepad/gp_guild_menuIcon_showAll.dds" )
entryData . categoryId = categoryId
if categoryData . subcategories then
local index = 1
local entryData = ZO_GamepadEntryData : New ( GetString ( categoryData . subcategoryEnumName , subcategoryId ) , data . gamepadIcon )
entryData . categoryId = categoryId
entryData . subcategoryId = subcategoryId
index = index + 1
end
end
end
end
end
local currPageNum
else
currPageNum = 1
end
end
end |