Difficult-Rocket/mods/dr_game/game_layout.py

38 lines
1021 B
Python
Raw Normal View History

2024-06-07 14:34:16 +08:00
# -------------------------------
# Difficult Rocket
# Copyright © 2020-2023 by shenjackyuanjie 3695888@qq.com
# All rights reserved
# -------------------------------
from typing import Optional, Tuple
from pyglet.graphics import Batch, Group
from Difficult_Rocket.client import ClientWindow
from Difficult_Rocket.api.screen import BaseScreen
# from Difficult_Rocket.main import Game
from Difficult_Rocket.gui.widget.button import (
PressTextButton,
MinecraftWikiButtonTheme,
)
from lib_not_dr import loggers
# from . import DR_mod_runtime
logger = loggers.config.get_logger_from_old("client.dr_game_layout", "client")
class GameLayout(BaseScreen):
"""
DR game 菜单
"""
2024-06-09 17:26:48 +08:00
name = "DR_game_layout"
2024-06-07 14:34:16 +08:00
def __init__(self, main_window: ClientWindow):
super().__init__(main_window)
self.main_batch = Batch()
self.main_group = Group(parent=main_window.main_group, order=1)
def on_draw(self, dt: float, window: ClientWindow):
self.main_batch.draw()