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!
|
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). |
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> |
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 04:13 PM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI