AEEditorApp.h 769 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. #pragma once
  2. #include "AEEditorCommon.h"
  3. using namespace Atomic;
  4. namespace Atomic
  5. {
  6. class JSVM;
  7. }
  8. namespace AtomicEditor
  9. {
  10. class AEEditorApp : public AEEditorCommon
  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 HandleExitRequested(StringHash eventType, VariantMap& eventData);
  24. void HandleJSError(StringHash eventType, VariantMap& eventData);
  25. };
  26. }