SFML/imgui-sfml

Manual integration into project on readme need updating?

Jamie-Troup opened this issue · 2 comments

Hello,

Just wondered if this section of the readme.md,

Integrating into your project manually

  • Download ImGui
  • Add Dear ImGui folder to your include directories
  • Add imgui.cpp, imgui_widgets.cpp, imgui_draw.cpp and imgui_tables.cpp to your build/project
  • Copy the contents of imconfig-SFML.h to your imconfig.h file. (to be able to cast ImVec2 to sf::Vector2f and vice versa)
  • Add a folder which contains imgui-SFML.h to your include directories
  • Add imgui-SFML.cpp to your build/project
  • Link OpenGL if you get linking errors

Needed a line saying Add imgui-SFML_export.h to your build/project? I'm only saying this because when copying the contents of imconfig-SFML.h into imconfig.h it copies the line #include "imgui-SFML_export.h". Without adding imgui-SFML_export.h alongside imconfig.h this lead to a compiler error when building my project.

I have only just started using SFML and ImGui, so please forgive me if this is completely off the mark/wrong. Thanks!

Doesn't this line covers this?

Add a folder which contains imgui-SFML.h to your include directories

So, if you add imgui-sfml's dir to your include directories, imconfig-SFML.h will be able to find imgui-SFML_export.h too.

Thank you, as you may have guessed I am a bit of a c++ newbie (especially with tools like C make which I was using) so yeah that does cover it (I just didn't know!).

I made sure the include directories in my make file were correctly pointing to the SFML files and it has all worked so far. Cheers