Open Source Tomb Raider Engine
Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. //-----------------------------------------------------------------------------
  2. // USER IMPLEMENTATION
  3. // This file contains compile-time options for ImGui.
  4. // Other options (memory allocation overrides, callbacks, etc.) can be set at runtime via the ImGuiIO structure - ImGui::GetIO().
  5. //-----------------------------------------------------------------------------
  6. #pragma once
  7. //---- Define your own ImVector<> type if you don't want to use the provided implementation defined in imgui.h
  8. //#include <vector>
  9. //#define ImVector std::vector
  10. //#define ImVector MyVector
  11. //---- Define assertion handler. Defaults to calling assert().
  12. #include "global.h"
  13. #define IM_ASSERT(_EXPR) orAssert(_EXPR)
  14. //---- Define attributes of all API symbols declarations, e.g. for DLL under Windows.
  15. //#define IMGUI_API __declspec( dllexport )
  16. //#define IMGUI_API __declspec( dllimport )
  17. //---- Don't implement default handlers for Windows (so as not to link with OpenClipboard() and others Win32 functions)
  18. //#define IMGUI_DISABLE_WIN32_DEFAULT_CLIPBOARD_FUNCS
  19. //#define IMGUI_DISABLE_WIN32_DEFAULT_IME_FUNCS
  20. //---- Include imgui_user.inl at the end of imgui.cpp so you can include code that extends ImGui using its private data/functions.
  21. #define IMGUI_INCLUDE_IMGUI_USER_INL
  22. //---- Include imgui_user.h at the end of imgui.h
  23. #define IMGUI_INCLUDE_IMGUI_USER_H
  24. //---- Define implicit cast operators to convert back<>forth from your math types and ImVec2/ImVec4.
  25. #define IM_VEC2_CLASS_EXTRA \
  26. ImVec2(const glm::vec2& f) { x = f.x; y = f.y; } \
  27. operator glm::vec2() const { return glm::vec2(x, y); }
  28. #define IM_VEC4_CLASS_EXTRA \
  29. ImVec4(const glm::vec4& f) { x = f.x; y = f.y; z = f.z; w = f.w; } \
  30. operator glm::vec4() const { return glm::vec4(x,y,z,w); }
  31. //---- Freely implement extra functions within the ImGui:: namespace.
  32. //---- Declare helpers or widgets implemented in imgui_user.inl or elsewhere, so end-user doesn't need to include multiple files.
  33. //---- e.g. you can create variants of the ImGui::Value() helper for your low-level math types, or your own widgets/helpers.
  34. /*
  35. namespace ImGui
  36. {
  37. void Value(const char* prefix, const MyVec2& v, const char* float_format = NULL);
  38. void Value(const char* prefix, const MyVec4& v, const char* float_format = NULL);
  39. }
  40. */