ESOUI

ESOUI (https://www.esoui.com/forums/index.php)
-   General Authoring Discussion (https://www.esoui.com/forums/forumdisplay.php?f=174)
-   -   Highlight Outline on Mouse Enter (https://www.esoui.com/forums/showthread.php?t=9910)

static_recharge 09/07/21 06:54 AM

Highlight Outline on Mouse Enter
 
So I thought this would be easy to do, and this is not my first UI project, but I can't seem to figure this one bit out. I have a grid of coordinates that I want the user to select a square from. When they mouse over a square I want the outline to change colors showing their selection and then obviously clicking on it will activate my function for what to do with that information. I can't for the life of me figure out how to create the outline effect that I'm looking for though. Any help would be appreciated!

Baertram 09/07/21 03:09 PM

Check Circonians Outline Control addon and instead of keybidings use control:SetHandler for OnMouseEnter / Exit. It adds new controls anchored to the control your mouse is above, to show the rectangle outline.
Please give him credit if you use his code/idea (partially).

static_recharge 09/08/21 01:23 PM

Thanks for the reply, I did not have a look at that add-on yet, but I did find a solution myself. First off I was being blind and forgot add the "mouseEnabled" feature to the control. Second this is all I had to do to get it to work from within the xml file itself:

Code:

<OnMouseEnter> self:GetNamedChild("BG"):SetEdgeColor(0.4, 0.6, 1) </OnMouseEnter>
<OnMouseExit> self:GetNamedChild("BG"):SetEdgeColor(0.6, 0.6, 0.6) </OnMouseExit>


Baertram 09/16/21 02:29 AM

Thanks for the update. This could make the other addon easier as well as it wont need to add new controls anymore, just change the edge colors.


All times are GMT -6. The time now is 03:40 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI