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

Adding a "Follow" checkbox on ExampleAppLog #2300

Closed
wants to merge 1 commit into from

Conversation

nicolasnoble
Copy link
Contributor

The "Follow" checkbox will let users inspect the log buffer without getting dragged down to the end if the app's log is very active. Only ticking the box will make the scrolling move on its own.

The "Follow" checkbox will let users scroll the log buffer without getting dragged down to the end if the app's log is very active. Only ticking the box will make the scrolling move on its own.
@ifarbod
Copy link

ifarbod commented Feb 7, 2019

This would be really useful for the console example as well, also I personally prefer naming it "Auto-scroll".

I tweaked this a little so it additionally does the same action as the "Scroll to bottom" button if you click the checkbox:

        if (ImGui::Checkbox("Auto-scroll", &AutoScroll))
        {
            if (AutoScroll)
            {
                ScrollToBottom = true;
            }
        }

@ocornut
Copy link
Owner

ocornut commented Feb 14, 2019

I have implemented a similar thing based on your suggestion @nicolasnoble, for both Log and Console examples.
The checkbox is inside an Options popup-menu which seems like a good idea to teach/promote a design that would scale to more options (but a little odd with a single option).

Both those Log/Example are not production quality code though..

@ocornut ocornut closed this Feb 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants