added cimgui-go
This commit is contained in:
parent
6260c0004e
commit
96149ee38b
|
@ -6,6 +6,7 @@ import (
|
||||||
"github.com/kschamplin/gotelem"
|
"github.com/kschamplin/gotelem"
|
||||||
"github.com/kschamplin/gotelem/mprpc"
|
"github.com/kschamplin/gotelem/mprpc"
|
||||||
"github.com/urfave/cli/v2"
|
"github.com/urfave/cli/v2"
|
||||||
|
imgui "github.com/AllenDang/cimgui-go"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@ -29,6 +30,19 @@ var clientCmd = &cli.Command{
|
||||||
Description: `
|
Description: `
|
||||||
Connects to a gotelem server or relay. Can be used to
|
Connects to a gotelem server or relay. Can be used to
|
||||||
`,
|
`,
|
||||||
|
Action: client,
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
func loop() {
|
||||||
|
imgui.ShowDemoWindow()
|
||||||
|
}
|
||||||
|
|
||||||
|
func client(ctx *cli.Context) error {
|
||||||
|
backend := imgui.CreateBackend()
|
||||||
|
backend.CreateWindow("hi there", 1200, 900, 0)
|
||||||
|
backend.Run(loop)
|
||||||
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
2
go.mod
2
go.mod
|
@ -3,6 +3,7 @@ module github.com/kschamplin/gotelem
|
||||||
go 1.20
|
go 1.20
|
||||||
|
|
||||||
require (
|
require (
|
||||||
|
github.com/AllenDang/cimgui-go v0.0.0-20230502145512-97518c13c52b
|
||||||
github.com/jmoiron/sqlx v1.3.5
|
github.com/jmoiron/sqlx v1.3.5
|
||||||
github.com/mattn/go-sqlite3 v1.14.16
|
github.com/mattn/go-sqlite3 v1.14.16
|
||||||
github.com/tinylib/msgp v1.1.8
|
github.com/tinylib/msgp v1.1.8
|
||||||
|
@ -19,5 +20,4 @@ require (
|
||||||
github.com/russross/blackfriday/v2 v2.1.0 // indirect
|
github.com/russross/blackfriday/v2 v2.1.0 // indirect
|
||||||
github.com/stretchr/testify v1.8.0 // indirect
|
github.com/stretchr/testify v1.8.0 // indirect
|
||||||
github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 // indirect
|
github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 // indirect
|
||||||
gopkg.in/yaml.v3 v3.0.1 // indirect
|
|
||||||
)
|
)
|
||||||
|
|
2
go.sum
2
go.sum
|
@ -1,3 +1,5 @@
|
||||||
|
github.com/AllenDang/cimgui-go v0.0.0-20230502145512-97518c13c52b h1:EpLVWHcO5auIf8X0STrno4WAWThu6s6QgJ1ywJa5Tmo=
|
||||||
|
github.com/AllenDang/cimgui-go v0.0.0-20230502145512-97518c13c52b/go.mod h1:iNfbIyOBN8k3XScMxULbrwYbPsXEAUD0Jb6UwrspQb8=
|
||||||
github.com/cpuguy83/go-md2man/v2 v2.0.2 h1:p1EgwI/C7NhT0JmVkwCD2ZBK8j4aeHQX2pMHHBfMQ6w=
|
github.com/cpuguy83/go-md2man/v2 v2.0.2 h1:p1EgwI/C7NhT0JmVkwCD2ZBK8j4aeHQX2pMHHBfMQ6w=
|
||||||
github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
|
github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
|
||||||
github.com/creack/goselect v0.1.2 h1:2DNy14+JPjRBgPzAd1thbQp4BSIihxcBf0IXhQXDRa0=
|
github.com/creack/goselect v0.1.2 h1:2DNy14+JPjRBgPzAd1thbQp4BSIihxcBf0IXhQXDRa0=
|
||||||
|
|
Loading…
Reference in a new issue