@@ -16,14 +16,12 @@ use graph_craft::document::{NodeId, NodeInput};
16
16
use graphene_core:: Color ;
17
17
use graphene_core:: vector:: { PointId , VectorModificationType } ;
18
18
use graphene_std:: vector:: { HandleId , ManipulatorPointId , NoHashBuilder , SegmentId , VectorData } ;
19
-
19
+ use spline_mode :: * ;
20
20
use std:: fmt;
21
21
22
- // TODO: refactor the code into new module for drawing a Path.
22
+ // TODO: Refactor the code into new module for drawing a path
23
23
mod spline_mode;
24
24
25
- use spline_mode:: * ;
26
-
27
25
#[ derive( Default ) ]
28
26
pub struct PenTool {
29
27
fsm_state : PenToolFsmState ,
@@ -100,7 +98,7 @@ pub enum PenToolMessage {
100
98
FinalPosition {
101
99
final_position : DVec2 ,
102
100
} ,
103
- // Specific to the Spline mode.
101
+ /// Specific to spline mode.
104
102
SplineMergeEndpoints ,
105
103
SwapHandles ,
106
104
}
@@ -147,7 +145,7 @@ impl PenTool {
147
145
148
146
DropdownInput :: new ( vec ! [ tool_mode_entries] )
149
147
. selected_index ( Some ( ( self . options . tool_mode ) as u32 ) )
150
- . tooltip ( "Select Spline to draw smooth curves or select Path to draw a path." )
148
+ . tooltip ( format ! ( "Path Mode: \n \n {} \n {}" , ToolMode :: Path . description ( ) , ToolMode :: Spline . description ( ) ) )
151
149
. widget_holder ( )
152
150
}
153
151
}
@@ -352,6 +350,16 @@ impl fmt::Display for ToolMode {
352
350
}
353
351
}
354
352
}
353
+
354
+ impl ToolMode {
355
+ fn description ( & self ) -> & ' static str {
356
+ match self {
357
+ ToolMode :: Path => "Path mode is the standard Pen tool behavior for drawing Bézier paths." ,
358
+ ToolMode :: Spline => "Spline mode is for placing the control points of a spline curve." ,
359
+ }
360
+ }
361
+ }
362
+
355
363
/// The type of handle which is dragged by the cursor (under the cursor).
356
364
///
357
365
/// 
0 commit comments