BsFontImportOptionsRTTI.h 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. //__________________________ Banshee Project - A modern game development toolkit _________________________________//
  2. //_____________________________________ www.banshee-project.com __________________________________________________//
  3. //________________________ Copyright (c) 2014 Marko Pintera. All rights reserved. ________________________________//
  4. #pragma once
  5. #include "BsCorePrerequisites.h"
  6. #include "BsRTTIType.h"
  7. #include "BsFontImportOptions.h"
  8. namespace BansheeEngine
  9. {
  10. class BS_CORE_EXPORT FontImportOptionsRTTI : public RTTIType<FontImportOptions, IReflectable, FontImportOptionsRTTI>
  11. {
  12. private:
  13. Vector<UINT32>& getFontSizes(FontImportOptions* obj) { return obj->mFontSizes; }
  14. void setFontSizes(FontImportOptions* obj, Vector<UINT32>& value) { obj->mFontSizes = value; }
  15. Vector<std::pair<UINT32, UINT32>>& getCharIndexRanges(FontImportOptions* obj) { return obj->mCharIndexRanges; }
  16. void setCharIndexRanges(FontImportOptions* obj, Vector<std::pair<UINT32, UINT32>>& value) { obj->mCharIndexRanges = value; }
  17. UINT32& getDPI(FontImportOptions* obj) { return obj->mDPI; }
  18. void setDPI(FontImportOptions* obj, UINT32& value) { obj->mDPI = value; }
  19. bool& getAntialiasing(FontImportOptions* obj) { return obj->mAntialiasing; }
  20. void setAntialiasing(FontImportOptions* obj, bool& value) { obj->mAntialiasing = value; }
  21. public:
  22. FontImportOptionsRTTI()
  23. {
  24. addPlainField("mFontSizes", 0, &FontImportOptionsRTTI::getFontSizes, &FontImportOptionsRTTI::setFontSizes);
  25. addPlainField("mCharIndexRanges", 1, &FontImportOptionsRTTI::getCharIndexRanges, &FontImportOptionsRTTI::setCharIndexRanges);
  26. addPlainField("mDPI", 2, &FontImportOptionsRTTI::getDPI, &FontImportOptionsRTTI::setDPI);
  27. addPlainField("mAntialiasing", 3, &FontImportOptionsRTTI::getAntialiasing, &FontImportOptionsRTTI::setAntialiasing);
  28. }
  29. virtual const String& getRTTIName()
  30. {
  31. static String name = "FontImportOptions";
  32. return name;
  33. }
  34. virtual UINT32 getRTTIId()
  35. {
  36. return TID_FontImportOptions;
  37. }
  38. virtual std::shared_ptr<IReflectable> newRTTIObject()
  39. {
  40. return bs_shared_ptr<FontImportOptions, PoolAlloc>();
  41. }
  42. };
  43. }