1. Is it possible to make a set of custom buttons that aren't square? My idea would look like a wheel, or a pie where the wedges are each a button. This would create a unique look and compact design for what I want. If this is discussed in the book (ver 2) I'd be more then happy to read it there, before wasting your time.

    I'd also like to say to James, thank you so much for what you do here. Your books, website, and time are greatly appreciated.

  2. Thank you for the kind words. There's nothing to stop you from making a button that isn't square shaped, but the 'clickable' portion of the frame will always be a rectangle.. that's just a limitation of the system. You can make it smaller so it works out to function properly. I suggest you look at ButtonFacade, it's capable of skinning buttons to appear circular.

    Hint: it's not easy =)

  3. I've been programming for a long time as a hobby, yet I've never done anything with circles nor lua for that matter. However, I still think this can be done. If you know where the center point is and the radius, you should be able to gather the points inside a circle. Also you can grab the mouse cursor position. If your center point of the circle is always relative to the TOPLEFT of your frame, you could always know the inside parts of the circle.

    My hang up is, how do you exactly get all the coords for the circle and put them into some kind of a table or array? Or at least check to see if the mouse is inside of the hypothetical circle (I'd just have a texture behind it that shows it's dimensions).

    I know I'm over my head here, but I'm hopeful that it's possible. If a good library was made for this, it could change how mods are made in the future. I did look at buttonfacade, but that's not exactly what I'm trying to do. In fact come to think of it... I seem to remember recount having a pie chart for it's damage. I'll have to look into that.

  4. I've been programming for a long time as a hobby, yet I've never done anything with circles nor lua for that matter. However, I still think this can be done. If you know where the center point is and the radius, you should be able to gather the points inside a circle. Also you can grab the mouse cursor position. If your center point of the circle is always relative to the TOPLEFT of your frame, you could always know the inside parts of the circle.

    A click has to be initiated by the game client in order for anything to actually work. If you want button that can cast spells or target units or take any manner of protected action then the click must originate from the game client as so this doesn't work. You must approximate it with a 'hit rectangle', which is indeed a rectangle.

    Perhaps I overstated the problem with this approach, it works just fine for those addons that use it.

    My hang up is, how do you exactly get all the coords for the circle and put them into some kind of a table or array? Or at least check to see if the mouse is inside of the hypothetical circle (I'd just have a texture behind it that shows it's dimensions).

    That's just an exercise in Lua, not terribly difficult but not a solution to the problem.

    I know I'm over my head here, but I'm hopeful that it's possible. If a good library was made for this, it could change how mods are made in the future. I did look at buttonfacade, but that's not exactly what I'm trying to do. In fact come to think of it... I seem to remember recount having a pie chart for it's damage. I'll have to look into that.

    Drawing is different than having interactive elements. I'm sorry to say you cannot have a button with a hit area that is not a rectangle if you want the button to do anything useful.

  5. Thanks, sorry I'm being stubborn.

  6. I don't think you're being stubborn at all, it's good to ask questions =)