Working on main menu and tutorials
This commit is contained in:
1 parent
0ed7021e90
commit
80133aa8c8
9 files changed
+43
-211
No files matched your search
+9
-3
@@ -210,7 +210,7 @@ namespace ZL
|
||||
"resources/navigation/uni_interior4_n2_lr_hall.txt",
|
||||
"resources/navigation/uni_interior4_n2_lr_tr_hall.txt",
|
||||
"resources/navigation/uni_interior3_n2_lr_tr_hall_aiperi.txt",
|
||||
"resources/navigation/uni_interior3_darklands_all_open.txt",
|
||||
"resources/navigation/uni_interior3_darklands_all_open.txt", //5
|
||||
"resources/navigation/uni_interior3_unlocked_hall.txt",
|
||||
"resources/navigation/uni_interior3_unlocked_n3.txt",
|
||||
"resources/navigation/uni_interior3_unlocked_s1.txt",
|
||||
@@ -223,9 +223,9 @@ namespace ZL
|
||||
"resources/navigation/uni_interior4_unlocked_s3_s2.txt",
|
||||
"resources/navigation/uni_interior4_unlocked_s3_s1.txt",
|
||||
"resources/navigation/uni_interior4_locked.txt" //17
|
||||
};*/
|
||||
};
|
||||
*/
|
||||
|
||||
|
||||
uniInteriorParams.navigationJsonPaths = {
|
||||
"resources/navigation/uni_interior4_unlocked_n2_new.json", //0
|
||||
"resources/navigation/uni_interior3_n2_hall.json",
|
||||
@@ -280,6 +280,10 @@ namespace ZL
|
||||
locations["uni_interior"]->requestDarklandsTransition = [this]() { return startDarklandsTransition(); };
|
||||
locations["uni_interior"]->requestAdvanceDarklandsHud = [this]() { menuManager.advanceUniIntDarklandsHud(); };
|
||||
locations["uni_interior"]->requestClosePhone = [this]() { menuManager.closePhoneEntirely(); };
|
||||
locations["uni_interior"]->requestReturnToMainMenu = [this]() {
|
||||
this->currentLocation = nullptr;
|
||||
menuManager.showMainMenu();
|
||||
};
|
||||
if (locations["uni_interior"]->player)
|
||||
locations["uni_interior"]->player->onDeathAnimComplete = [this]() { startDarklandsTransition(); };
|
||||
for (auto& npc : locations["uni_interior"]->npcs) {
|
||||
@@ -309,6 +313,7 @@ namespace ZL
|
||||
locations["uni_exterior"]->requestNightDayTransition = [this](bool isNight, bool isDawn) { this->menuManager.isNight = isNight; this->menuManager.isDawn = isDawn; };
|
||||
locations["uni_exterior"]->requestDarklandsTransition = [this]() { return startDarklandsTransition(); };
|
||||
locations["uni_exterior"]->requestClosePhone = [this]() { menuManager.closePhoneEntirely(); };
|
||||
locations["uni_exterior"]->requestReturnToMainMenu = [this]() { menuManager.showMainMenu(); };
|
||||
if (locations["uni_exterior"]->player)
|
||||
locations["uni_exterior"]->player->onDeathAnimComplete = [this]() { startDarklandsTransition(); };
|
||||
|
||||
@@ -352,6 +357,7 @@ namespace ZL
|
||||
locations["location_dorm"]->requestNightDayTransition = [this](bool isNight, bool isDawn) { this->menuManager.isNight = isNight; this->menuManager.isDawn = isDawn; };
|
||||
locations["location_dorm"]->requestDarklandsTransition = [this]() { return startDarklandsTransition(); };
|
||||
locations["location_dorm"]->requestClosePhone = [this]() { menuManager.closePhoneEntirely(); };
|
||||
locations["location_dorm"]->requestReturnToMainMenu = [this]() { menuManager.showMainMenu(); };
|
||||
if (locations["location_dorm"]->player)
|
||||
locations["location_dorm"]->player->onDeathAnimComplete = [this]() { startDarklandsTransition(); };
|
||||
|
||||
|
||||
@@ -127,6 +127,7 @@ namespace ZL
|
||||
std::cout << "Shadow map initialized" << std::endl;
|
||||
//#endif
|
||||
|
||||
|
||||
setupNavigation(params.navigationJsonPaths);
|
||||
|
||||
dialogueSystem.init(renderer, CONST_ZIP_FILE);
|
||||
|
||||
@@ -121,6 +121,7 @@ namespace ZL
|
||||
std::function<void()> requestAdvanceDarklandsHud;
|
||||
|
||||
std::function<void()> requestClosePhone;
|
||||
std::function<void()> requestReturnToMainMenu;
|
||||
|
||||
// Navigation editor — toggle with 'N', save with 'B', right-click to finalize polygon
|
||||
EditorMode editorMode = EditorMode::None;
|
||||
|
||||
@@ -370,6 +370,12 @@ namespace ZL {
|
||||
game->requestClosePhone();
|
||||
});
|
||||
|
||||
api.set_function("return_to_main_menu",
|
||||
[game]() {
|
||||
if (game->requestReturnToMainMenu)
|
||||
game->requestReturnToMainMenu();
|
||||
});
|
||||
|
||||
api.set_function("set_chat_callbacks",
|
||||
[this_impl = impl.get()](sol::object cb0, sol::object cb1, sol::object cb2) {
|
||||
if (cb0.is<sol::protected_function>()) this_impl->chatOpenCallbacks[0] = cb0.as<sol::protected_function>();
|
||||
|
||||
+12
-1
@@ -11,6 +11,8 @@ namespace ZL {
|
||||
|
||||
using json = nlohmann::json;
|
||||
|
||||
extern float x;
|
||||
|
||||
|
||||
static int countWrappedLines(const std::string& text) {
|
||||
if (text.empty()) return 0;
|
||||
@@ -2170,7 +2172,16 @@ namespace ZL {
|
||||
}
|
||||
else
|
||||
{
|
||||
node->localX = node->width * 0.5-110 - (UiChatBubble::MAX_WIDTH - node->width);// -(425.f - node->width);
|
||||
/*if (node->width == UiChatBubble::MAX_WIDTH)
|
||||
{
|
||||
node->localX = node->width * 0.5 - 110 - (UiChatBubble::MAX_WIDTH - node->width);// -(425.f - node->width);
|
||||
}
|
||||
else
|
||||
{*/
|
||||
//node->localX = node->width * 0.5 - 110;
|
||||
//node->localX = - 110 +x;
|
||||
node->localX = 210 - node->width * 0.5;
|
||||
//}
|
||||
}
|
||||
//430
|
||||
//1280
|
||||
|
||||
Reference in new issue
Block a user