2024-01-15 00:17:54 +08:00
|
|
|
# DR SDK 0.9.x 更新日志
|
2023-12-16 23:40:38 +08:00
|
|
|
|
2024-08-04 01:56:21 +08:00
|
|
|
## DR sdk 0.9.2.0 + api 0.1.2.3
|
|
|
|
|
|
|
|
哇噻, 好大一个更新啊(战术后仰)
|
|
|
|
|
|
|
|
### Add
|
|
|
|
|
|
|
|
- 正式添加了 `Difficult_Rocket.gui.widget.button.OreuiButton` 类
|
|
|
|
- 第一个 基于 Oreui 风格的 widget 啦!
|
|
|
|
- dr game 的 按钮都会用它!
|
|
|
|
- 所以去掉了之前那一堆 `Button` 类
|
|
|
|
- `MinecraftWikiButton` 之类的东西
|
|
|
|
- 同时添加了一些相关内容
|
|
|
|
- 比如 `OreuiButtonStyles` 和 `OreuiShapeColors`
|
|
|
|
- 前者提供了一些预设的颜色可以用
|
|
|
|
- 后者是用来存颜色的类
|
|
|
|
- 还有 `OreuiButtonStatus` 和 `OreuiButtonShape`
|
|
|
|
- 前者用于存储按钮的状态
|
|
|
|
- 后者就是按钮的形状了
|
|
|
|
- 我告诉你, 这玩意写了我一整天 o((>ω< ))o
|
|
|
|
- `ClientWindow` 添加了 `add_sub_screen_without_name` 方法
|
|
|
|
- 实际上你添加 Screen 的时候, 你完全可以用自带的 `Screen.name` 属性来作为 key
|
|
|
|
- (前提是你保证不会重复添加同一个 Screen)
|
|
|
|
- 感觉有点真的在写东西的味道了
|
|
|
|
|
|
|
|
### Change
|
|
|
|
|
|
|
|
- 修改了 `on_draw` 相关函数的定义
|
|
|
|
- 这玩意还得改, 等等再说吧, 反正 dt 大概率没了
|
|
|
|
- 添加了不少 type hint
|
|
|
|
- 我终于还是用上了 `from __future__ import annotations`
|
|
|
|
- 这玩意真好使
|
|
|
|
- 我爱 3.10+ 的 type hint
|
2024-08-04 02:25:05 +08:00
|
|
|
- 反正全给他换成新的 typing
|
2024-08-04 01:56:21 +08:00
|
|
|
|
2024-05-26 13:51:38 +08:00
|
|
|
## DR sdk 0.9.1.0
|
2024-01-15 00:17:54 +08:00
|
|
|
|
|
|
|
### Dependency
|
|
|
|
|
|
|
|
- 去掉了 `tomlkit`, 改为 `tomli_w`
|
|
|
|
- 真好用
|
|
|
|
- Remove `tomlkit`, change to `tomli_w`
|
|
|
|
|
2024-05-26 13:18:21 +08:00
|
|
|
### Change
|
|
|
|
|
|
|
|
- 为 `ClientWindow` 的 `remove_sub_screen` 方法添加了返回值
|
|
|
|
- 现在他会返回被去掉的 `BaseScreen` 实例
|
|
|
|
- 为各种 `Camera` 的 值都提供了默认值
|
|
|
|
|
2024-01-15 00:17:54 +08:00
|
|
|
## DR sdk 0.9.0.0
|
|
|
|
|
|
|
|
### Changes
|
2023-12-16 23:40:38 +08:00
|
|
|
|
|
|
|
- `api.screen.BaseScreen`
|
|
|
|
- `on_draw`
|
|
|
|
- `self, window: ClientWindow` -> `self, dt: float, window: ClientWindow`
|
|
|
|
- `dt` 为上一帧到这一帧的时间间隔
|
|
|
|
- `dt` is the time interval from the last frame to this frame
|
|
|
|
|
2024-01-15 00:17:54 +08:00
|
|
|
### Rename
|
2023-12-16 23:40:38 +08:00
|
|
|
|
|
|
|
- `Api_version` -> `api_version`
|
|
|
|
- `_DR_Status` -> `_DRStatus`
|
|
|
|
- `name` = `DR Option` -> `DR Status`
|
|
|
|
- 这毛病属实是没想到, 之前一直没发现
|
|
|
|
|
2024-01-15 00:17:54 +08:00
|
|
|
### Rework
|
2023-12-16 23:40:38 +08:00
|
|
|
|
|
|
|
- 将 `logging` 的依赖改为 `lib_not_dr.loggers`
|
|
|
|
- 以后都用 `lib_not_dr` 的 logger 了
|
|
|
|
- Change the dependency of `logging` to `lib_not_dr.loggers`
|
|
|
|
- Use `lib_not_dr` logger in the future
|
|
|
|
|
2024-01-15 00:17:54 +08:00
|
|
|
### Add
|
2023-12-16 23:40:38 +08:00
|
|
|
|
|
|
|
- 添加内置依赖: `lib-not-dr`
|
|
|
|
- Added built-in dependency: `lib-not-dr`
|
|
|
|
- 不再同时维护两份代码
|
|
|
|
- No longer maintain two sets of code at the same time
|
|
|
|
|
2024-01-15 00:17:54 +08:00
|
|
|
### Fix
|
2023-12-16 23:40:38 +08:00
|
|
|
|
|
|
|
- 如果没有 DR_game 的情况下, 退出时会 join 控制台线程
|
|
|
|
- 通过检测线程是否是守护线程来判断是否 join
|
|
|
|
- If there is no DR_game, join the console thread when exiting
|
|
|
|
- Determine whether to join by detecting whether the thread is a daemon thread
|
|
|
|
|
2024-01-15 00:17:54 +08:00
|
|
|
### Dependency
|
2023-12-16 23:40:38 +08:00
|
|
|
|
|
|
|
- 更新了所有的依赖版本号
|
|
|
|
- 去看 `requirements.txt` 吧
|
|
|
|
- Updated all dependency version numbers
|
|
|
|
- Go see `requirements.txt`
|
2023-12-31 02:54:26 +08:00
|
|
|
- 去除了 `rtoml` 的依赖
|
|
|
|
- 改为 `tomli` 和 `tomlkit` 组合
|
|
|
|
- Removed `rtoml` dependency
|
|
|
|
- Change to `tomli` and `tomlkit` combination
|
|
|
|
- 删除了 `requirement-xxx.txt`
|
|
|
|
- 现在使用 `gen_require.py 0/1/2` 来先生成然后安装依赖
|
|
|
|
- > python gen_require.py 0 ( 运行 / run only )
|
|
|
|
- > python gen_require.py 1 ( 构建 / build )
|
|
|
|
- > python gen_require.py 2 ( 开发 / develop )
|
|
|
|
- `gen_require.py` 会在 `requirements.txt` 中生成依赖
|
|
|
|
- Delete `requirement-xxx.txt`
|
|
|
|
- Now use `gen_require.py 0/1/2` to generate and install dependencies
|
|
|
|
- > python gen_require.py 0 ( run only )
|
|
|
|
- > python gen_require.py 1 ( build )
|
|
|
|
- > python gen_require.py 2 ( develop )
|
|
|
|
- `gen_require.py` will generate dependencies in `requirements.txt`
|