Skip to content

Scroll to active widget when switching active parent #210

@RobLoach

Description

@RobLoach

nuklear_console.h:651 carries a TODO: Fix the scroll on the new window, since it may not be centered on the active widget. This is the same family of bug being reported externally in #170 ("Trying to force scroll of a page, but I'm having trouble") — user calls nk_console_set_active_parent + nk_console_set_active_widget but scroll never lands on the target.

Suggested Implementation

In nk_console_set_active_parent, after nk_window_set_scroll(top->ctx, 0, 0), also set data->scroll_to_widget = data->active_widget so the next render pass scrolls to the focused widget instead of pinning to the top.

QA

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions