Recent Topics

Ads

Flip DynamicImage texture vertically

Here you can post addons, or anything related to addons.
Forum rules
Before posting on this forum, be sure to read the Terms of Use
play
Posts: 9

Flip DynamicImage texture vertically

Post#1 » Sat May 02, 2020 1:02 pm

Hi folks,

I've been writing a unit frames addon lately and I'm trying to use as much of the default UI code and assets as I possibly can to keep the old look and feel and just make them a bit more compact and clean. Sort of recycling some of the ideas from CleanUnitFrames by Aiiane.

I'm currently stuck trying to flip the default health bar frame vertically to place the AP bar in it and mirror the health bar as displayed in the pic below. I've been testing with DynamicImageSetRotation, but that's not really working for me. Has anyone done anything similar that I could reach out to?
Spoiler:
Image
Many thanks!

Ads
User avatar
Phantasm
Posts: 674

Re: Flip DynamicImage texture vertically

Post#2 » Sat May 02, 2020 2:10 pm

But... why:) unit frames are done by already few addons, buffs/debuffs trackers as well.
Effigy, Pure, Dufftimer, etc.

User avatar
Lilim
Community Management
Posts: 1318

Re: Flip DynamicImage texture vertically

Post#3 » Sat May 02, 2020 3:43 pm

Spoiler:
play wrote: Sat May 02, 2020 1:02 pm Hi folks,

I've been writing a unit frames addon lately and I'm trying to use as much of the default UI code and assets as I possibly can to keep the old look and feel and just make them a bit more compact and clean. Sort of recycling some of the ideas from CleanUnitFrames by Aiiane.

I'm currently stuck trying to flip the default health bar frame vertically to place the AP bar in it and mirror the health bar as displayed in the pic below. I've been testing with DynamicImageSetRotation, but that's not really working for me. Has anyone done anything similar that I could reach out to?
Spoiler:
Image
Many thanks!
Hey,

hmmmmmmmm, there are already two addons that are doing something like this.

One of them is RV_mod PlayerStatus:
Image

And the other one is Effigy, that can create and modify bars (healthbar, ap, career resource, castbar....)

User avatar
wdesu
Posts: 66

Re: Flip DynamicImage texture vertically

Post#4 » Sat May 02, 2020 5:36 pm

nice idea. standard ui just seems a lot faster than using pure or effigy (like, pure made ui reloads ultra long for me). unitframes seem like a lot of work so i wish you success.
i don't know how to flip vertically but it seems that it's possible to flip it horizontally, so maybe you could flip and rotate it?

Code: Select all

<DynamicImage mirrorTexCoords="true" ...
it looks like there's `DynamicImageSetTextureOrientation(self.name, flipped)` too

play
Posts: 9

Re: Flip DynamicImage texture vertically

Post#5 » Sat May 02, 2020 7:13 pm

wdesu wrote: Sat May 02, 2020 5:36 pm nice idea. standard ui just seems a lot faster than using pure or effigy (like, pure made ui reloads ultra long for me). unitframes seem like a lot of work so i wish you success.
i don't know how to flip vertically but it seems that it's possible to flip it horizontally, so maybe you could flip and rotate it?

Code: Select all

<DynamicImage mirrorTexCoords="true" ...
it looks like there's `DynamicImageSetTextureOrientation(self.name, flipped)` too
Thanks! I'll check those out.

By the way, great job with the addon patches, I'm now a big fan of combattextnames. I've also been making some modifications to your bufftrackertweaks and added a replacement for the EA BuffFrame::SetBuff function on top of your modifications to BuffTracker::Create to make all buffs have the same squared border and consistent coloring. Will probably look into integrating those into the unitframes themselves so I'll be in touch!

User avatar
sullemunk
Addon Developer
Posts: 1213

Re: Flip DynamicImage texture vertically

Post#6 » Sat May 02, 2020 7:40 pm

try:
DynamicImageSetTextureOrientation("ImageName",true)
DynamicImageSetRotation("ImageName",180)
Image
Image Ethreal   Image Corque   Image Urgiz   Image Loxley   Image Chilli   Image Maduza

play
Posts: 9

Re: Flip DynamicImage texture vertically

Post#7 » Sat May 02, 2020 9:29 pm

sullemunk wrote: Sat May 02, 2020 7:40 pm try:
DynamicImageSetTextureOrientation("ImageName",true)
DynamicImageSetRotation("ImageName",180)
Thanks for the hints, I had a chance to look into this a bit more this evening. From the looks of it, the DynamicImageSetTextureOrientation() function does change the horizontal orientation of a texture when the second argument it accepts equals true. I will do a bit more research as I have been unable to use DynamicImageSetRotation() to effectively change anything. I saw it's used for the Slayer and Choppa career resource (sort of like a speedometer little thingy), so I may do some tests with it there to understand it better.

Code: Select all

/mnt/f/Games/Return Of Reckoning/Interface $ grep -r DynamicImageSetRotation .
./1.4.2/interface/default/ea_careerresourceswindow/source/choppa.lua:    DynamicImageSetRotation( g_resource_window.."Needle", rotate )
./1.4.2/interface/default/ea_careerresourceswindow/source/slayer.lua:    DynamicImageSetRotation( g_resource_window.."Needle", rotate )
So far this code does flip the texture horizontally, which is a good start. Thank you all!

Code: Select all

====== xml
<DynamicImage name="$parentApBarFrame" texture="EA_HUD_01" slice="Player-HealthBar-Frame" popable="false" handleinput="true" layer="overlay">
<!-- can also use mirrorTexCoords=true above to force horizontal flip from the XML definition -->
  <Size>
    <AbsPoint x="180" y="28" />
  </Size>
  <Anchors>
    <Anchor point="bottomleft" relativePoint="topleft" relativeTo="$parentHealthBarFrame">
      <AbsPoint x="0" y="0" />
    </Anchor>
  </Anchors>
</DynamicImage>
====== lua
DynamicImageSetTextureOrientation("PlayerWindowApBarFrame",true)

User avatar
MMXX43
Posts: 223

Re: Flip DynamicImage texture vertically

Post#8 » Mon May 04, 2020 12:36 am

is Effigy still broken or something ? last time i heard it was unreliable

Ads

Who is online

Users browsing this forum: No registered users and 14 guests