//********************************** Banshee Engine (www.banshee3d.com) **************************************************// //**************** Copyright (c) 2016 Marko Pintera (marko.pintera@gmail.com). All rights reserved. **********************// using System.Runtime.CompilerServices; using BansheeEngine; namespace BansheeEditor { /** @addtogroup Utility-Editor * @{ */ /// /// Types of icons that may be displayed on the tool bar. /// public enum ToolbarIcon // Note: Must match C++ enum ToolbarIcon { NewCamera, NewRenderable, NewPointLight, NewDirLight, NewSpotLight, NewSceneObject, NewCube, NewSphere, NewCone, NewQuad, NewMat, NewCSScript, NewShader, NewSpriteTex, Pause, Play, Step, Undo, Redo, OpenProject, SaveProject, SaveScene } /// /// Types of icons that may be displayed in the scene window. /// public enum SceneWindowIcon // Note: Must match C++ enum SceneWindowIcon { View, Move, Rotate, Scale, Pivot, Center, Local, World, MoveSnap, RotateSnap } /// /// Types of icons that may be displayed in the library window. /// public enum LibraryWindowIcon // Note: Must match C++ enum LibraryWindowIcon { Home, Up, Clear, Options } /// /// Types of icons that may be displayed in the inspector window. /// public enum InspectorWindowIcon // Note: Must match C++ enum InspectorWindowIcon { Create, Clone, Clear, Resize, Delete, MoveUp, MoveDown, Edit, Apply, Add, Cancel } /// /// Types of icons that may be displayed for resources in the library window. /// public enum LibraryItemIcon // Note: Must match C++ enum ProjectIcon { Folder, Mesh, Font, Texture, PlainText, ScriptCode, SpriteTexture, Shader, ShaderInclude, Material, Prefab, GUISkin, PhysicsMaterial, PhysicsMesh, AudioClip, AnimationClip } /// /// Types of icons that may be displayed in the animation editor window. /// public enum AnimationWindowIcon // Note: Must match C++ enum AnimationWindowIcon { Play, Record, FrameForward, FrameBack, AddKeyframe, AddEvent, Keyframe, Event }; /// /// Types of icons that can be used for displaying types of log messages. /// public enum LogIcon // Note: Must match C++ enum LogMessageIcon { Info, Warning, Error } /// /// Types of icons used in various areas throughout the editor. /// public enum EditorIcon // Note: Must match C++ enum EditorIcon { X, Component, SceneObject } /// /// Contains various editor-specific resources that are always available. /// public static class EditorBuiltin { /// Returns text contained in the default "empty" shader. public static string EmptyShaderCode { get { return Internal_GetEmptyShaderCode(); } } /// Returns text contained in the default "empty" C# script. public static string EmptyCSScriptCode { get { return Internal_GetEmptyCSScriptCode(); } } /// /// Returns the default Font used in the editor. /// public static Font DefaultFont { get { return Internal_GetDefaultFont(); } } /// /// Returns the default GUI skin used in the editor. /// public static GUISkin GUISkin { get { return Internal_GetGUISkin(); } } /// /// Retrieves an icon used for displaying an entry in the library window. /// /// Type of the icon to retrieve. /// Size of the icon to retrieve in pixels. This will be rounded /// to nearest available size. /// Sprite texture of the icon. public static SpriteTexture GetLibraryItemIcon(LibraryItemIcon icon, int size) { return Internal_GetLibraryItemIcon(icon, size); } /// /// Retrieves an icon that may be displayed on the main window's toolbar. /// /// Type of icon to retrieve. /// Sprite texture of the icon. public static SpriteTexture GetToolbarIcon(ToolbarIcon icon) { return Internal_GetToolbarIcon(icon); } /// /// Retrieves an icon that may be displayed on the library window. /// /// Type of icon to retrieve. /// Sprite texture of the icon. public static SpriteTexture GetLibraryWindowIcon(LibraryWindowIcon icon) { return Internal_GetLibraryWindowIcon(icon); } /// /// Retrieves an icon that may be displayed on the inspector window. /// /// Type of icon to retrieve. /// Sprite texture of the icon. public static SpriteTexture GetInspectorWindowIcon(InspectorWindowIcon icon) { return Internal_GetInspectorWindowIcon(icon); } /// /// Retrieves an icon that may be displayed on the scene window. /// /// Type of icon to retrieve. /// Sprite textures of the icon. public static GUIContentImages GetSceneWindowIcon(SceneWindowIcon icon) { Internal_GetSceneWindowIcon(icon, out var output); return output; } /// /// Retrieves an icon that may be displayed on the animation window. /// /// Type of icon to retrieve. /// Sprite textures of the icon. public static GUIContentImages GetAnimationWindowIcon(AnimationWindowIcon icon) { Internal_GetAnimationWindowIcon(icon, out var output); return output; } /// /// Retrieves an icon that represents different types of log entries. /// /// Type of icon to retrieve. /// Size of the icon in pixels. Nearest available size will be returned. /// Controls should the dark or light version of the icon be returned. /// Sprite texture of the icon. public static SpriteTexture GetLogIcon(LogIcon icon, int size, bool dark) { return Internal_GetLogIcon(icon, size, dark); } /// /// Retrieves an icon used throughout the editor. /// /// Type of icon to retrieve. /// Sprite texture of the icon. public static SpriteTexture GetEditorIcon(EditorIcon icon) { return Internal_GetEditorIcon(icon); } [MethodImpl(MethodImplOptions.InternalCall)] private static extern SpriteTexture Internal_GetLibraryItemIcon(LibraryItemIcon icon, int size); [MethodImpl(MethodImplOptions.InternalCall)] private static extern string Internal_GetEmptyShaderCode(); [MethodImpl(MethodImplOptions.InternalCall)] private static extern string Internal_GetEmptyCSScriptCode(); [MethodImpl(MethodImplOptions.InternalCall)] private static extern SpriteTexture Internal_GetToolbarIcon(ToolbarIcon icon); [MethodImpl(MethodImplOptions.InternalCall)] private static extern SpriteTexture Internal_GetLibraryWindowIcon(LibraryWindowIcon icon); [MethodImpl(MethodImplOptions.InternalCall)] private static extern SpriteTexture Internal_GetInspectorWindowIcon(InspectorWindowIcon icon); [MethodImpl(MethodImplOptions.InternalCall)] private static extern void Internal_GetSceneWindowIcon(SceneWindowIcon icon, out GUIContentImages output); [MethodImpl(MethodImplOptions.InternalCall)] private static extern void Internal_GetAnimationWindowIcon(AnimationWindowIcon icon, out GUIContentImages output); [MethodImpl(MethodImplOptions.InternalCall)] private static extern SpriteTexture Internal_GetLogIcon(LogIcon icon, int size, bool dark); [MethodImpl(MethodImplOptions.InternalCall)] private static extern SpriteTexture Internal_GetEditorIcon(EditorIcon icon); [MethodImpl(MethodImplOptions.InternalCall)] private static extern Font Internal_GetDefaultFont(); [MethodImpl(MethodImplOptions.InternalCall)] private static extern GUISkin Internal_GetGUISkin(); } /** @} */ }