Skip to content

Instantly share code, notes, and snippets.

View hasii2011's full-sized avatar
💭
Checkins galore

Humberto A Sanchez II hasii2011

💭
Checkins galore
View GitHub Profile
@hasii2011
hasii2011 / gist:23409853ab84aafe2ec1c598a73d6790
Last active January 16, 2023 16:35
wxPython Right Align Button in SizedPanel
# 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')
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))