| 12345678910111213141516171819202122 |
- import os
- import pygame
- import pygame.freetype as freetype
- from client_local.ui.ui import UIInstance
- Current_Path = os.getcwd()
- FONT_PATH = Current_Path + r"\res\font\simsun.ttc"
- # FONT_PATH = Current_Path + r"\res\font\hk4e_zh-cn.ttf"
- # FONT_PATH = Current_Path + r"\res\font\SourceHanSerif-VF.ttc"
- # FONT_PATH = "Arial"
- class GameTop(UIInstance):
- def __init__(self):
- super().__init__("game", "gameTop")
- self.font = pygame.font.Font(FONT_PATH, 16)
- self.rend = self.font.render("v20260405", True, (0, 196, 255))
- def draw(self, screen: pygame.Surface):
- super().draw(screen)
- screen.blit(self.rend, (0, 0))
|