AEEditorApp.h 728 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. #pragma once
  2. #include <Atomic/Engine/Application.h>
  3. using namespace Atomic;
  4. namespace Atomic
  5. {
  6. class JSVM;
  7. }
  8. namespace AtomicEditor
  9. {
  10. class AEEditorApp : public Application
  11. {
  12. OBJECT(AEEditorApp);
  13. public:
  14. /// Construct.
  15. AEEditorApp(Context* context);
  16. /// Setup before engine initialization. Verify that a script file has been specified.
  17. virtual void Setup();
  18. /// Setup after engine initialization. Load the script and execute its start function.
  19. virtual void Start();
  20. /// Cleanup after the main loop. Run the script's stop function if it exists.
  21. virtual void Stop();
  22. private:
  23. void HandleJSError(StringHash eventType, VariantMap& eventData);
  24. SharedPtr<JSVM> vm_;
  25. };
  26. }