alexguirre / RAGENativeUI

MIT License
113 stars 36 forks source link

GTA Online Menu Banner, Scaleforms #120

Open Vincentsgm opened 3 years ago

Vincentsgm commented 3 years ago

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:

alexguirre commented 3 years ago
  • 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 commented 3 years ago
  • 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 commented 3 years ago

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.