The function DisableGadgetItem() doesn't appear to work. I'm using this code to add items and then disable them based on a conditional. Despite that a call to GadgetItemText() provides the accurate text handle, the item isn't disabled. I've tried starting with an index of 1 instead of 0 also to no avail. I've also tried selecting the gadget and then getting the selected gadget and trying to disable that, but no results. What am I missing? I was expecting the item to be greyed out but nothing has changed...
Local n:Int = 0
For Local A:TAction = EachIn S.ActionList
AddGadgetItem(lstInventory, A.Name)
'Apply Effects
If Not(A.Runable())
DisableGadgetItem(lstInventory, n)
EndIf
n :+ 1
Next
|