Working on UI improvement

This commit is contained in:
Vladislav Khorev committed 2026-05-27 17:30:41 +03:00
1 parent 0da1ae124c
commit 80af0e61ae
43 files changed
+889 -64

No files matched your search

+38 -1
View File
@@ -16,7 +16,18 @@ namespace ZL {
enum class GameState {
Gameplay,
Inventory,
QuestJournal
QuestJournal,
PhoneScreen,
JournalScreen
};
enum class TutorialStep {
Step0, // Dialogue hint: "click to advance"
Step1, // Camera rotation hint
Step2, // Floor tap / walk hint
Step3, // Pinch-zoom hint
Step4, // Pick-up item hint
Step5, // Post-pickup reaction (sub-state: which items were collected)
};
class MenuManager {
@@ -38,6 +49,16 @@ namespace ZL {
bool isInventoryOpen() const { return state == GameState::Inventory; }
bool isQuestJournalOpen() const { return state == GameState::QuestJournal; }
void openPhoneScreen();
void closePhoneScreen();
void openJournalScreen();
void closeJournalScreen();
void advanceTutorialStep();
void onItemPickedUp(const std::string& itemId);
TutorialStep tutorialStep = TutorialStep::Step0;
protected:
Renderer& renderer;
@@ -45,11 +66,27 @@ namespace ZL {
void enterGameplay();
void refreshQuestJournalUi();
void selectQuestByIndex(int index);
void refreshItemPickupHud();
void setupStep5Callbacks();
GameState state = GameState::Gameplay;
Inventory* inventory = nullptr;
bool tutorialPhonePickedUp = false;
bool tutorialJournalPickedUp = false;
bool tutorialPhoneScreenOpened = false;
bool tutorialJournalScreenOpened = false;
std::shared_ptr<UiNode> hudRoot;
std::shared_ptr<UiNode> hudStep1Root;
std::shared_ptr<UiNode> hudStep2Root;
std::shared_ptr<UiNode> hudStep3Root;
std::shared_ptr<UiNode> hudStep4Root;
std::shared_ptr<UiNode> hudStep5aRoot;
std::shared_ptr<UiNode> hudStep5bRoot;
std::shared_ptr<UiNode> hudStep5abRoot;
std::shared_ptr<UiNode> phoneScreenRoot;
std::shared_ptr<UiNode> journalScreenRoot;
std::shared_ptr<UiNode> inventoryRoot;
std::shared_ptr<UiNode> questJournalRoot;