@@ -18,7 +18,7 @@ public class TextBox : Component
1818 private bool _isSelected = false ;
1919 private bool _cursorVisible = true ;
2020 private DateTime _lastCursorBlink = DateTime . Now ;
21- private const int _cursorBlinkInterval = 400 ;
21+ private const int _cursorBlinkInterval = 1 ;
2222
2323 public TextBox ( int x , int y , int width , int height , string text = "" ) : base ( x , y , width , height )
2424 {
@@ -78,7 +78,7 @@ public override void Update()
7878 MarkDirty ( ) ;
7979 }
8080
81- if ( _isSelected && ( DateTime . Now - _lastCursorBlink ) . TotalMilliseconds > _cursorBlinkInterval )
81+ if ( ( DateTime . Now - _lastCursorBlink ) . Seconds > _cursorBlinkInterval )
8282 {
8383 _cursorVisible = ! _cursorVisible ;
8484 _lastCursorBlink = DateTime . Now ;
@@ -92,19 +92,6 @@ public override void Draw()
9292 {
9393 base . Draw ( ) ;
9494
95- /*
96- // Dessin du cadre de la TextBox
97- Clear(Kernel.WhiteColor);
98- DrawLine(Kernel.BlackColor, 0, 0, 0 + Width, 0);
99- DrawLine(Kernel.Gray, 0, 0 + 1, 0 + Width, 0 + 1);
100- DrawLine(Kernel.BlackColor, 0, 0, 0, 0 + Height);
101- DrawLine(Kernel.Gray, 0 + 1, 0 + 1, 0 + 1, 0 + Height);
102- DrawLine(Kernel.DarkGray, 0 + 1, 0 + Height - 1, 0 + Width, 0 + Height - 1);
103- DrawLine(Kernel.WhiteColor, 0, 0 + Height, 0 + Width + 1, 0 + Height);
104- DrawLine(Kernel.DarkGray, 0 + Width - 1, 0 + 1, 0 + Width - 1, 0 + Height);
105- DrawLine(Kernel.WhiteColor, 0 + Width, 0, 0 + Width, 0 + Height);
106- */
107-
10895 string [ ] lines = Text . Split ( '\n ' ) ;
10996 int offsetY = 0 + 4 ;
11097 int cursorX = 0 + 4 ;
0 commit comments