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

how to attach multiple windows in one window like in this example #970

Closed
dhiahassen opened this issue Jan 8, 2017 · 5 comments
Closed

Comments

@dhiahassen
Copy link

obviously dear imgui has no multi-windows attachment , in other words , i can't find a way to create a window that contains many other sub windows , one only way to do it , is to create a window with diferent buttons on the top , each of witch changes the window's content in it's way , any other suggestions ?
imgui

@edin-purkovic
Copy link

edin-purkovic commented Jan 8, 2017

With subwindows you mean docks or tabs? There is some work in #351 and #261 but yes, You could draw window content based on which button was clicked.. Also here is my attempt at docking https://github.com/edin-p/ImGuiDock

@dhiahassen
Copy link
Author

page not found !! :/ , broken link

@edin-purkovic
Copy link

Ohh sorry.. Now it works..

@colesnicov
Copy link

colesnicov commented Jan 10, 2017

May be simple https://gist.github.com/Flix01/3bc3d7b3d996582e034e

and usage

static const char* tabNames[] = {"Search","Debugger"};
static int selectedTab = 0;
ImGui::TabLabels(2, tabNames, selectedTab, NULL, false);

switch(selectedTab)
{
  case 0:
    // Draw your content of Search pane or call your method to draw content
  break;
  case 1:
    // Draw your content of Debugger pane or call your method to draw content
  break;
}

@ocornut
Copy link
Owner

ocornut commented Aug 15, 2017

Closing this as duplicate, the topic is discussed in #351 #261

@ocornut ocornut closed this as completed Aug 15, 2017
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

4 participants