Forums Gallery LOGIN |REGISTER

Community Archive is read-only - Here you can view content recorded up until February 2017. To join the latest discussions visit our new forums


GameSDK Fix - Menu Not Displaying Correct SwitchOption value

If you're looking for help with Scaleform, HUD development, UI Emulator/Actions, this is the place!


 

User avatar jsouth33
Just getting started
Just getting started
 
Posts: 44
Member since: 15.09.2016, 00:05
Location: California, USA
Likes: 3

GameSDK Fix - Menu Not Displaying Correct SwitchOption value

Postby jsouth33 » 10.10.2016, 05:27

I noticed that the Switch Option value would never show correctly, even if I had just changed the value.

e.g. Under Game Settings, "Invert Mouse" would say "Yes" even after I had hit the switch to change the value to "No", and then hit apply.

The problem is, that the flowgraph OnGameSettingsChanged function would spit out boolean values (as "Yes" and "No"), instead of 1s and 0s, for Mouse Invert and Controller Invert.

Simple fix, go to your Code\GameSDK\GameDll\UI\UISettings.cpp file

find these two lines: These lines of code show up twice because of the SetGameSettings function. So make sure to change all four lines.

Code: Select all
eventDesc.AddParam<SUIParameterDesc::eUIPT_Bool>("InvertMouse", "Invert Mouse");
eventDesc.AddParam<SUIParameterDesc::eUIPT_Bool>("InvertController", "Invert Controller");

Simply change the eUIPT_Bool for both, to eUIPT_Int.

Then change:

Code: Select all
void CUISettings::OnSetGameSettings( float sensitivity, float invertMouse, float invertController )

To:
Code: Select all
void CUISettings::OnSetGameSettings( float sensitivity, int invertMouse, int invertController )

And also change the OnSetGameSettings function inside the UISettings header file.

Now flash will receive 1 for true, 0 for false, like It wants.
Last edited by jsouth33 on 23.10.2016, 00:44, edited 1 time in total.
User avatar Lavizh
Lead Moderator
Lead Moderator
 
Posts: 15317
Member since: 04.12.2007, 03:23
Location: Hamar, Norway
Likes: 1141

Re: GameSDK Fix - Menu Not Displaying Correct SwitchOption v

Postby Lavizh » 10.10.2016, 07:16

/Moved to Scaleform.
 
 
Image  Image