From 19d39da5759eee0d51b4611294628743d3a013c1 Mon Sep 17 00:00:00 2001 From: AllenDang Date: Tue, 26 Jan 2021 18:35:10 +0800 Subject: [PATCH] Fix demo code. --- README.md | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index e9be7bf3..345f4033 100644 --- a/README.md +++ b/README.md @@ -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) } ```