Skip to content

Commit

Permalink
add windows gui support
Browse files Browse the repository at this point in the history
支持windows 显示
  • Loading branch information
xxjwxc committed Sep 10, 2020
1 parent 285caff commit 2ef0cca
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 5 deletions.
5 changes: 0 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
<a href="https://tracking.gitads.io/?repo=gormt">
<img src="https://images.gitads.io/gormt" alt="GitAds"/>
</a>


[![Build Status](https://travis-ci.org/xxjwxc/gormt.svg?branch=master)](https://travis-ci.org/xxjwxc/gormt)
[![Go Report Card](https://goreportcard.com/badge/github.com/xxjwxc/gormt)](https://goreportcard.com/report/github.com/xxjwxc/gormt)
[![GoDoc](https://godoc.org/github.com/xxjwxc/gormt?status.svg)](https://godoc.org/github.com/xxjwxc/gormt)
Expand Down
8 changes: 8 additions & 0 deletions README_zh_cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,14 @@ or
go generate
```


### 说明:windows 不支持中文默认方式。ASCALL 模式
切换编码方式
```
CHCP 65001
```


## 8. 下一步计划

- 更新,删除功能函数添加
Expand Down
1 change: 1 addition & 0 deletions data/dlg/cui.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
9 changes: 9 additions & 0 deletions data/dlg/mycui.go
Original file line number Diff line number Diff line change
@@ -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()
}

0 comments on commit 2ef0cca

Please sign in to comment.