Working on dialog editor, on dialogs, on phone

This commit is contained in:
Vladislav Khorev committed 2026-06-05 21:17:51 +03:00
1 parent 0e27521bea
commit 8f7797789d
63 files changed
+9502 -1459

No files matched your search

+6 -9
View File
@@ -347,15 +347,15 @@ namespace ZL {
uiManager.setButtonCallback("phoneMain", [this](const std::string&) {});
uiManager.setTextButtonCallback("chat1button", [this](const std::string&) {
chatUnread_[0] = false;
openPhoneChatFromList(0, phoneChat1Root, "dialog_chat_aiperi001");
openPhoneChatFromList(0, phoneChat1Root);
});
uiManager.setTextButtonCallback("chat2button", [this](const std::string&) {
chatUnread_[1] = false;
openPhoneChatFromList(1, phoneChat2Root, "dialog_chat_parents001");
openPhoneChatFromList(1, phoneChat2Root);
});
uiManager.setTextButtonCallback("chat3button", [this](const std::string&) {
chatUnread_[2] = false;
openPhoneChatFromList(2, phoneChat3Root, "dialog_chat_news001");
openPhoneChatFromList(2, phoneChat3Root);
});
}
@@ -436,13 +436,11 @@ namespace ZL {
});
}
void MenuManager::openPhoneChatFromList(int chatIndex, std::shared_ptr<UiNode> chatRoot, const std::string& dialogueId) {
void MenuManager::openPhoneChatFromList(int chatIndex, std::shared_ptr<UiNode> chatRoot) {
activeChatIndex_ = chatIndex;
phoneChatVisibleBubbles_.clear();
uiManager.pushMenuFromSavedRoot(chatRoot);
const bool firstOpen = dialogueId.empty() || startedDialogues_.find(dialogueId) == startedDialogues_.end();
rebuildChatBubblesFromHistory(chatIndex);
uiManager.setButtonCallback("phoneExitButton", [this](const std::string&) {
@@ -453,9 +451,8 @@ namespace ZL {
returnToPhoneChatList();
});
if (firstOpen && startDialogueFunc && !dialogueId.empty()) {
startedDialogues_.insert(dialogueId);
startDialogueFunc(dialogueId);
if (chatOpenCallback) {
chatOpenCallback(chatIndex);
}
}