EditorEvents.ts 3.1 KB

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