Back to Home

ESO Lua File v100016

ingame/dyeing/dyeingtooldye.lua

[◄ back to folders ]
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
ZO_DyeingToolDye = ZO_DyeingToolBase:Subclass()
function ZO_DyeingToolDye:New(...)
    return ZO_DyeingToolBase.New(self, ...)
end
function ZO_DyeingToolDye:Initialize(owner)
   ZO_DyeingToolBase.Initialize(self, owner)
end
function ZO_DyeingToolDye:Activate(fromTool, suppressSounds)
    if fromTool and not suppressSounds then
        PlaySound(SOUNDS.DYEING_TOOL_DYE_SELECTED)
    end
end
function ZO_DyeingToolDye:OnLeftClicked(dyeableSlot, dyeChannel)
    SetPendingSlotDyes(dyeableSlot, zo_replaceInVarArgs(dyeChannel, self.owner:GetSelectedDyeId(), GetPendingSlotDyes(dyeableSlot)))
    self.owner:OnPendingDyesChanged(dyeableSlot)
    PlaySound(SOUNDS.DYEING_TOOL_DYE_USED)
end
function ZO_DyeingToolDye:OnSavedSetLeftClicked(dyeSetIndex, dyeChannel)
    SetSavedDyeSetDyes(dyeSetIndex, zo_replaceInVarArgs(dyeChannel, self.owner:GetSelectedDyeId(), GetSavedDyeSetDyes(dyeSetIndex)))
    self.owner:OnSavedSetSlotChanged(dyeSetIndex)
    PlaySound(SOUNDS.DYEING_TOOL_DYE_USED)
end
function ZO_DyeingToolDye:GetCursorType(dyeableSlot, dyeChannel)
    return MOUSE_CURSOR_PAINT
end