Play around with decorating the game tiles.

This commit is contained in:
Dorian 2017-05-31 08:43:19 -04:00
parent b6ff53fd8d
commit c28457bbcf
2 changed files with 16 additions and 1 deletions

View File

@ -65,7 +65,11 @@ class GameBoard(GridLayout):
source = 'non_play' source = 'non_play'
elif row % 2 == 1 and col % 2 == 1: elif row % 2 == 1 and col % 2 == 1:
source = 'non_play' source = 'non_play'
self.add_widget(Image(source='images/{}.png'.format(source), allow_stretch=True)) self.add_widget(GameTile(source='images/{}.png'.format(source)))
class GameTile(Image):
pass
def log_system_and_game_info(): def log_system_and_game_info():

View File

@ -160,3 +160,14 @@ ScreenManager:
row_default_height: 50 row_default_height: 50
col_force_default: True col_force_default: True
col_default_width: 50 col_default_width: 50
<GameTile@Image>:
source: "images/play.png"
allow_stretch: True
canvas.after:
Color:
rgba: [0, 1, 1, 0.75]
Ellipse:
pos: self.pos
size: self.width - 5, self.height / 2