add windows gui support

支持windows 显示
This commit is contained in:
谢小军
2020-09-10 18:37:47 +08:00
parent 285caffe7a
commit 2ef0cca3d4
4 changed files with 18 additions and 5 deletions

View File

@@ -389,6 +389,7 @@ func listUp(g *gocui.Gui, v *gocui.View) error {
// OnInitDialog init main loop
func OnInitDialog() {
g, err := gocui.NewGui(gocui.OutputNormal)
g.ASCII = true
if err != nil {
log.Panicln(err)

View File

@@ -1,6 +1,15 @@
package dlg
import (
"runtime"
"github.com/xxjwxc/public/myi18n"
)
// WinMain windows main loop
func WinMain() {
if runtime.GOOS == "windows" {
myi18n.SetLocalLG("en")
}
OnInitDialog()
}