示例#1
0
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)
}
示例#2
0
文件: test.go 项目: titoi2/DialogTest
func main() {
	ui.Main(func() {
		go ui_main()
		ui.Run()
		exit <- true
	})
}
示例#3
0
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()
	})
}
示例#4
0
文件: attrs.go 项目: rmoreira/go-ui
func main() {
	fmt.Println(ui.Version())
	ui.Main(func() {
		go main_ui()
		ui.Run()
		exit <- true
	})
}
示例#5
0
文件: minimal.go 项目: rmoreira/go-ui
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()
	})
}
示例#6
0
func main() {
	ui.Main(ui_main)
}
示例#7
0
文件: dock.go 项目: rmoreira/go-ui
func main() {
	runtime.GOMAXPROCS(4)
	ui.Main(main_ui)
}