Jump to content

EventHandler Priority


Bonsai

Recommended Posts

Hey Guys,

I tried to use the priority argument on "addEventHandler" to manage the order of dx stuff that is drawn "onClientRender".

It did not work, so I wonder if this is something that cannot be done this way?

Can it be done at all?

I need a way to make sure certain things are always on top of others, even things that come from different resources.

Using postGui is kinda annoying since it blocks gui elements.

Bonsai

Link to comment

Yeah, that's what I did.

Anyway, meanwhile I found the problem.

I was using "onClientPreRender" because I needed the delta time and this event is always triggered before "onClientRender".

Now I will probably have to change everything to "onClientPreRender".

Thanks for your reply.

Bonsai

Link to comment
You can write like about 3 lines of code and you'll have delta time onClientRender. Anyway, onClientPreRender isn't a bad solution either, so it's ultimately your choice which one you'll use.

I thought about that.

I usually prefer to use things that are already existing instead of writing something new.

I'm not sure if onClientPreRender has any disadvantage over onClientRender.

So far it seems to be working fine tho.

Link to comment

Yep, I switched to what MrTasty said and simply calculate the delta time on my own.

Using onClientRender instead of onClientPreRender also pretty much ensures, with setting a low priority, no other resource or map will draw on top of it.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...