Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GTA Online Menu Banner, Scaleforms #120

Open
Vincentsgm opened this issue Apr 17, 2021 · 3 comments
Open

GTA Online Menu Banner, Scaleforms #120

Vincentsgm opened this issue Apr 17, 2021 · 3 comments

Comments

@Vincentsgm
Copy link

I would like an option for the UIMenu banner to be the GTA Online's default banner, aka the "MP_MENU_GLARE" scaleform, maybe implemented with a bool property.

For scaleforms:

  • Return values
  • Set as no longer needed
  • Draw masked with an other Scaleform
  • Draw on rendertargets,
  • Bool property using the _SET_SCALEFORM_FIT_RENDERTARGET native
@alexguirre
Copy link
Owner

  • Draw masked with an other Scaleform

Do you have an example of scaleforms that use this?

  • Draw on rendertargets,
  • Bool property using the _SET_SCALEFORM_FIT_RENDERTARGET native

Is there anything specific to scaleforms needed to draw them on rendertargets apart from that property? Isn't it just SET_TEXT_RENDER_ID before drawing the scaleform?

@Vincentsgm
Copy link
Author

  • Draw masked with an other Scaleform

Do you have an example of scaleforms that use this?

There's the trio "mp_celebration", "mp_celebration_bg", "mp_celebration_fg" which are stat walls at the end of missions, there's similar stuff with heists as well. Ex:
NativeFunction.Natives.DRAW_SCALEFORM_MOVIE_FULLSCREEN_MASKED(wallDropBG.Handle, wallDropFG.Handle, 255, 255, 255, 255);

  • Draw on rendertargets,
  • Bool property using the _SET_SCALEFORM_FIT_RENDERTARGET native

Is there anything specific to scaleforms needed to draw them on rendertargets apart from that property? Isn't it just SET_TEXT_RENDER_ID before drawing the scaleform?

SET_SCRIPT_GFX_DRAW_ORDER(4) needs to be called after SET_TEXT_RENDER_ID, then after drawing the rendertarget has to be cleared using SET_TEXT_RENDER_ID(GET_DEFAULT_SCRIPT_RENDERTARGET_RENDER_ID())

@alexguirre
Copy link
Owner

SET_SCRIPT_GFX_DRAW_ORDER(4) needs to be called after SET_TEXT_RENDER_ID, then after drawing the rendertarget has to be cleared using SET_TEXT_RENDER_ID(GET_DEFAULT_SCRIPT_RENDERTARGET_RENDER_ID())

From my testing seems like render targets only support draw order 4 (the default one), with any other draw order it doesn't draw anything (scaleforms, text, DRAW_RECT, etc.). So not scaleform specific, I asked because I also was thinking on supporting render targets but to draw anything on them not just scaleforms.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants