Working on messenger
This commit is contained in:
1 parent
9221ab68ac
commit
1fc8120ee0
25 files changed
+445
-259
No files matched your search
+14
-2
@@ -58,7 +58,6 @@ namespace ZL {
|
||||
|
||||
void openPhoneScreen();
|
||||
void closePhoneScreen();
|
||||
void revealPhoneChatBubble(const std::string& slotName);
|
||||
bool isPhoneScreenOpen() const { return state == GameState::PhoneScreen; }
|
||||
void closePhoneEntirely();
|
||||
|
||||
@@ -71,6 +70,9 @@ namespace ZL {
|
||||
std::function<void()> startDarklandsTransitionFunc;
|
||||
std::function<void()> startNightTransitionFunc;
|
||||
|
||||
// Called when a chat message bubble should be shown (text + direction)
|
||||
void onChatBubbleReady(const std::string& text, bool incoming);
|
||||
|
||||
void setDarklandsMode(bool enabled);
|
||||
void advanceTutorialStep();
|
||||
void onItemPickedUp(const std::string& itemId);
|
||||
@@ -102,10 +104,11 @@ namespace ZL {
|
||||
void refreshChatUnreadIndicators();
|
||||
void resetPhoneChatNodes();
|
||||
void recomputePhoneChatPositions();
|
||||
void openPhoneChatFromList(std::shared_ptr<UiNode> chatRoot, const std::string& dialogueId);
|
||||
void openPhoneChatFromList(int chatIndex, std::shared_ptr<UiNode> chatRoot, const std::string& dialogueId);
|
||||
void returnToPhoneChatList();
|
||||
void closePhoneScreenFromChat();
|
||||
void applyUniIntHud();
|
||||
void rebuildChatBubblesFromHistory(int chatIndex);
|
||||
|
||||
GameState state = GameState::Gameplay;
|
||||
Inventory* inventory = nullptr;
|
||||
@@ -176,6 +179,15 @@ namespace ZL {
|
||||
};
|
||||
std::vector<PhoneChatBubbleInfo> phoneChatVisibleBubbles_;
|
||||
|
||||
// Per-chat message history (max 5 messages each)
|
||||
struct StoredChatMessage { std::string text; bool incoming; };
|
||||
std::vector<StoredChatMessage> chatHistory_[3];
|
||||
int activeChatIndex_ = -1;
|
||||
|
||||
// Preloaded bubble textures
|
||||
std::shared_ptr<Texture> texBubbleInCenter_, texBubbleInLT_, texBubbleInLB_, texBubbleInRT_, texBubbleInRB_;
|
||||
std::shared_ptr<Texture> texBubbleOutCenter_, texBubbleOutLT_, texBubbleOutLB_, texBubbleOutRT_, texBubbleOutRB_;
|
||||
|
||||
static constexpr float CHAT_TOP_Y = 610.0f;
|
||||
static constexpr float CHAT_BOTTOM_Y = 290.0f;
|
||||
static constexpr float CHAT_SPACING = 10.0f;
|
||||
|
||||
Reference in new issue
Block a user