Quantcast
Highlight Outline on Mouse Enter - ESOUI
Thread Tools Display Modes
09/07/21, 06:54 AM   #1
static_recharge
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 22
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!
  Reply With Quote
09/07/21, 03:09 PM   #2
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 3,757
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).
  Reply With Quote
09/08/21, 01:23 PM   #3
static_recharge
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 22
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>
  Reply With Quote
09/16/21, 02:29 AM   #4
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 3,757
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.
  Reply With Quote

ESOUI » Developer Discussions » General Authoring Discussion » Highlight Outline on Mouse Enter

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off