alexguirre / RAGENativeUI

MIT License
113 stars 36 forks source link

Enhancement: Set location of Timer Bars #138

Closed bmk-dev closed 2 years ago

bmk-dev commented 2 years ago

Wondering if it would be possible to allow us to set the location of timer bars on screen? The bottom right is often covered by the player's ELS UI, if they're using it.

alexguirre commented 2 years ago

Do you want it as part of the API or as some configuration that affects all plugins using RNUI? For the API, you can use TimerBarBase.Draw(x, y); directly instead of the TimerBarPool, though TimerBarPool already does quite a bit to avoid overlapping between different plugins and the game scripts.

bmk-dev commented 2 years ago

TimerBarBase.Draw(x, y); will actually fit my purpose. I must've glanced over the fact that the base class had a Draw method to draw each bar individually. Appreciate the response!

alexguirre commented 2 years ago

In that case you will need to at least request the timerbars texture dictionary before drawing them and maybe do some of the RESET/SET_SCRIPT_GFX_ALIGN_* stuff (so the timerbars are affected by the safezone borders) depending on how you want to draw them. https://github.com/alexguirre/RAGENativeUI/blob/e390ba652268169480296795290e37a6fb207677/Source/Elements/TimerBars/TimerBarPool.cs#L27-L34

bmk-dev commented 2 years ago

Sounds good, I'll have play around with it! Thanks for the help.