@@ -14,48 +14,48 @@ pub use console_bitfont::BitfontConsole;
1414#[ cfg( ENABLE_TTF_CONSOLE ) ]
1515pub use console_ttf:: TtfConsole ;
1616
17- /// 统一的 Console trait,定义所有 console 实现的通用接口
17+ /// General [` Console`] trait, which defined generic APIs.
1818pub trait Console : Write {
19- /// 清除屏幕
19+ /// Clean screen
2020 fn clear ( & mut self ) ;
2121
22- /// 设置前景色
22+ /// Set up foreground color
2323 fn set_fg_color ( & mut self , color : Color ) ;
2424
25- /// 设置背景色
25+ /// Set up background color
2626 fn set_bg_color ( & mut self , color : Color ) ;
2727
28- /// 获取当前前景色
28+ /// Get current foreground color
2929 fn get_fg_color ( & self ) -> Color ;
3030
31- /// 获取当前背景色
31+ /// Get current background color
3232 fn get_bg_color ( & self ) -> Color ;
3333
34- /// 打印单个字符
34+ /// Print single char
3535 fn put_char ( & mut self , ch : char ) ;
3636
37- /// 光标上移
37+ /// Move cursor up
3838 fn cursor_up ( & mut self , lines : u32 ) ;
3939
40- /// 光标下移
40+ /// Move cursor down
4141 fn cursor_down ( & mut self , lines : u32 ) ;
4242
43- /// 光标左移
43+ /// Move cursor left
4444 fn cursor_left ( & mut self , cols : u32 ) ;
4545
46- /// 光标右移
46+ /// Move cursor right
4747 fn cursor_right ( & mut self , cols : u32 ) ;
4848
49- /// 设置光标位置
49+ /// Set up cursor position
5050 fn set_cursor_pos ( & mut self , x : u32 , y : u32 ) ;
5151
52- /// 获取光标位置
52+ /// Get current cursor posision
5353 fn get_cursor_pos ( & self ) -> ( u32 , u32 ) ;
5454
55- /// 隐藏光标
55+ /// Hide cursor
5656 fn cursor_hide ( & mut self ) ;
5757
58- /// 显示光标
58+ /// Show cursor
5959 fn cursor_show ( & mut self ) ;
6060}
6161
0 commit comments