| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138 |
- using System.Runtime.CompilerServices;
- using BansheeEngine;
- namespace BansheeEditor
- {
- /// <summary>
- /// Types of icons that may be displayed on the tool bar.
- /// </summary>
- 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
- };
- /// <summary>
- /// Types of icons that may be displayed in the scene window.
- /// </summary>
- public enum SceneWindowIcon // Note: Must match C++ enum SceneWindowIcon
- {
- View, Move, Rotate, Scale, Pivot, Center, Local, World, MoveSnap, RotateSnap
- };
- /// <summary>
- /// Types of icons that may be displayed in the library window.
- /// </summary>
- public enum LibraryWindowIcon // Note: Must match C++ enum LibraryWindowIcon
- {
- Home, Up, Clear, Options
- };
- /// <summary>
- /// Types of icons that may be displayed in the inspector window.
- /// </summary>
- public enum InspectorWindowIcon // Note: Must match C++ enum InspectorWindowIcon
- {
- Create, Clone, Clear, Resize, Delete, MoveUp, MoveDown, Edit, Apply, Add, Cancel
- };
- /// <summary>
- /// Types of icons that may be displayed for resources in the library window.
- /// </summary>
- public enum LibraryItemIcon // Note: Must match C++ enum ProjectIcon
- {
- Folder, Mesh, Font, Texture, PlainText, ScriptCode, SpriteTexture, Shader, ShaderInclude, Material, Prefab, GUISkin
- };
- /// <summary>
- /// Contains various editor-specific resources that are always available.
- /// </summary>
- public static class EditorBuiltin
- {
- /// <summary>Returns a texture displaying an X button.</summary>
- public static SpriteTexture XBtnIcon { get { return Internal_GetXBtnIcon(); } }
- /// <summary>Returns text contained in the default "empty" shader.</summary>
- public static string EmptyShaderCode { get { return Internal_GetEmptyShaderCode(); } }
- /// <summary>Returns text contained in the default "empty" C# script.</summary>
- public static string EmptyCSScriptCode { get { return Internal_GetEmptyCSScriptCode(); } }
- /// <summary>
- /// Retrieves an icon used for displaying an entry in the library window.
- /// </summary>
- /// <param name="icon">Type of the icon to retrieve.</param>
- /// <param name="size">Size of the icon to retrieve in pixels. This will be rounded
- /// to nearest available size.</param>
- /// <returns>Sprite texture of the icon.</returns>
- public static SpriteTexture GetLibraryItemIcon(LibraryItemIcon icon, int size)
- {
- return Internal_GetLibraryItemIcon(icon, size);
- }
- /// <summary>
- /// Retrieves an icon that may be displayed on the main window's toolbar.
- /// </summary>
- /// <param name="icon">Type of icon to retrieve.</param>
- /// <returns>Sprite texture of the icon.</returns>
- public static SpriteTexture GetToolbarIcon(ToolbarIcon icon)
- {
- return Internal_GetToolbarIcon(icon);
- }
- /// <summary>
- /// Retrieves an icon that may be displayed on the library window.
- /// </summary>
- /// <param name="icon">Type of icon to retrieve.</param>
- /// <returns>Sprite texture of the icon.</returns>
- public static SpriteTexture GetLibraryWindowIcon(LibraryWindowIcon icon)
- {
- return Internal_GetLibraryWindowIcon(icon);
- }
- /// <summary>
- /// Retrieves an icon that may be displayed on the inspector window.
- /// </summary>
- /// <param name="icon">Type of icon to retrieve.</param>
- /// <returns>Sprite texture of the icon.</returns>
- public static SpriteTexture GetInspectorWindowIcon(InspectorWindowIcon icon)
- {
- return Internal_GetInspectorWindowIcon(icon);
- }
- /// <summary>
- /// Retrieves an icon that may be displayed on the scene window.
- /// </summary>
- /// <param name="icon">Type of icon to retrieve.</param>
- /// <returns>Sprite texture of the icon.</returns>
- public static SpriteTexture GetSceneWindowIcon(SceneWindowIcon icon)
- {
- return Internal_GetSceneWindowIcon(icon);
- }
- [MethodImpl(MethodImplOptions.InternalCall)]
- private static extern SpriteTexture Internal_GetLibraryItemIcon(LibraryItemIcon icon, int size);
-
- [MethodImpl(MethodImplOptions.InternalCall)]
- private static extern SpriteTexture Internal_GetXBtnIcon();
- [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 SpriteTexture Internal_GetSceneWindowIcon(SceneWindowIcon icon);
- }
- }
|