feat: add fonts

This commit is contained in:
Kristofers Solo
2024-01-04 05:57:21 +02:00
parent 3962ad4e14
commit 99f316d35a
12 changed files with 104 additions and 1 deletions

View File

@@ -1,7 +1,10 @@
from pathlib import Path
from attr import define, field
from pygame import Vector2 as Vec2
from .colors import TokyoNightNight
from .path import BASE_PATH
from .size import Size
PADDING = 20
@@ -31,9 +34,15 @@ class SideBar:
preview: Size = Size(size.width, size.height * 0.7)
@define
class Font:
family: Path = BASE_PATH / "assets" / "fonts" / "ChakraPetch" / "Regular.ttf"
size: int = 32
@define
class Window:
title = "Tetris"
title: str = "Tetris"
padding: int = PADDING
size: Size = Size(
Game().size.width + SideBar().size.width + padding * 3,
@@ -48,6 +57,7 @@ class Config:
game: Game = Game()
sidebar: SideBar = SideBar()
window: Window = Window()
font: Font = Font()
colors = TokyoNightNight()
fps: int = 60