EditorEvents.ts 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  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 PlayerStarted = "EditorPlayerStarted";
  28. export const PlayerStopped = "EditorPlayerStopped";
  29. export const PlayerPaused = "EditorPlayerPaused";
  30. export const PlayerResumed = "EditorPlayerResumed";
  31. export const PlayerLog = "EditorPlayerLog";
  32. export interface PlayerLogEvent {
  33. message: string;
  34. level: number;
  35. }
  36. export const ActiveSceneEditorChange = "EditorActiveSceneEditorChange";
  37. export interface ActiveSceneEditorChangeEvent {
  38. sceneEditor: Editor.SceneEditor3D;
  39. }
  40. export const SceneClosed = "EditorSceneClosed";
  41. export interface SceneClosedEvent {
  42. scene: Atomic.Scene;
  43. }
  44. export const ContentFolderChanged = "ContentFolderChanged";
  45. export interface ContentFolderChangedEvent {
  46. path: string;
  47. }
  48. export const CloseProject = "EditorCloseProject";
  49. export const ProjectClosed = "EditorProjectClosed";
  50. export const LoadProject = "EditorLoadProject";
  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. export interface SaveResourceEvent {
  58. // The full path to the resource to save
  59. // empty or undefined for current
  60. path: string;
  61. }
  62. export const EditorResourceClose = "EditorResourceClose";
  63. export interface EditorCloseResourceEvent {
  64. editor:Editor.ResourceEditor;
  65. navigateToAvailableResource:boolean;
  66. }
  67. export const EditResource = "EditorEditResource";
  68. export interface EditResourceEvent {
  69. // The full path to the resource to edit
  70. path: string;
  71. }
  72. export const SceneEditStateChange = "SceneEditStateChange";
  73. export interface SceneEditStateChangeEvent {
  74. serializable: Atomic.Serializable;
  75. }
  76. export const InspectorProjectReference = "InspectorProjectReference";
  77. export interface InspectorProjectReferenceEvent {
  78. // The full path to the resource to edit
  79. path: string;
  80. }
  81. export const RemoveCurrentAssetAssigned = "RemoveCurrentAssetAssigned";
  82. export interface RemoveCurrentAssetAssignedEvent {
  83. }