WMICraft/ui/logs.py
2022-03-11 19:42:17 +01:00

26 lines
870 B
Python

import pygame
from common.colors import FONT_DARK, ORANGE, WHITE
from common.constants import COLUMNS, GRID_CELL_PADDING, GRID_CELL_WIDTH, BORDER_WIDTH, BORDER_RADIUS
from common.helpers import draw_text
class Logs:
def __init__(self):
self.grid = []
def draw(self, screen):
x = (GRID_CELL_PADDING + GRID_CELL_WIDTH) * COLUMNS + BORDER_WIDTH + 15
y = 470
# background
pygame.draw.rect(screen, WHITE, pygame.Rect(x, y, 340, 323), 0, BORDER_RADIUS)
# title
draw_text('LOGS', FONT_DARK, screen, x + 120, y + 10, 36)
pygame.draw.rect(screen, ORANGE, pygame.Rect(x, y + 65, 340, 3))
# texts
draw_text('AI Blue: Zniszczyła fortecę (4, 8).', FONT_DARK, screen, x + 35, y + 90, 16)
draw_text('AI Red: Zniszczyła fortecę (12, 5).', FONT_DARK, screen, x + 35, y + 120, 16)