StyleWrapper.cpp 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. #include "imguiWrappedHeader.h"
  2. #include "StyleWrapper.h"
  3. #include "WrapperConverter.h"
  4. void iggStyleGetItemSpacing(IggGuiStyle handle, IggVec2 *value)
  5. {
  6. ImGuiStyle *style = reinterpret_cast<ImGuiStyle *>(handle);
  7. exportValue(*value, style->ItemSpacing);
  8. }
  9. void iggStyleGetItemInnerSpacing(IggGuiStyle handle, IggVec2 *value)
  10. {
  11. ImGuiStyle *style = reinterpret_cast<ImGuiStyle *>(handle);
  12. exportValue(*value, style->ItemInnerSpacing);
  13. }
  14. void iggStyleGetWindowPadding(IggGuiStyle handle, IggVec2 *value)
  15. {
  16. ImGuiStyle *style = reinterpret_cast<ImGuiStyle *>(handle);
  17. exportValue(*value, style->WindowPadding);
  18. }
  19. void iggStyleGetFramePadding(IggGuiStyle handle, IggVec2 *value)
  20. {
  21. ImGuiStyle *style = reinterpret_cast<ImGuiStyle *>(handle);
  22. exportValue(*value, style->FramePadding);
  23. }
  24. void iggStyleSetColor(IggGuiStyle handle, int colorID, IggVec4 const *value)
  25. {
  26. ImGuiStyle *style = reinterpret_cast<ImGuiStyle *>(handle);
  27. if ((colorID >= 0) && (colorID < ImGuiCol_COUNT))
  28. {
  29. importValue(style->Colors[colorID], *value);
  30. }
  31. }
  32. void iggStyleGetColor(IggGuiStyle handle, int index, IggVec4 *value)
  33. {
  34. ImGuiStyle *style = reinterpret_cast<ImGuiStyle*>(handle);
  35. if ((index >= 0) && (index < ImGuiCol_COUNT))
  36. {
  37. exportValue(*value, style->Colors[index]);
  38. }
  39. }
  40. void iggStyleScaleAllSizes(IggGuiStyle handle, float scale)
  41. {
  42. ImGuiStyle *style = reinterpret_cast<ImGuiStyle *>(handle);
  43. style->ScaleAllSizes(scale);
  44. }