No Description
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

PickingTool.cs 1.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. using UnityEditor.EditorTools;
  2. using UnityEngine;
  3. namespace UnityEditor.Tilemaps
  4. {
  5. /// <summary>
  6. /// Tool for doing a picking action with the Tile Palette
  7. /// </summary>
  8. public sealed class PickingTool : TilemapEditorTool
  9. {
  10. private static class Styles
  11. {
  12. public static string tooltipStringFormat = "|Pick or marquee select new brush ({0})";
  13. public static string shortcutId = GridPaintPaletteWindow.ShortcutIds.k_Picker;
  14. public static GUIContent toolContent = EditorGUIUtility.IconContent("Grid.PickingTool", GetTooltipText(tooltipStringFormat, shortcutId));
  15. }
  16. /// <summary>
  17. /// Tooltip String Format for the PickingTool
  18. /// </summary>
  19. protected override string tooltipStringFormat
  20. {
  21. get { return Styles.tooltipStringFormat; }
  22. }
  23. /// <summary>
  24. /// Shortcut Id for the PickingTool
  25. /// </summary>
  26. protected override string shortcutId
  27. {
  28. get { return Styles.shortcutId; }
  29. }
  30. /// <summary>
  31. /// Toolbar Icon for the PickingTool
  32. /// </summary>
  33. public override GUIContent toolbarIcon
  34. {
  35. get { return Styles.toolContent; }
  36. }
  37. }
  38. }