ProjectUserPrefs.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. //
  2. // Copyright (c) 2014-2015, THUNDERBEAST GAMES LLC All rights reserved
  3. // LICENSE: Atomic Game Engine Editor and Tools EULA
  4. // Please see LICENSE_ATOMIC_EDITOR_AND_TOOLS.md in repository root for
  5. // license information: https://github.com/AtomicGameEngine/AtomicGameEngine
  6. //
  7. #pragma once
  8. #include <Atomic/Core/Object.h>
  9. using namespace Atomic;
  10. #include "../Platform/Platform.h"
  11. namespace ToolCore
  12. {
  13. class ProjectUserPrefs : public Object
  14. {
  15. friend class Project;
  16. OBJECT(ProjectUserPrefs);
  17. public:
  18. /// Construct.
  19. ProjectUserPrefs(Context* context);
  20. /// Destruct.
  21. virtual ~ProjectUserPrefs();
  22. // platform used when not specified
  23. PlatformID GetDefaultPlatform() const { return defaultPlatform_; }
  24. const String& GetLastBuildPath() { return lastBuildPath_; }
  25. void SetLastBuildPath(const String& path) { lastBuildPath_ = path; }
  26. float GetSnapTranslationX() const;
  27. float GetSnapTranslationY() const;
  28. float GetSnapTranslationZ() const;
  29. float GetSnapRotation() const;
  30. float GetSnapScale() const;
  31. void SetSnapTranslationX(float value);
  32. void SetSnapTranslationY(float value);
  33. void SetSnapTranslationZ(float value);
  34. void SetSnapRotation(float value);
  35. void SetSnapScale(float value);
  36. private:
  37. bool Load(const String& path);
  38. void Save(const String& path);
  39. PlatformID defaultPlatform_;
  40. String lastBuildPath_;
  41. float snapTranslationX_;
  42. float snapTranslationY_;
  43. float snapTranslationZ_;
  44. float snapRotation_;
  45. float snapScale_;
  46. };
  47. }