NModds Posted September 19, 2018 Share Posted September 19, 2018 Hi all, I was wondering if there is any way of displaying the help text, but in the center of the screen, well ideally anywhere on the screen? Like rockstar's keybinding menu which displays inputs. Link to comment Share on other sites More sharing options...
Guest Posted September 19, 2018 Share Posted September 19, 2018 Just noticed something about that in the scaleforms. In the hud scaleform, there is a SET_HELP_TEXT_POSITION() function but I'm not too sure if you can call that somehow, or if the game would override it. But there is also a Native _REQUEST_HUD_SCALEFORM(int hudComponent), so maybe it's possible. I can't help much more than that I am afraid but it might give you a direction to look in. Link to comment Share on other sites More sharing options...
NModds Posted September 20, 2018 Author Share Posted September 20, 2018 1 hour ago, LeeC2202 said: Just noticed something about that in the scaleforms. In the hud scaleform, there is a SET_HELP_TEXT_POSITION() function but I'm not too sure if you can call that somehow, or if the game would override it. But there is also a Native _REQUEST_HUD_SCALEFORM(int hudComponent), so maybe it's possible. I can't help much more than that I am afraid but it might give you a direction to look in. Thanks for the help. I will check it out. Link to comment Share on other sites More sharing options...
NModds Posted September 21, 2018 Author Share Posted September 21, 2018 (edited) I ended up using ScaleForms. I used Unknown_Modder's template for using Instructional buttons scaleform and changed his line of code Function.Call(Hash._0x0DF606929C105BE1, movie, 255, 255, 255, 0) which is currently named as DRAW_SCALEFORM_MOVIE_FULLSCREEN to Function.Call(Hash._0x54972ADAF0294A93, movie, 0.2f, 0.0f, 1.0f, 1.0f, 255, 255, 255, 255, 0). The parameters are: int ScaleformHandle, float x, float y, float width, float height, int r, int g, int b, int a, int unk). Edited September 22, 2018 by NModds Changed to hash form in case the name changes in the future. Link to comment Share on other sites More sharing options...
Guest Posted September 22, 2018 Share Posted September 22, 2018 Does that now let you draw instructional buttons anywhere on the screen? If so, that's good to know... I thought they could only appear in the bottom right-hand corner. Thanks for posting back with your findings. Link to comment Share on other sites More sharing options...
NModds Posted September 22, 2018 Author Share Posted September 22, 2018 1 hour ago, LeeC2202 said: Does that now let you draw instructional buttons anywhere on the screen? If so, that's good to know... I thought they could only appear in the bottom right-hand corner. Thanks for posting back with your findings. Yes it allows drawing anywhere on the screen but the position parameter is a little strange. I'm not sure why but the center is considered (0,0) not sure if it's only for me, but that seems to be the center. Also top left is actually (-0.5, -0.5). Another thing to note is that the instructional buttons are drawn from right to left so the x position has to account for length of the string and instructional button, currently not sure if there is another way around that. Link to comment Share on other sites More sharing options...
Guest Posted September 22, 2018 Share Posted September 22, 2018 Ah, I wonder if it's a full-screen scaleform, where the offset is normally the centre of the frame... that would explain why 0,0 is the centre of the screen perhaps. I know from when I used to be an actionscript developer, that our MovieClips usually had a central origin, it's the default behaviour. That's probably because a lot of actionscript programming involved tweening scaled and rotated movieclips, and they were usually scaled/rotated around the centre. But equally you could set the origin to any corner, so in the case of the instrucional buttons, they probably have the movieclip's origin in the bottom right, so as they add elements, it expands to the left by default, it's like right-justifying text. I am just writing a prop attachment/placement tool at the moment but I will definitely look into this further when I have done that... thanks again for the info, this will prove very helpful because I think you might be able to stack instructional buttons vertically as well. I got most of my info on Scaleforms from here https://forum.gtanet.work/index.php?threads/intro-to-scaleform-instructional-buttons.4277/ Maybe there will be something of use in that link for you as well. Link to comment Share on other sites More sharing options...
NModds Posted September 22, 2018 Author Share Posted September 22, 2018 Thank you for that link it is thorough look at scaleform instructional buttons. Link to comment Share on other sites More sharing options...