EditorEvents.ts 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154
  1. //
  2. // Copyright (c) 2014-2016 THUNDERBEAST GAMES LLC
  3. //
  4. // Permission is hereby granted, free of charge, to any person obtaining a copy
  5. // of this software and associated documentation files (the "Software"), to deal
  6. // in the Software without restriction, including without limitation the rights
  7. // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  8. // copies of the Software, and to permit persons to whom the Software is
  9. // furnished to do so, subject to the following conditions:
  10. //
  11. // The above copyright notice and this permission notice shall be included in
  12. // all copies or substantial portions of the Software.
  13. //
  14. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  15. // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  16. // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  17. // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  18. // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  19. // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  20. // THE SOFTWARE.
  21. //
  22. export const ModalError = "ModalError";
  23. export interface ModalErrorEvent {
  24. title: string;
  25. message: string;
  26. }
  27. export const PlayerStartRequest = "EditorPlayRequest";
  28. export const PlayerStarted = "EditorPlayerStarted";
  29. export const PlayerStopped = "EditorPlayerStopped";
  30. export const PlayerLog = "EditorPlayerLog";
  31. export interface PlayerLogEvent {
  32. message: string;
  33. level: number;
  34. }
  35. export const ActiveSceneEditorChange = "EditorActiveSceneEditorChange";
  36. export interface ActiveSceneEditorChangeEvent {
  37. sceneEditor: Editor.SceneEditor3D;
  38. }
  39. export const SceneClosed = "EditorSceneClosed";
  40. export interface SceneClosedEvent {
  41. scene: Atomic.Scene;
  42. }
  43. export const ContentFolderChanged = "ContentFolderChanged";
  44. export interface ContentFolderChangedEvent {
  45. path: string;
  46. }
  47. export const CloseProject = "EditorCloseProject";
  48. export const ProjectClosed = "EditorProjectClosed";
  49. export const LoadProject = "EditorLoadProject";
  50. export const LoadProjectNotification = "EditorLoadProjectNotification";
  51. export interface LoadProjectEvent {
  52. // The full path to the .atomic file
  53. path: string;
  54. }
  55. export const SaveAllResources = "EditorSaveAllResources";
  56. export const SaveResource = "EditorSaveResource";
  57. /**
  58. * Called once the resource has been saved
  59. * @type {String}
  60. */
  61. export const SaveResourceNotification = "EditorSaveResourceNotification";
  62. export interface SaveResourceEvent {
  63. // The full path to the resource to save / empty or undefined for current
  64. path: string;
  65. }
  66. export const EditorResourceClose = "EditorResourceClose";
  67. export interface EditorCloseResourceEvent {
  68. editor:Editor.ResourceEditor;
  69. navigateToAvailableResource:boolean;
  70. }
  71. export const EditResource = "EditorEditResource";
  72. export interface EditResourceEvent {
  73. // The full path to the resource to edit
  74. path: string;
  75. }
  76. export const DeleteResource = "EditorDeleteResource";
  77. /**
  78. * Called once the resource has been deleted
  79. * @type {String}
  80. */
  81. export const DeleteResourceNotification = "EditorDeleteResourceNotification";
  82. export interface DeleteResourceEvent {
  83. // The full path to the resource to edit
  84. path: string;
  85. }
  86. export const RenameResource = "EditorRenameResource";
  87. /**
  88. * Called once the resource has been renamed
  89. * @type {String}
  90. */
  91. export const RenameResourceNotification = "EditorRenameResourceNotification";
  92. export interface RenameResourceEvent {
  93. // The full path to the resource to edit
  94. path: string;
  95. newPath: string;
  96. // the asset to delete
  97. asset: ToolCore.Asset;
  98. }
  99. export const SceneEditStateChange = "SceneEditStateChange";
  100. export interface SceneEditStateChangeEvent {
  101. serializable: Atomic.Serializable;
  102. }
  103. export const InspectorProjectReference = "InspectorProjectReference";
  104. export interface InspectorProjectReferenceEvent {
  105. // The full path to the resource to edit
  106. path: string;
  107. }
  108. export const RemoveCurrentAssetAssigned = "RemoveCurrentAssetAssigned";
  109. export interface RemoveCurrentAssetAssignedEvent {
  110. }