提交 db3ecb02 编写于 作者: aaronchen2k2k's avatar aaronchen2k2k

help

上级 403bb3bb
......@@ -462,8 +462,8 @@
},
{
"id": "help_key_bind",
"message": "KEYBINDINGS",
"translation": "KEYBINDINGS"
"message": "help",
"translation": "HELP"
},
{
"id": "help_mouse",
......@@ -487,13 +487,13 @@
},
{
"id": "help_show",
"message": "^H: Show/Hide help window",
"translation": "^H: Show/Hide help window"
"message": "",
"translation": "CTRL+H: Show/Hide help"
},
{
"id": "help_exit",
"message": "^C: Exit",
"translation": "^C: Exit"
"message": "",
"translation": "CTRL+C: Exit"
}
]
}
\ No newline at end of file
......@@ -460,7 +460,7 @@
{
"id": "help_key_bind",
"message": "KEYBINDINGS",
"translation": "快捷键"
"translation": "帮助"
},
{
"id": "help_mouse",
......@@ -484,13 +484,13 @@
},
{
"id": "help_show",
"message": "^H: Show/Hide help window",
"translation": "^H: 显示/隐藏帮助"
"message": "",
"translation": "CTRL+H: 显示/隐藏帮助"
},
{
"id": "help_exit",
"message": "^C: Exit",
"translation": "^C: 退出"
"message": "",
"translation": "CTRL+C: 退出"
}
]
}
\ No newline at end of file
......@@ -6,6 +6,7 @@ import (
constant "github.com/easysoft/zentaoatf/src/utils/const"
"github.com/easysoft/zentaoatf/src/utils/vari"
"github.com/jroimartin/gocui"
"log"
)
func InitMainPage() error {
......@@ -30,6 +31,9 @@ func InitMainPage() error {
}
func MainPageKeyBindings() error {
if err := vari.Cui.SetKeybinding("", gocui.KeyCtrlH, gocui.ModNone, widget.ShowHelpFromView); err != nil {
log.Panicln(err)
}
if err := vari.Cui.SetKeybinding("", gocui.KeyCtrlC, gocui.ModNone, ui.Quit); err != nil {
return err
}
......
......@@ -35,7 +35,7 @@ func NewHelpWidget() {
h := len(lines)
w = w + 2
help := HelpWidget{name: "help", x: maxX - w - 3, y: 1, w: w, h: h, body: HelpGlobal}
help := HelpWidget{name: "help", x: maxX - w - 3, y: vari.MainViewHeight, w: w, h: h, body: HelpGlobal}
help.Layout()
}
......@@ -78,7 +78,8 @@ func HideHelp() error {
}
func initContent() {
HelpGlobal = fmt.Sprintf("%s \n %s \n",
HelpGlobal = fmt.Sprintf("%s \n %s \n %s \n",
i118Utils.I118Prt.Sprintf("help_key_bind"),
i118Utils.I118Prt.Sprintf("help_show"),
i118Utils.I118Prt.Sprintf("help_exit"))
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册