From: Stan_Lewry Date: Fri, 23 Jul 2021 16:10:42 +0000 (+0100) Subject: button widget missed propety names X-Git-Url: https://stanlewry.com/index.cgi?a=commitdiff_plain;h=41f0df237e9d048b8c89c7de1ae91736d0684dc9;p=pyroguelike.git button widget missed propety names --- diff --git a/GUI/BasicButtonWidget.py b/GUI/BasicButtonWidget.py index d8531da..332f40f 100644 --- a/GUI/BasicButtonWidget.py +++ b/GUI/BasicButtonWidget.py @@ -1,6 +1,5 @@ import GUI.Widget as Widget import Texture -from enum import Enum import pygame import os @@ -50,7 +49,7 @@ class BasicButtonWidget(Widget.Widget): def setSurface(self, buttonState) -> None: sourceRect = (buttonState * self.screenW, 0, self.screenW, self.screenH) self.surface.blit(self.buttonImage, (0,0), sourceRect) - text = Texture.fontDict[self.textSize].render(self.text, False, self.textCol) + text = Texture.fontDictDict[self.font][self.fontSize].render(self.text, False, self.colour) textRect = text.get_rect() textOriginX = (self.screenW / 2) - (textRect.w / 2) textOriginY = (self.screenH / 2) - (textRect.h / 2)