Skip to content

Return of Reckoning

Wiki

RoR Wiki

API:RevertAllDyePreview

From RoR Wiki

UI Lua API · Dye functions
Version: WAR 1.4.8

Removes dye previews from all equipped armour, showing the real colours again.

RevertAllDyePreview()

Arguments

None.

Returns

Nothing.

Details

  • Every equipped armour piece that the client treats as dyeable is set back to its current dye colours, or to its undyed colours where it has no dye. It undoes DyeMerchantPreviewAll, DyeMerchantPreview and DyePreview.
  • It works like DyeMerchantPreviewAll(-1, -1).
  • If there is no player object or the Lua state is not available, nothing happens.
  • Any arguments are ignored.

Errors

None.

Example

From default/ea_characterwindow/source/characterwindowdyes.lua:

function CharacterWindow.ShowDyeMerchant()
    local icon = CharacterWindow.TROPHY_EMPTY_ICON
    DynamicImageSetTexture( "DyeMerchantMarketingSlotIconBase", icon.texture, icon.x, icon.y )
    CharacterWindow.MarketingRButtonDown() -- this could be called with the window already opened to dye mode
    RevertAllDyePreview()

See also