Advertisement
dunc001

Untitled

Mar 2nd, 2019
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.40 KB | None | 0 0
  1. function refreshWidgetOnLoad()
  2. debug.trace("iEquip_WidgetCore refreshWidgetOnLoad start")
  3. bRefreshingWidgetOnLoad = true
  4. bLeftIconFaded = false
  5. int Q
  6. form fItem
  7. int potionGroup = asPotionGroups.find(jMap.getStr(jArray.getObj(aiTargetQ[3], aiCurrentQueuePosition[3]), "iEquipName"))
  8. UI.InvokeInt(HUD_MENU, WidgetRoot + ".setBackgrounds", iBackgroundStyle)
  9. if !bDropShadowEnabled
  10. UI.InvokeBool(HUD_MENU, WidgetRoot + ".handleTextFieldDropShadow", true)
  11. endIf
  12. initQueuePositionIndicators()
  13. int count
  14. while Q < 8
  15. count = jArray.count(aiTargetQ[Q])
  16. abIsNameShown[Q] = true
  17. if Q < 5
  18. if Q < 3 && (count < 1 || !PlayerRef.GetEquippedObject(Q))
  19. setSlotToEmpty(Q, true, (count > 0))
  20. else
  21. if Q < 2
  22. checkAndUpdatePoisonInfo(Q)
  23. CM.initChargeMeter(Q)
  24. CM.initSoulGem(Q)
  25. endIf
  26. if Q == 0 && bAmmoMode
  27. updateWidget(Q, AM.aiCurrentAmmoIndex[AM.Q])
  28. else
  29. updateWidget(Q, aiCurrentQueuePosition[Q])
  30. endIf
  31. if abIsCounterShown[Q]
  32. if Q == 0 && bAmmoMode
  33. fItem = AM.currentAmmoForm
  34. else
  35. fItem = jMap.getForm(jArray.getObj(aiTargetQ[Q], aiCurrentQueuePosition[Q]), "iEquipForm")
  36. endIf
  37. if Q == 3 && potionGroup != -1
  38. count = PO.getPotionGroupCount(potionGroup)
  39. setSlotCount(3, count)
  40. if count < 1
  41. checkAndFadeConsumableIcon(true)
  42. elseIf bConsumableIconFaded
  43. checkAndFadeConsumableIcon(false)
  44. endIf
  45. elseIf Q == 4
  46. if count < 1
  47. handleEmptyPoisonQueue()
  48. else
  49. setSlotCount(4, PlayerRef.GetItemCount(fItem)) ;line 589
  50. if bPoisonIconFaded
  51. checkAndFadePoisonIcon(false)
  52. endIf
  53. endIf
  54. elseIf fItem && !(Q < 2 && abPoisonInfoDisplayed[Q])
  55. setSlotCount(Q, PlayerRef.GetItemCount(fItem))
  56. endIf
  57. endIf
  58. endIf
  59. else
  60. updateWidget(Q, aiCurrentlyPreselected[Q - 5]) ;line 600
  61. endIf
  62. Q += 1
  63. endwhile
  64. if bEnabled
  65. CM.updateChargeMeters(true)
  66. ;And finally if we've loaded a save where the player is in beast form toggle the widget now
  67. if EH.bPlayerIsABeast
  68. BM.onPlayerTransform(PlayerRef.GetRace(), EH.bPlayerIsAVampire, true)
  69. else
  70. updateSlotsEnabled()
  71. endIf
  72. endIf
  73. ;just to make sure!
  74. UI.setbool(HUD_MENU, "_root.HUDMovieBaseInstance.ArrowInfoInstance._alpha", 0)
  75. bRefreshingWidgetOnLoad = false
  76. debug.trace("iEquip_WidgetCore refreshWidgetOnLoad end")
  77. endFunction
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement