Open Source Tomb Raider Engine
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

imconfig.h 1.9KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. //-----------------------------------------------------------------------------
  2. // USER IMPLEMENTATION
  3. //-----------------------------------------------------------------------------
  4. #pragma once
  5. //---- Define your own malloc/free/realloc functions if you want to override internal memory allocations for ImGui
  6. //#define IM_MALLOC(_SIZE) MyMalloc(_SIZE) // void* MyMalloc(size_t size);
  7. //#define IM_FREE(_PTR) MyFree(_PTR) // void MyFree(void *ptr);
  8. //#define IM_REALLOC(_PTR, _SIZE) MyRealloc(_PTR, _SIZE) // void* MyRealloc(void *ptr, size_t size);
  9. //---- Define your own ImVector<> type if you don't want to use the provided implementation defined in imgui.h
  10. //#include <vector>
  11. //#define ImVector std::vector
  12. //#define ImVector MyVector
  13. //---- Define assertion handler. Defaults to calling assert().
  14. //#define IM_ASSERT(_EXPR) MyAssert(_EXPR)
  15. //---- Don't implement default clipboard handlers for Windows (so as not to link with OpenClipboard(), etc.)
  16. //#define IMGUI_DISABLE_WIN32_DEFAULT_CLIPBOARD_FUNCS
  17. //---- Define implicit cast operators to convert back<>forth from your math types and ImVec2/ImVec4.
  18. /*
  19. #define IM_VEC2_CLASS_EXTRA \
  20. ImVec2(const MyVec2& f) { x = f.x; y = f.y; } \
  21. operator MyVec2() const { return MyVec2(x,y); }
  22. #define IM_VEC4_CLASS_EXTRA \
  23. ImVec4(const MyVec4& f) { x = f.x; y = f.y; z = f.z; w = f.w; } \
  24. operator MyVec4() const { return MyVec4(x,y,z,w); }
  25. */
  26. //---- Freely implement extra functions within the ImGui:: namespace.
  27. //---- e.g. you can create variants of the ImGui::Value() helper for your low-level math types.
  28. /*
  29. namespace ImGui
  30. {
  31. void Value(const char* prefix, const MyVec2& v, const char* float_format = NULL);
  32. void Value(const char* prefix, const MyVec4& v, const char* float_format = NULL);
  33. };
  34. */