KuiNameplates

KuiNameplates

11M Downloads

Option for only healthbar to be accepted as clickable

lakhpache opened this issue ยท 1 comments

commented

I'd like an option for every part of the nameplate except the healthbar to be click-through.

Reason:

  • The one thing that is consistent amongst every target is the size of the healthbar at 100% hp
  • A consistent & easily seen valid click-to-target area is easier to use

If the name text is clickable, then an NPC called "Cat" and an NPC called "Bombardier's Training Dummy" will have significantly different targetable nameplate dimensions. The same is true of casting mobs vs non-casting mobs, or (de)buffed mobs vs non-(de)buffed mobs.

I believe(?) that via some combination of frame:EnableMouse(false) and possibly SetNamePlateEnemyPreferredClickInsets() it should be possible to make only the healthbar accept mouse clicks? Making this customisation would be beyond the abilities of myself or most other users though, so we'd be reliant on it being implemented as part of either the Core or Custom addon.

Thanks for your consideration.

commented

The clickable area is just a static box around nameplates (which one is prioritised when they overlap is managed entirely by the game, although it can be slightly modified with that PreferredClickInsets function). It isn't changed depending on the length of the name or anything like that. You can visualise the clickable area with the command /knp debug-frames (it's the black box).

You can achieve this, although it won't be perfect, by modifying the code again. Find these lines in Kui_Nameplates_Core/config.lua (184-186):

    local width,height =
        (core.profile.frame_width * addon.uiscale)+10,
        (core.profile.frame_height * addon.uiscale)+20

Replace that with this:

    local width,height =
        (core.profile.frame_width * addon.uiscale),
        (core.profile.frame_height * addon.uiscale)

You'll probably find that the area is too small to be usable, though.

Again, this is delegated to external mods. That said, I override it in config.lua currently - so it can't be externalised trivially. Hence editing the code.