func main() { placeCells[0][0].kind = 0 placeCells[0][0].num = 1 cursorx = -1 cursory = -1 for i := 0; i < 9; i++ { for j := 0; j < 3; j++ { blockPosTables[i].y[j] = j + (i/3)*3 blockPosTables[i].x[j] = j + (i%3)*3 } } qix := 0 for y := 0; y < 9; y++ { for x := 0; x < 9; x++ { if quiz_01[qix] == '0' { placeCells[y][x].kind = CELL_KIND_NORMAL placeCells[y][x].num = 0 } else { placeCells[y][x].kind = CELL_KIND_FIXED placeCells[y][x].num = int(quiz_01[qix]) - '0' } qix++ } } ui.Main(ui_main) }
func main() { ui.Main(func() { go ui_main() ui.Run() exit <- true }) }
func main() { ui.Main(func() { w := ui.NewWidget() w.OnPaintEvent(func(e *ui.PaintEvent) { paint := ui.NewPainter() defer paint.Close() paint.Begin(w) pen := ui.NewPen() pen.SetColor(color.RGBA{255, 128, 0, 0}) pen.SetWidth(2) fmt.Println(pen, pen.Color(), pen.Width()) paint.SetPen(pen) brush := ui.NewBrush() brush.SetStyle(ui.SolidPattern) brush.SetColor(color.RGBA{128, 128, 0, 255}) paint.SetBrush(brush) paint.DrawRect(ui.Rect{10, 10, 100, 100}) }) w.SetSize(ui.Size{400, 400}) w.Show() ui.Run() }) }
func main() { fmt.Println(ui.Version()) ui.Main(func() { go main_ui() ui.Run() exit <- true }) }
func main() { fmt.Println(ui.Version()) ui.Main(func() { w := ui.NewWidget() w.SetWindowTitle(ui.Version()) w.SetSizev(300, 200) defer w.Close() w.Show() ui.Run() }) }
func main() { ui.Main(ui_main) }
func main() { runtime.GOMAXPROCS(4) ui.Main(main_ui) }