ImGui
ImGui copied to clipboard
Child region issues.
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();
}
}
}
- [ ] 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.