add windows gui support
支持windows 显示
This commit is contained in:
@@ -1,8 +1,3 @@
|
||||
<a href="https://tracking.gitads.io/?repo=gormt">
|
||||
<img src="https://images.gitads.io/gormt" alt="GitAds"/>
|
||||
</a>
|
||||
|
||||
|
||||
[](https://travis-ci.org/xxjwxc/gormt)
|
||||
[](https://goreportcard.com/report/github.com/xxjwxc/gormt)
|
||||
[](https://godoc.org/github.com/xxjwxc/gormt)
|
||||
|
||||
@@ -191,6 +191,14 @@ or
|
||||
go generate
|
||||
```
|
||||
|
||||
|
||||
### 说明:windows 不支持中文默认方式。ASCALL 模式
|
||||
切换编码方式
|
||||
```
|
||||
CHCP 65001
|
||||
```
|
||||
|
||||
|
||||
## 8. 下一步计划
|
||||
|
||||
- 更新,删除功能函数添加
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user