Compare commits
No commits in common. "ccb1c76baf8952f93456e3b66099713819bd2a11" and "159a717bd0dbee7c53b0f59a4ef0390f08702678" have entirely different histories.
ccb1c76baf
...
159a717bd0
@ -24,8 +24,6 @@ class BaseScreen(EventDispatcher):
|
||||
DR 的 页面API
|
||||
"""
|
||||
|
||||
screen_name: str = 'BaseScreen'
|
||||
|
||||
def __init__(self, main_window: ClientWindow):
|
||||
super().__init__()
|
||||
self.focus = False
|
||||
|
@ -132,5 +132,11 @@ class PressTextButton(widgets.WidgetBase):
|
||||
self.back_rec.height = self._height
|
||||
...
|
||||
|
||||
def on_press(self, x, y):
|
||||
# import random
|
||||
self.value += "1"
|
||||
# next_rgb = [random.randint(50, 255) for _ in range(3)]
|
||||
# self.untouched_color = (*next_rgb, 255)
|
||||
|
||||
|
||||
PressTextButton.register_event_type('on_press')
|
||||
|
@ -1,24 +0,0 @@
|
||||
# -------------------------------
|
||||
# Difficult Rocket
|
||||
# Copyright © 2020-2023 by shenjackyuanjie 3695888@qq.com
|
||||
# All rights reserved
|
||||
# -------------------------------
|
||||
|
||||
from Difficult_Rocket.client import ClientWindow
|
||||
from Difficult_Rocket.api.screen import BaseScreen
|
||||
|
||||
# from . import DR_mod_runtime
|
||||
|
||||
|
||||
class Menu(BaseScreen):
|
||||
"""
|
||||
DR game 的 菜单
|
||||
"""
|
||||
name = 'DR_game_menu'
|
||||
|
||||
def __init__(self,
|
||||
main_window: ClientWindow):
|
||||
super().__init__(main_window)
|
||||
# 占位, 高二看看能不能咕出来点啥 (20230911)
|
||||
# 欸呀, 正好是 911 纪念日哦
|
||||
|
@ -10,7 +10,7 @@ import logging
|
||||
import traceback
|
||||
|
||||
from pathlib import Path
|
||||
from typing import List, Dict, Optional, Generator, Tuple
|
||||
from typing import List, TYPE_CHECKING, Dict, Optional, Generator, Tuple
|
||||
|
||||
from pyglet.gl import gl
|
||||
from pyglet.math import Mat4
|
||||
@ -66,8 +66,6 @@ class SR1ShipRenderStatus(Options): # NOQA
|
||||
class SR1ShipRender(BaseScreen):
|
||||
"""用于渲染 sr1 船的类"""
|
||||
|
||||
screen_name = 'DR_game_sr1_ship_render'
|
||||
|
||||
def __init__(self,
|
||||
main_window: ClientWindow):
|
||||
super().__init__(main_window)
|
||||
@ -283,9 +281,8 @@ class SR1ShipRender(BaseScreen):
|
||||
def draw_batch(self, window: ClientWindow):
|
||||
if self.status.draw_done:
|
||||
self.render_d_label.text = f'x: {self.group_camera.view_x} y: {self.group_camera.view_y}'
|
||||
self.render_d_label.position = self.group_camera.view_x + (
|
||||
self.window_pointer.width / 2), self.group_camera.view_y + (
|
||||
self.window_pointer.height / 2) + 10, 0 # 0 for z
|
||||
self.render_d_label.position = self.group_camera.view_x + (self.window_pointer.width / 2), self.group_camera.view_y + (
|
||||
self.window_pointer.height / 2) + 10, 0 # 0 for z
|
||||
self.render_d_line.x2 = self.group_camera.view_x
|
||||
self.render_d_line.y2 = self.group_camera.view_y
|
||||
|
||||
@ -487,6 +484,7 @@ class SR1ShipRender(BaseScreen):
|
||||
self.window_pointer.view = value
|
||||
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
from objprint import op
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user