f0cii / gowi

Gui for golang, UI created by ResEdit

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

gowi

Gui for golang, UI created by ResEdit

Code

import ( "github.com/sumorf/gowi" . "github.com/sumorf/gowi/declarative" "fmt" )

type MyMainWindow struct { *gowi.MainWindow label1 *gowi.Label button1 *gowi.Button }

func main() { app := gowi.New()

mw := new(MyMainWindow)

m := MainWindow{
    AssignTo:&mw.MainWindow,
    ID:1000,
    Controls:[]Control{
        Button{
            AssignTo:&mw.button1,
            ID:1001,
            OnClicked:func() {
                fmt.Println("Button clicked.")
                mw.SetWindowText("Clicked")
            },
        },
    },
}
m.Create()
m.Show()

mw.SetWindowText("Hello")
app.Run()

}

Screenshots

How to design:

ResEdit

Run:

Running screenshot

About

Gui for golang, UI created by ResEdit

License:MIT License


Languages

Language:Go 100.0%