Skip to content

Commit

Permalink
Fix demo code.
Browse files Browse the repository at this point in the history
  • Loading branch information
AllenDang committed Jan 26, 2021
1 parent fce66aa commit 19d39da
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,32 +38,32 @@ Compare to other Dear ImGui golang bindings, giu has following features:
package main

import (
"fmt"
"fmt"

g "github.com/AllenDang/giu"
g "github.com/AllenDang/giu"
)

func onClickMe() {
fmt.Println("Hello world!")
fmt.Println("Hello world!")
}

func onImSoCute() {
fmt.Println("Im sooooooo cute!!")
fmt.Println("Im sooooooo cute!!")
}

func loop() {
g.SingleWindow("hello world").Layout(
g.Label("Hello world from giu"),
g.Line(
g.Button("Click Me").OnClick(onClickMe),
g.Button("I'm so cute").OnClick(onImSoCute)),
)
)
g.SingleWindow("hello world").Layout(
g.Label("Hello world from giu"),
g.Line(
g.Button("Click Me").OnClick(onClickMe),
g.Button("I'm so cute").OnClick(onImSoCute),
),
)
}

func main() {
wnd := g.NewMasterWindow("Hello world", 400, 200, g.MasterWindowFlagsNotResizable, nil)
wnd.Run(loop)
wnd := g.NewMasterWindow("Hello world", 400, 200, g.MasterWindowFlagsNotResizable, nil)
wnd.Run(loop)
}
```

Expand Down

0 comments on commit 19d39da

Please sign in to comment.