This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# parent should be a sized panel | |
sizedPanel: SizedPanel = SizedPanel(parent) | |
sizedPanel.SetSizerType('horizontal') | |
sizedPanel.SetSizerProps(expand=False, halign='right') # expand False allows aligning right | |
self._cloneButton: Button = Button(sizedPanel, label='Clone') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pygame | |
import random | |
from pygame.locals import * | |
class Player(pygame.sprite.Sprite): | |
def __init__(self): | |
super(Player, self).__init__() | |
self.surf = pygame.Surface((75, 25)) |