ui

package
v0.0.0-...-40236e0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 11, 2015 License: GPL-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var BLACK = []float64{0, 0, 0}
View Source
var RED = []float64{0.8, 0, 0}

Functions

This section is empty.

Types

type MainWindow

type MainWindow struct {
	*gtk.Window
	// Areas
	MainArea  *gtk.Box
	ScoreArea *gtk.Box

	// Labels
	Scores      *gtk.Label
	BlacksScore *gtk.Label
	RedsScore   *gtk.Label

	// Board drawing details
	BoardEventBox *gtk.EventBox
	BoardView     *gtk.DrawingArea
	BoardHeight   int
	BoardWidth    int

	// Internal board structure
	Board board.Board
	// contains filtered or unexported fields
}

func NewMainWindow

func NewMainWindow() *MainWindow

func (*MainWindow) DrawPiece

func (self *MainWindow) DrawPiece(cr *cairo.Context, x, y float64, color []float64)

draw the piece on the canvas

func (*MainWindow) DrawSelector

func (self *MainWindow) DrawSelector(cr *cairo.Context, x, y float64)

draw the piece on the canvas

func (*MainWindow) InitializeWidgets

func (self *MainWindow) InitializeWidgets()

Initialize the game widgets

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL