Browse Source

Added tooltips to tools

Frytek 5 years ago
parent
commit
9a8f6cb0f6

+ 5 - 0
PixiEditor/Models/Tools/Tools/BrightnessTool.cs

@@ -12,6 +12,11 @@ namespace PixiEditor.Models.Tools.Tools
         public override ToolType ToolType => ToolType.Brightness;
         public override ToolType ToolType => ToolType.Brightness;
         public const float DarkenFactor = -0.06f;
         public const float DarkenFactor = -0.06f;
         public const float LightenFactor = 0.1f;
         public const float LightenFactor = 0.1f;
+        
+        public BrightnessTool()
+        {
+            Tooltip = "Makes pixel brighter or darker pixel (U)";
+        }
 
 
         public override BitmapPixelChanges Use(Layer layer, Coordinates[] coordinates, Color color, int toolSize)
         public override BitmapPixelChanges Use(Layer layer, Coordinates[] coordinates, Color color, int toolSize)
         {
         {

+ 5 - 0
PixiEditor/Models/Tools/Tools/CircleTool.cs

@@ -12,6 +12,11 @@ namespace PixiEditor.Models.Tools.Tools
     {
     {
         public override ToolType ToolType => ToolType.Circle;
         public override ToolType ToolType => ToolType.Circle;
 
 
+        public CircleTool()
+        {
+            Tooltip = "Draws circle on cavnas (C)";
+        }
+
         public override BitmapPixelChanges Use(Layer layer, Coordinates[] coordinates, Color color, int toolSize)
         public override BitmapPixelChanges Use(Layer layer, Coordinates[] coordinates, Color color, int toolSize)
         {
         {
             DoubleCords fixedCoordinates = CalculateCoordinatesForShapeRotation(coordinates[^1], coordinates[0]);
             DoubleCords fixedCoordinates = CalculateCoordinatesForShapeRotation(coordinates[^1], coordinates[0]);

+ 5 - 0
PixiEditor/Models/Tools/Tools/EarserTool.cs

@@ -11,6 +11,11 @@ namespace PixiEditor.Models.Tools.Tools
     {
     {
         public override ToolType ToolType => ToolType.Earser;
         public override ToolType ToolType => ToolType.Earser;
 
 
+        public EarserTool()
+        {
+            Tooltip = "Earsers color from pixel (E)";
+        }
+
         public override BitmapPixelChanges Use(Layer layer, Coordinates[] coordinates, Color color, int toolSize)
         public override BitmapPixelChanges Use(Layer layer, Coordinates[] coordinates, Color color, int toolSize)
         {
         {
             PenTool pen = new PenTool();
             PenTool pen = new PenTool();

+ 5 - 0
PixiEditor/Models/Tools/Tools/FloodFill.cs

@@ -11,6 +11,11 @@ namespace PixiEditor.Models.Tools.Tools
     {
     {
         public override ToolType ToolType => ToolType.Bucket;
         public override ToolType ToolType => ToolType.Bucket;
 
 
+        public FloodFill()
+        {
+            Tooltip = "Fills area with color (G)";
+        }
+
         public override BitmapPixelChanges Use(Layer layer, Coordinates[] coordinates, Color color, int toolSize)
         public override BitmapPixelChanges Use(Layer layer, Coordinates[] coordinates, Color color, int toolSize)
         {
         {
             return ForestFire(layer, coordinates[0], color);
             return ForestFire(layer, coordinates[0], color);

+ 5 - 0
PixiEditor/Models/Tools/Tools/LineTool.cs

@@ -9,6 +9,11 @@ namespace PixiEditor.Models.Tools.Tools
     {
     {
         public override ToolType ToolType => ToolType.Line;
         public override ToolType ToolType => ToolType.Line;
 
 
+        public LineTool()
+        {
+            Tooltip = "Draws line on canvas (L)";
+        }
+
         public override BitmapPixelChanges Use(Layer layer, Coordinates[] coordinates, Color color, int toolSize)
         public override BitmapPixelChanges Use(Layer layer, Coordinates[] coordinates, Color color, int toolSize)
         {
         {
             return BitmapPixelChanges.FromSingleColoredArray(CreateLine(coordinates), color);
             return BitmapPixelChanges.FromSingleColoredArray(CreateLine(coordinates), color);

+ 1 - 0
PixiEditor/Models/Tools/Tools/PenTool.cs

@@ -15,6 +15,7 @@ namespace PixiEditor.Models.Tools.Tools
         public PenTool()
         public PenTool()
         {
         {
             Cursor = Cursors.Pen;
             Cursor = Cursors.Pen;
+            Tooltip = "Standard brush (B)";
         }
         }
 
 
         public override BitmapPixelChanges Use(Layer layer, Coordinates[] coordinates, Color color, int toolSize)
         public override BitmapPixelChanges Use(Layer layer, Coordinates[] coordinates, Color color, int toolSize)

+ 5 - 0
PixiEditor/Models/Tools/Tools/RectangleTool.cs

@@ -11,6 +11,11 @@ namespace PixiEditor.Models.Tools.Tools
         public override ToolType ToolType => ToolType.Rectangle;
         public override ToolType ToolType => ToolType.Rectangle;
         public bool Filled { get; set; } = false;
         public bool Filled { get; set; } = false;
 
 
+        public RectangleTool()
+        {
+            Tooltip = "Draws rectanlge on cavnas (R)";
+        }
+
         public override BitmapPixelChanges Use(Layer layer, Coordinates[] coordinates, Color color, int toolSize)
         public override BitmapPixelChanges Use(Layer layer, Coordinates[] coordinates, Color color, int toolSize)
         {
         {
             return BitmapPixelChanges.FromSingleColoredArray(CreateRectangle(coordinates, toolSize), color);
             return BitmapPixelChanges.FromSingleColoredArray(CreateRectangle(coordinates, toolSize), color);