View Single Post
12-28-20, 06:00 PM   #1
LudiusMaximus
A Rage Talon Dragon Guard
 
LudiusMaximus's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2018
Posts: 320
AceConfig-3.0 Options: How to pass imageCoords?

In AceConfig-3.0 Options you can set an image to be displayed instead of an execute button.

But I don't understand how you are supposed to pass the imageCoords, as it says in the manual:
  • image (string|function) - path to image texture, if this is a function it can optionally return the width and height of the image as the 2nd and 3rd value, these will be used instead of imageWidth and imageHeight.
    • imageCoords (table|methodname|function) - arguments to pass to SetTexCoord, e.g. {0.1,0.9,0.1,0.9}.
    • imageWidth (number) - Width of the displayed image
    • imageHeight (number) - Height of the displayed image

The 1st return value is the image string, the 2nd and 3rd is are width and height. But what about the imageCoords table??

Lua Code:
  1. image = function()
  2.     -- What do I do with this?
  3.     local myCoords = {0.4, 0.6, 0.4, 0.6}
  4.                                  
  5.     return "Interface\\Transmogrify\\Transmogrify", "20", "20"
  6.   end,
__________________
~ Be the change you want to see in the world... of warcraft interface! ~
  Reply With Quote