Threat Plates

Threat Plates

30M Downloads

Target Highlight: Add option to show border as well as texture

Nillx opened this issue ยท 12 comments

commented

Ive been trying to edit the Target Highlighs but for some reason it works halfway. Example here:

This is how it looks in the settings (i combined Default border with the arrows but made them smaller)
1

But this is how it appears when i target something, the border is missing.
2

commented

You want to show both, right, border and texture? Without seeing the code, it's difficult to tell. Currently, there is only one texture used, so you probably added a second one, right?

commented

I converted the Crescent TGA texture to PNG, then used Photoshop to combine the arrows and the Default border into one single texture file. Then saved it as PNG and used a converter to TGA.

As you can see i managed to edit the Arrows into smaller ones and they work fine ingame. For some reason i cannot make the rectangular Default border to show, even if its one file with the arrows.

I tried editing the arrows texture again: This is how it looks in photoshop
1

And this is how it appears ingame

2

I guess i cant simply edit the textures without changing the code?

commented

That green square is shown when the texture cannot be found or loaded, e.g., the size is not correct. It should be something like 32x32, 64x64 or 32x64. Could it be that?

commented

Yea that would be nice. Im currently having issues with quickly finding my target when there are multiple nameplates on the screen and thats why i tried to make it somewhat more visible by combining the arrows with the default border.

Sadly i cannot figure out why i cant make both show at the same time. In the menu they are combined but ingame only one of them shows.

commented

I just thought about that a bit more, as I am working on that widget currently, it should be easier if you just show border and left/right texture at the same time. That way, you would not need to create new textures.

commented

It should work the following way (showing the border and the texture)

  • In UpdateLayout, remove the if-then-else clause with "if db.theme == 'default' ..." - This way, the layout will be configured for borders and textures.
  • Replace "BACKDROP[db.theme]" with BACKDROP["default"]
  • Also, comment out the line "healthbar_mode_frame:SetBackgrop(nil)"
  • In OnTargetUnitAdded, change "if db.theme == 'default' .." until "end" into
    healthbar_mode_frame:Show()
    healthbar_mode_frame.LeftTexture:Show()
    healthbar_mode_frame.RightTexture:Show()

With that, I get both shown, border (default) and Arrows or whatever you select.

commented

Since im not that good at coding, is it possible to upload that edited file somewhere? Or include it in a future version of the addon?

commented

As long as you are using 9.1.x - the following version should work: https://drive.google.com/open?id=1Qg2Rqlt8swGKX0ne5g3STYEbxohceQkK

Just overwrite TargetHighlight.lua in the TP addon directory with this file. It will always use the Default border and Arrow/Crescent/Bubble as texture (you have to select one of these).

commented

Great thanks

commented

I think you should implement this in the base version of the addon, many people will be happy.

commented

image
image

commented