Difficult-Rocket/Difficult_Rocket/client/guis/label.py

26 lines
609 B
Python
Raw Normal View History

2021-12-26 23:06:03 +08:00
# -------------------------------
# Difficult Rocket
2022-06-27 16:51:14 +08:00
# Copyright © 2021-2022 by shenjackyuanjie 3695888@qq.com
2021-12-26 23:06:03 +08:00
# All rights reserved
# -------------------------------
"""
writen by shenjackyuanjie
mail: 3695888@qq.com
github: @shenjackyuanjie
gitee: @shenjackyuanjie
"""
2022-10-29 19:13:00 +08:00
from pyglet.text import DocumentLabel
2021-12-26 23:06:03 +08:00
class FontsLabel(DocumentLabel):
"""
一个基于HTMLLabel的 可以同时在一行字里面显示多种字体的 Label
"""
def __init__(self, x, y, width, height):
super().__init__(x, y, width, height)
self._text = 'a'
self.formatted_text = 'a'