Closed androbytes closed 3 years ago
Please be more specific.
First of all, are they really errors, or are they warnings? These are terms that people constantly use interchangeably, yet they are completely different.
What kind of error/warning is it? Linker errors (LNK2001/2019)? "[something].dll not found"? Please attach the full message text, and include all of the messages you encountered.
It can't find ImGui files. From #include
Which ones?
Can't find any
Usually, the Visual Studio examples work out of the box, no setup required. Perhaps your include path is set wrong.
In your VS Property Pages, go to C++ > General and look at the "Additional Include Directories" option. It should match the entry in my screenshot below:
Yes it does
Are the #include errors from linting (red squiggles under the directives) or from compiling?
Try to run your project with the green Run Button. Does it compile successfully? (IntelliSense glitches out in VS a lot, this error might not be real.)
Uh, I can't open any files and yes I do click the run button, thats what I always do.
Oh I can open them now
Did you change anything in any way?
No, but suddenly it works
Now i got an sdk error :/
Where do you find the SDK version 8.1 I only see version 10
The SLN examples in the main repo are pretty outdated in terms of SDKs and toolchains, try upgrading your platform toolset to v142. Older versions might not work with the Win10 SDK, they may be trying to use the Win8.1 SDK.
To get to the menu above, right-click your top-most solution in the Solution Explorer, then select "Retarget solution".
Okay that did work on that project but my project doesn't work. Do you need some pictures of files or anything?
To clarify, the examples can run perfectly now, but your own code still has the issue from yesterday, correct?
Yes.
It worked the day before and I didn't change anything and now it doesn't work
FYI every message you are posting here are being sent to the inbox of 1000 people. If either of you have the goodwill to help @AnnoyingB with general programming help, please find a suitable chatting spot, and then you may report the results here.
You need to define the dockspaces first, and then add windows to them. Alternatively you can use a library like hello_imgui which will make your life easier.
To do it yourself from scratch, I wrote something like this: (it's probably not optimal but it works)
if(interface->setup_docking)
{
ImGui::DockBuilderAddNode(interface->dockspaceID, ImGuiDockNodeFlags_DockSpace | ImGuiDockNodeFlags_NoWindowMenuButton); // Add empty node
ImGui::DockBuilderSetNodeSize(interface->dockspaceID, ImGui::GetCurrentContext()->CurrentViewport->Size);
ImGuiID dock_main_id = interface->dockspaceID; // This variable will track the document node, however we are not using it here as we aren't docking anything into it.
ImGuiID dock_id_left_menu = ImGui::DockBuilderSplitNode(dock_main_id, ImGuiDir_Left, (interface->getStyle()->iconSize.x / ImGui::GetCurrentContext()->CurrentViewport->Size.x), NULL, &dock_main_id);
ImGuiID dock_id_right_panel = ImGui::DockBuilderSplitNode(dock_main_id, ImGuiDir_Right, 0.25f, NULL, &dock_main_id);
ImGui::DockBuilderDockWindow("MainMenu", dock_id_left_menu);
ImGui::DockBuilderDockWindow("Introduction", dock_id_right_panel);
ImGui::DockBuilderFinish(interface->dockspaceID);
ImGuiDockNode* node = ImGui::DockBuilderGetNode(dock_id_left_menu);
node->LocalFlags |= ImGuiDockNodeFlags_NoTabBar | ImGuiDockNodeFlags_NoResize;
interface->setup_docking = false;
}
}
Then just
ImGui::Begin("MainMenu", NULL);
And "MainMenu" will be docked
Wysłane z mojego BlackBerry — najbezpieczniejszego urządzenia mobilnego Od: @. Wysłano: 12 lipca 2021 21:55 Do: @. Odp. do: @. DW: @.; @.*** Temat: Re: [ocornut/imgui] ImGui Windows not showing (#4287)
after some tweaking it's working and the dockspace works aswell. is there any way to make it not be made at the bottom of the screen and also automatically set it's dockspace place?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/ocornut/imgui/issues/4287#issuecomment-878551315, or unsubscribehttps://github.com/notifications/unsubscribe-auth/APA7H47UFNUGYCNFKBYBDLDTXNCBHANCNFSM47Q3POQQ.
Oh okay thanks
Sorry if this a stupid question, but, how does DockSpace work? I have no idea what a ImGuiID is but I'd just like to make a opengl window a dockspace, Thanks!