fix: 装备属性面板避让逻辑 + 多项功能更新

- item_tooltip_view.gd: 新增 avoid_rect 属性,tooltip 与装备窗口重叠时自动推到左侧
- inventory_ui.gd: 悬停装备时传入窗口矩形作为避让区域
- 包含其他累积的功能开发和测试文件
This commit is contained in:
shen
2026-09-21 16:38:59 -07:00
parent 1522a8a1a1
commit c93894313a
5498 changed files with 4558004 additions and 1442 deletions
+29
View File
@@ -33,6 +33,35 @@ func _run() -> void:
_ck(camera.camera_mode == GameCamera.CameraMode.NORMAL, "starts in NORMAL mode")
_ck(is_equal_approx(camera.dist, 15.5), "default distance is 1550cm")
_ck(is_equal_approx(camera.pitch, deg_to_rad(27.0)), "default pitch is 27 degrees")
_ck(is_equal_approx(camera._look_target().y, actor.position.y + 1.2065217),
"target height follows CameraProcedure distance interpolation")
var wheel := InputEventMouseButton.new()
wheel.button_index = MOUSE_BUTTON_WHEEL_UP
wheel.factor = 1.0
wheel.pressed = true
var before_wheel: float = camera.dist
camera._unhandled_input(wheel)
camera._process(1.0 / 60.0)
_ck(camera.dist < before_wheel, "wheel up zooms in")
var after_first_wheel: float = camera.dist
camera._process(1.0 / 60.0)
_ck(camera.dist < after_first_wheel, "wheel zoom uses damped velocity")
camera._wheel_zoom_velocity_cm = 0.0
camera.dist = 10.0
camera.set_key_zoom(1)
camera._process(1.0 / 60.0)
camera.set_key_zoom(0)
_ck(is_equal_approx(camera.dist, 10.5),
"keyboard zoom applies the 40250 0.05 ratio")
camera.dist = camera.min_dist
_ck(is_equal_approx(camera._look_target().y, actor.position.y + 1.5),
"target height reaches face height at minimum distance")
camera.dist = camera.max_dist
_ck(is_equal_approx(camera._look_target().y, actor.position.y + 1.0),
"target height reaches standard height at maximum distance")
camera.dist = 15.5
var shot := {"x": 1000, "y": 2000, "z": 300, "distance": 500, "pitch": 40, "rot": 90,
"up": 0, "view": 0, "cross": 0}