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

Child region issues. #56

Open
3 tasks
zwcloud opened this issue May 19, 2020 · 0 comments
Open
3 tasks

Child region issues. #56

zwcloud opened this issue May 19, 2020 · 0 comments

Comments

@zwcloud
Copy link
Owner

zwcloud commented May 19, 2020

if (GUILayout.TreeNode("Child regions", ref childRegionsOpen))
{
    GUILayout.Text("Without border");
    bool goto_line = GUILayout.Button("Goto");
    GUILayout.PushFixedWidth(100);//+2
    var newLine = GUILayout.InputInt("##Line", line);
    if (newLine != line)
    {
        goto_line = true;
    }
    GUILayout.PopStyle(2);//-2

    using (GUILayout.HScope("HGroup~1"))
    {
        if (GUILayout.BeginChild("Sub1", GUILayout.Height(300).ExpandWidth(true)))
        {
            for (int i = 0; i < 50; i++)
            {
                GUILayout.Text("{0,4}: scrollable region", i);
                if (goto_line && line == i)
                {
                    //SetScrollHere();//TODO
                }
            }
            if (goto_line && line >= 10)
            {
                //SetScrollHere();//TODO
            }
            GUILayout.EndChild();
        }

        if (GUILayout.BeginChild("Sub2", GUILayout.Height(300).ExpandWidth(true)))
        {
            GUILayout.Text("With border");
            for (int i = 0; i < 50; i++)
            {
                GUILayout.Button(string.Format("0x{0:X8}", i * 5731));
            }
            GUILayout.EndChild();
        }
    }
}

image

  • When draging the scrollbar of main window, the child region's scrollbar is moved.
  • Main window's clip-rect isn't applied to a child region.
  • It hasn't been implemented to go to specific position of a child region.
@zwcloud zwcloud added this to the Pre-release-0.0.1 milestone May 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant