fix: 装备属性面板避让逻辑 + 多项功能更新
- item_tooltip_view.gd: 新增 avoid_rect 属性,tooltip 与装备窗口重叠时自动推到左侧 - inventory_ui.gd: 悬停装备时传入窗口矩形作为避让区域 - 包含其他累积的功能开发和测试文件
This commit is contained in:
+21
-2
@@ -84,8 +84,24 @@ func _run() -> void:
|
||||
chat._on_whisper(0, "Alice", "secret")
|
||||
_ck(_last(tWhisper).contains("Alice: secret"), "whisper -> Whisper tab")
|
||||
_ck(_last(tAll).contains("Alice: secret"), "whisper -> All tab")
|
||||
chat._on_whisper(1, "", "server notice")
|
||||
_ck(_last(tWhisper).contains("[系统]: server notice"), "system whisper -> [系统]")
|
||||
var alice_conv = chat.whisper_system().conversations.get("Alice", null)
|
||||
_ck(alice_conv != null and alice_conv.history.size() == 1 and alice_conv.history[0].content == "secret",
|
||||
"live whisper signal -> one independent Alice conversation")
|
||||
chat._on_whisper(5, "Admin", "server notice")
|
||||
_ck(_last(tWhisper).contains("[GM] Admin: server notice"), "GM whisper mode 5 -> [GM]")
|
||||
var gm_conv = chat.whisper_system().conversations.get("Admin", null)
|
||||
_ck(gm_conv != null and gm_conv.is_gamemaster and gm_conv.history.size() == 1,
|
||||
"live GM whisper signal -> GM conversation state")
|
||||
chat._on_whisper(255, "", "system notice")
|
||||
_ck(_last(tWhisper).contains("[系统]: system notice"), "system whisper mode 0xff -> [系统]")
|
||||
chat._on_whisper(1, "Offline", "")
|
||||
_ck(_last(tWhisper).contains("[系统]: 无法私聊:Offline 不在线。"),
|
||||
"whisper error mode 1 -> localized system fallback")
|
||||
chat.toggle_whisper_ignore("Muted")
|
||||
var muted_before := tWhisper.get_parsed_text()
|
||||
chat._on_whisper(0, "Muted", "should be hidden")
|
||||
_ck(tWhisper.get_parsed_text() == muted_before,
|
||||
"ignored live whisper does not enter UI or conversation")
|
||||
|
||||
# 拾取 -> 系统 + 战斗
|
||||
fc.item_picked_up.emit(27, 3, "")
|
||||
@@ -113,6 +129,9 @@ func _run() -> void:
|
||||
chat._on_submit("/w Bob psst hey")
|
||||
_ck(fc.whispered.size() == 1 and fc.whispered[0] == ["Bob", "psst hey"], "/w Bob ... -> whisper('Bob','psst hey')")
|
||||
_ck(_last(tWhisper).contains("→ Bob: psst hey"), "/w -> local echo in Whisper tab")
|
||||
var bob_conv = chat.whisper_system().conversations.get("Bob", null)
|
||||
_ck(bob_conv != null and bob_conv.history.size() == 1 and bob_conv.history[0].sender == "Hero",
|
||||
"/w shortcut -> same independent conversation history")
|
||||
# game.py OpenWhisperDialog:目标框独立于公共聊天输入行,回车发送后关闭。
|
||||
chat.start_whisper("Carol")
|
||||
_ck(chat.is_whisper_open() and chat.whisper_target() == "Carol",
|
||||
|
||||
Reference in New Issue
Block a user