Working on UI improvement
This commit is contained in:
1 parent
0da1ae124c
commit
80af0e61ae
43 files changed
+889
-64
No files matched your search
@@ -104,6 +104,7 @@ bool DialogueSystem::handlePointerReleased(float x, float y) {
|
||||
|
||||
if (advanceDialogue) {
|
||||
runtime.confirmAdvance();
|
||||
if (onDialogueAdvancedCallback) onDialogueAdvancedCallback();
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -143,4 +144,8 @@ void DialogueSystem::stopDialogue() {
|
||||
runtime.stop();
|
||||
}
|
||||
|
||||
void DialogueSystem::setOnDialogueAdvanced(std::function<void()> cb) {
|
||||
onDialogueAdvancedCallback = std::move(cb);
|
||||
}
|
||||
|
||||
} // namespace ZL::Dialogue
|
||||
@@ -27,6 +27,7 @@ public:
|
||||
void setOnDialogueLineStarted(std::function<void(const std::string&)> cb);
|
||||
void setOnCutsceneLineStarted(std::function<void(const std::string&)> cb);
|
||||
void setOnCutsceneFadeInComplete(std::function<void(const std::string&)> cb);
|
||||
void setOnDialogueAdvanced(std::function<void()> cb);
|
||||
void stopDialogue();
|
||||
|
||||
bool isActive() const { return runtime.isActive(); }
|
||||
@@ -39,6 +40,7 @@ private:
|
||||
DialogueDatabase database;
|
||||
DialogueRuntime runtime;
|
||||
DialogueOverlay overlay;
|
||||
std::function<void()> onDialogueAdvancedCallback;
|
||||
};
|
||||
|
||||
} // namespace ZL::Dialogue
|
||||
Reference in new issue
Block a user