Make go board widget show (even if it doesn't quite work yet)
This commit is contained in:
@ -1,9 +1,10 @@
|
||||
# This is a widget that handles a go game
|
||||
# It needs a goban object, and handles it from beginning to end
|
||||
|
||||
import goban
|
||||
import os
|
||||
import gtk
|
||||
import lib.options
|
||||
|
||||
import goban
|
||||
|
||||
|
||||
class GoGame(gtk.HBox):
|
||||
@ -15,7 +16,7 @@ class GoGame(gtk.HBox):
|
||||
_img_res = None
|
||||
|
||||
def __init__(self, goban):
|
||||
self.HBox.__init__(self)
|
||||
super(GoGame, self).__init__()
|
||||
|
||||
if GoGame._img_res is None:
|
||||
GoGame._img_res = _build_img_res()
|
||||
@ -28,8 +29,12 @@ class GoGame(gtk.HBox):
|
||||
def _init_widgets(self):
|
||||
self.board_area = gtk.DrawingArea()
|
||||
|
||||
# All of this is to create the info box along the right side of the board
|
||||
info_box = gtk.VBox()
|
||||
info_rows = [gtk.VBox()] * 3
|
||||
info_rows = []
|
||||
for i in range(3):
|
||||
info_rows.append(gtk.VBox())
|
||||
|
||||
to_move_label = gtk.Label('To Move:')
|
||||
black_cap_label = gtk.Label('Black Captures:')
|
||||
white_cap_label = gtk.Label('White Captures:')
|
||||
|
Reference in New Issue
Block a user