In the event for one of my buttons, called UIFunc_OnConfigureBinds, which executes when I pick the configure binds button, or force it with a call to that function, I do this at the end:
nk_console_set_active_parent(configureBinds);
if (lastKeyBindWidget != 0)
{
nk_console* keyButton = inputMenuList[lastKeyBindWidget].menuItem;
nk_console_top_data* data = (nk_console_top_data*)nk_console_get_top(keyButton)->data;
nk_console_set_active_widget(keyButton);
if (data != NULL)
{
SDL_Log("Attempting to set scroll");
data->scroll_to_widget = keyButton;
data->input_processed = nk_true;
lastKeyBindWidget = 0;
}
}
But, for some reason, while it gets to "Attempting to set scroll", the scroll_to_widget doesn't work.
I need a way to force scroll a page to the widget in question, since this isn't reached via a traditional nk_console_navigate_back call.
In the event for one of my buttons, called UIFunc_OnConfigureBinds, which executes when I pick the configure binds button, or force it with a call to that function, I do this at the end:
But, for some reason, while it gets to "Attempting to set scroll", the scroll_to_widget doesn't work.
I need a way to force scroll a page to the widget in question, since this isn't reached via a traditional nk_console_navigate_back call.