WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   oUF (Otravi Unit Frames) (https://www.wowinterface.com/forums/forumdisplay.php?f=87)
-   -   EclipseBar (https://www.wowinterface.com/forums/showthread.php?t=35508)

Sabaren 10-14-10 01:41 AM

EclipseBar
 
???

I'm not quite sure how to implement this into my layout. I understand the totem/shard/etc bars need to be iterated for each element, but Eclipse I would think would be one continuous bar, and would be treated similar to Power. Either way, I can't get anything coherent to display with my druid.

Rostok 10-14-10 03:01 AM

you should take a look at http://github.com/Evilpaul/oUF_EP/bl...UF_EP.lua#L516

yj589794 10-14-10 03:16 AM

Note that the eclipsebar implementation in oUF could do with some tidying up. What is there works fine and the post action functions should provide some customisation options.

If anyone has any ideas for improvements, then please post here or add an issue to the oUF issue tracker over on GitHub.

thanks

azsh 10-15-10 06:08 AM

hello. I think the module ecalips contains errors. After logging displays two long bars (150 each) later after cast wrath this bar is reduced to 150 (as if they overlap and intersect), and then it comes good but bad displaying percent:
100 lunar displays as 100%
50 lunar displays as 0%
1 lunar displays as 99%
1 solar displays as 99%
50 solar displays as 0%
100 solar displays as 100%

throughout the rotation of two eclipse displays 4 times 100% !?!?!

screens:
after login game:
http://yfrog.com/04wowscrnshot101510140237j
Lunar eclipse:
http://yfrog.com/j2wowscrnshot101510134310j

http://yfrog.com/mhwowscrnshot101510135242j

0% in middle lunar eclipse ?
http://yfrog.com/jcwowscrnshot101510135308j
still lunar eclipse an 20% ?
http://yfrog.com/5rwowscrnshot101510135316j

yj589794 10-15-10 06:16 AM

The code you add to your layout to support the eclipsebar element is very sensitive, and if there is a slight error it can all go a bit....weird. This is definitely something I want to improve, but until then can you post your layout code?

azsh 10-15-10 06:30 AM

Code:

        if playerClass == "DRUID" then
            local eclipseBar = CreateFrame('Frame', nil, self)
            eclipseBar:SetPoint('TOPLEFT', self, 'BOTTOMLEFT', 0, 100)
            eclipseBar:SetSize(150, 12)
            eclipseBar:SetBackdrop(backdrop)
            eclipseBar:SetBackdropColor(0, 0, 0)

            local lunarBar = CreateFrame('StatusBar', nil, eclipseBar)
            lunarBar:SetPoint('LEFT', eclipseBar, 'LEFT', 0, 0)
            lunarBar:SetSize(150, 12)
            lunarBar:SetStatusBarTexture(cfg.HPtex)
            lunarBar:SetStatusBarColor(0, 0, 1)
            eclipseBar.LunarBar = lunarBar

            local solarBar = CreateFrame('StatusBar', nil, eclipseBar)
            solarBar:SetPoint('LEFT', lunarBar:GetStatusBarTexture(), 'RIGHT', 0, 10)
            solarBar:SetSize(150, 12)
            solarBar:SetStatusBarTexture(cfg.HPtex)
            solarBar:SetStatusBarColor(1, 3/5, 0)
            eclipseBar.SolarBar = solarBar

            local eclipseBarText = solarBar:CreateFontString(nil, 'OVERLAY')
            eclipseBarText:SetPoint('CENTER', eclipseBar, 'CENTER', 0, 0)
            eclipseBarText:SetFont(cfg.NumbFont, cfg.NumbFS, "THINOUTLINE")
            self:Tag(eclipseBarText, '[pereclipse]%')

            self.EclipseBar = eclipseBar
        end

I know the solar bar is higher because I wanted the differences were more apparent. I think instead of the percentages should be displayed points from 0 - 100 and in addition, should be option to the separation of these bars as it is on a first screen for those whose idea of overlaping does not like it and last thing is there any possibility to ends of bars to add icons of the sun and moon?

yj589794 10-15-10 07:45 AM

Quote:

Originally Posted by azsh (Post 210580)
Code:

snip

Hmmm, I can't see anything obviously wrong in the code.
Can you describe any actions you performed?
Did you perform any odd actions? e.g. reloading the ui

Quote:

Originally Posted by azsh (Post 210580)
I know the solar bar is higher because I wanted the differences were more apparent.

No probs, it should not affect the element

Quote:

Originally Posted by azsh (Post 210580)
I think instead of the percentages should be displayed points from 0 - 100 ...

If you do not like the default tag, than it is easy enough to write your own custom tag.

Quote:

Originally Posted by azsh (Post 210580)
...should be option to the separation of these bars as it is on a first screen for those whose idea of overlaping does not like it...

I'm sorry, but I don't understand the question

Quote:

Originally Posted by azsh (Post 210580)
...and last thing is there any possibility to ends of bars to add icons of the sun and moon?

Sure, just add on your own textures. As long as they children of self.EclipseBar then the visibility settings will be applied for when the eclipsebar is shown or hidden (e.g. changing druid form).

azsh 10-15-10 08:15 AM

ok you explain me everything, but when im log in to the game i have 2 separated bars

http://yfrog.com/nbwowscrnshot101510155625j

after cast wrath or starfire they marge. look at text tags in first screen it's on middle of blue bar and on second screen it's in the middle of whole bar.It's weird.

http://yfrog.com/1awowscrnshot101510155906j

Sueisfine 10-15-10 08:34 AM

Quote:

Originally Posted by azsh (Post 210636)
ok you explain me everything, but when im log in to the game i have 2 separated bars

http://yfrog.com/nbwowscrnshot101510155625j

after cast wrath or starfire they marge. look at text tags in first screen it's on middle of blue bar and on second screen it's in the middle of whole bar.It's weird.

http://yfrog.com/1awowscrnshot101510155906j

I also ran into this problem when implementing my EclipseBar yesterday night and found out that it happens because when the UI is loaded and before you do anything that triggers UNIT_POWER the MinMax values (and the actual Value) of the status bars (lunar and solar) are not initialized.

So basically I solved this by using a "PostUpdateVisibility" function to check if the bar is being shown and if so to initialize the values I mentioned above (like the function UNIT_POWER does).

Hope it helps :)

yj589794 10-15-10 08:37 AM

Ahhhh, I think I know what is happening.

It looks like Haste did some changes to the code to make it easier to read and in doing so it looks like he has accidentally caused the a bug. The problem is that when the unit frames are spawned the bar values are not being set, but when you cast a spell everything changes to how it should be.

I'll let Haste know what needs to change.

yj589794 10-15-10 08:44 AM

Quote:

Originally Posted by Sueisfine (Post 210655)
I also ran into this problem when implementing my EclipseBar yesterday night and found out that it happens because when the UI is loaded and before you do anything that triggers UNIT_POWER the MinMax values (and the actual Value) of the status bars (lunar and solar) are not initialized.

So basically I solved this by using a "PostUpdateVisibility" function to check if the bar is being shown and if so to initialize the values I mentioned above (like the function UNIT_POWER does).

Hope it helps :)

*cough* report bugs sooner *cough*

azsh 10-15-10 09:28 AM

Ok thanks for explain and help :) . The last thing how to add an arrow or something similar that will show the direction which spell cast to get eclipse ?

yj589794 10-15-10 11:36 AM

you can add a function:
Code:

self.EclipseBar.PostDirectionChange = function(element, unit)
        if(element.directionIsLunar) then
                -- do stuff
        else
                -- do other stuff
        end
end

After achieving eclipse this should fire and you can use it to display some indicator.

azsh 10-15-10 12:31 PM

ok thanks for help :)

PigtailsofDoom 10-15-10 06:42 PM

I'm not trying to be pushy or anything here, but for those of us who don't know anything about code, is there an oUF supplement coming from anyone that will display the Eclipse bar properly? Something like the DK Rune and Shaman Totem supplements? I'd really like to get a proper layout as I really hate the default UI, but I can't seem to find any that show the Eclipse bar.

Dawn 10-15-10 07:04 PM

There is already an eclipse bar element included in oUF.


PigtailsofDoom 10-15-10 07:57 PM

Do some of the different oUF layouts not have it enabled? I'm currently testing out the Aftermathh oUF and it's not showing up.

Dawn 10-15-10 08:08 PM

That's because it's not just something you "enable". The author of the layout you use has to include some code to use the element. :rolleyes:

PigtailsofDoom 10-15-10 08:18 PM

Okay thank you. I'm going to post a link to this thread on their layout page.

azsh 10-16-10 12:55 AM

im not master of lua code :) and i dont no how to write eclipse tag which would show:

0--100 - in lunar rotation
0--100 - in solar rotation

instead default procent's:

100%--0%--100% - in lunar rotation
100%--0%--100% - in solar rotation

Could someone help me? :)


All times are GMT -6. The time now is 12:09 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI