Hi, I am working on a new unit frame mostly just to learn the addons api. I got alot of stuff working but on of the features of the default ui i can't seem to figure out is how when you click it you end up selecting your own character..
From what i see this is a protected function but lots of other addons are able to do it so there must be a way.
there is also another feature which is when you hold over a unit frame (group, player or target) they will also be "selected" for the time you hover this is used by hover macros and some addons like clique.
My Addon source:
LUA:
https://pastebin.com/m6CVhNdQ
XML:
https://pastebin.com/BsA9qXFk