Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function refreshWidgetOnLoad()
- debug.trace("iEquip_WidgetCore refreshWidgetOnLoad start")
- bRefreshingWidgetOnLoad = true
- bLeftIconFaded = false
- int Q
- form fItem
- int potionGroup = asPotionGroups.find(jMap.getStr(jArray.getObj(aiTargetQ[3], aiCurrentQueuePosition[3]), "iEquipName"))
- UI.InvokeInt(HUD_MENU, WidgetRoot + ".setBackgrounds", iBackgroundStyle)
- if !bDropShadowEnabled
- UI.InvokeBool(HUD_MENU, WidgetRoot + ".handleTextFieldDropShadow", true)
- endIf
- initQueuePositionIndicators()
- int count
- while Q < 8
- count = jArray.count(aiTargetQ[Q])
- abIsNameShown[Q] = true
- if Q < 5
- if Q < 3 && (count < 1 || !PlayerRef.GetEquippedObject(Q))
- setSlotToEmpty(Q, true, (count > 0))
- else
- if Q < 2
- checkAndUpdatePoisonInfo(Q)
- CM.initChargeMeter(Q)
- CM.initSoulGem(Q)
- endIf
- if Q == 0 && bAmmoMode
- updateWidget(Q, AM.aiCurrentAmmoIndex[AM.Q])
- else
- updateWidget(Q, aiCurrentQueuePosition[Q])
- endIf
- if abIsCounterShown[Q]
- if Q == 0 && bAmmoMode
- fItem = AM.currentAmmoForm
- else
- fItem = jMap.getForm(jArray.getObj(aiTargetQ[Q], aiCurrentQueuePosition[Q]), "iEquipForm")
- endIf
- if Q == 3 && potionGroup != -1
- count = PO.getPotionGroupCount(potionGroup)
- setSlotCount(3, count)
- if count < 1
- checkAndFadeConsumableIcon(true)
- elseIf bConsumableIconFaded
- checkAndFadeConsumableIcon(false)
- endIf
- elseIf Q == 4
- if count < 1
- handleEmptyPoisonQueue()
- else
- setSlotCount(4, PlayerRef.GetItemCount(fItem)) ;line 589
- if bPoisonIconFaded
- checkAndFadePoisonIcon(false)
- endIf
- endIf
- elseIf fItem && !(Q < 2 && abPoisonInfoDisplayed[Q])
- setSlotCount(Q, PlayerRef.GetItemCount(fItem))
- endIf
- endIf
- endIf
- else
- updateWidget(Q, aiCurrentlyPreselected[Q - 5]) ;line 600
- endIf
- Q += 1
- endwhile
- if bEnabled
- CM.updateChargeMeters(true)
- ;And finally if we've loaded a save where the player is in beast form toggle the widget now
- if EH.bPlayerIsABeast
- BM.onPlayerTransform(PlayerRef.GetRace(), EH.bPlayerIsAVampire, true)
- else
- updateSlotsEnabled()
- endIf
- endIf
- ;just to make sure!
- UI.setbool(HUD_MENU, "_root.HUDMovieBaseInstance.ArrowInfoInstance._alpha", 0)
- bRefreshingWidgetOnLoad = false
- debug.trace("iEquip_WidgetCore refreshWidgetOnLoad end")
- endFunction
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement