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

WotC issue with Chosen Info screen and controllers + Solution #952

Closed
kdm2k6 opened this issue Jan 13, 2021 · 2 comments · Fixed by #1280
Closed

WotC issue with Chosen Info screen and controllers + Solution #952

kdm2k6 opened this issue Jan 13, 2021 · 2 comments · Fixed by #1280

Comments

@kdm2k6
Copy link

kdm2k6 commented Jan 13, 2021

When viewing the Chosen information screen, controller users can use the DPad to navigate between different Chosen; unfortunately, the main buttons on the left side of the screen do not highlight properly. There are 2 issues within UIChosenInfo.uc.

Problem 1 : Using the DPad doesn't result in buttons gaining focus.
Solution : This issue results from a 'speling misteak' ! Within the function SelectChosen, there is the following call :

MC.ChildFunctionVoid("button_" $ CurrentChosenIndex, "onReceieveFocus");

Unsurprisingly, there is no onReceieveFocus function within Flash; there is, however, an onReceiveFocus function. Consequently, the call above should become :

MC.ChildFunctionVoid("button_" $ CurrentChosenIndex, "onReceiveFocus");

Problem 2 : The top chosen button doesn't focus when the screen is initialized/opened.
Solution : OnInit.InitData sets the variables SelectedChosen and CurrentChosenIndex; however, it never deals with giving focus to the button associated with CurrentChosenIndex. Now, we don't want to call SelectChosen since the chosen hasn't 'changed' and SelectedChosen would be equal to AllActiveChosen[iChosen].

What we do want to do is simply call MC.ChildFunctionVoid("button_" $ CurrentChosenIndex, "onReceiveFocus") after CurrentChosenIndex has been set to 0. The best place to do this is likely within OnInit and just before MC.FunctionVoid("AnimateIn"). Therefore, we would end up with :

`HQPRES.m_kAvengerHUD.NavHelp.AddContinueButton(OnContinue);
MC.ChildFunctionVoid("button_" $ CurrentChosenIndex, "onReceiveFocus"); // NEW CALL IS HERE
MC.FunctionVoid("AnimateIn");

I am not sure if mouse and keyboard users care about initial button selection; if they do not it can be written :

`HQPRES.m_kAvengerHUD.NavHelp.AddContinueButton(OnContinue);
if (`ISCONTROLLERACTIVE)
{
	MC.ChildFunctionVoid("button_" $ CurrentChosenIndex, "onReceiveFocus");
}
MC.FunctionVoid("AnimateIn");
@Iridar Iridar added this to the 1.27.0 milestone Aug 15, 2023
Iridar pushed a commit to Iridar/X2WOTCCommunityHighlander that referenced this issue Oct 29, 2023
@Iridar
Copy link
Contributor

Iridar commented Oct 29, 2023

Tested this with mouse and keyboard, I wasn't able to do anything with the keyboard on this screen with or without the fix.

Selecting the first chosen on the list (fix number 2) highlighted the first chosen in the list until I would mouseover it, and then remove the mouse, then the selection fades.

So it largely makes no difference, but I suppose it can be convenient to highlight which Chosen you're initially viewing info for, though it would be better if the highlight was persistent.

@RustyDios
Copy link
Contributor

Tested this with mouse and keyboard, I wasn't able to do anything with the keyboard on this screen with or without the fix.

Selecting the first chosen on the list (fix number 2) highlighted the first chosen in the list until I would mouseover it, and then remove the mouse, then the selection fades.

So it largely makes no difference, but I suppose it can be convenient to highlight which Chosen you're initially viewing info for, though it would be better if the highlight was persistent.

I'm not sure keyboard controls are actually set up correctly for the screen either. It only has inputs for the d-pad and left stick.

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

Successfully merging a pull request may close this issue.

3 participants