This commit is contained in:
@@ -18,6 +18,8 @@ namespace game::state
|
||||
{
|
||||
World::Focus Main::focus_get()
|
||||
{
|
||||
if (!isWindows) return World::CENTER;
|
||||
|
||||
return menu.isOpen && tools.isOpen ? World::MENU_TOOLS
|
||||
: menu.isOpen ? World::MENU
|
||||
: tools.isOpen ? World::TOOLS
|
||||
@@ -84,26 +86,28 @@ namespace game::state
|
||||
text.entry = nullptr;
|
||||
text.isEnabled = false;
|
||||
|
||||
if (auto font = character.data.menuSchema.font.get()) ImGui::GetIO().FontDefault = font;
|
||||
|
||||
if (game == NEW_GAME && dialogue.start.is_valid())
|
||||
{
|
||||
character.queue_play({.animation = dialogue.start.animation, .isInterruptible = false});
|
||||
character.tick();
|
||||
isWindows = false;
|
||||
isStart = true;
|
||||
}
|
||||
|
||||
isPostgame = saveData.isPostgame;
|
||||
|
||||
if (isPostgame)
|
||||
menu.isCheats = true;
|
||||
else
|
||||
menu.isCheats = true; //false;
|
||||
menu.isCheats = false;
|
||||
|
||||
if (game == NEW_GAME) isWindows = false;
|
||||
|
||||
if (auto font = character.data.menuSchema.font.get()) ImGui::GetIO().FontDefault = font;
|
||||
|
||||
character.play_default_animation();
|
||||
character.tick();
|
||||
worldCanvas.size_set(imgui::to_vec2(ImGui::GetMainViewport()->Size));
|
||||
|
||||
world.set(character, worldCanvas, focus_get());
|
||||
|
||||
if (game == NEW_GAME && dialogue.start.is_valid())
|
||||
{
|
||||
character.queue_play({.animation = dialogue.start.animation, .isInterruptible = false});
|
||||
character.tick();
|
||||
isStart = true;
|
||||
}
|
||||
}
|
||||
|
||||
void Main::exit(Resources& resources)
|
||||
|
||||
@@ -91,11 +91,13 @@ namespace game::state::main
|
||||
ImGui::EndTabItem();
|
||||
}
|
||||
|
||||
if (isDebug && WIDGET_FX(ImGui::BeginTabItem("Debug")))
|
||||
#if defined(DEBUG) && DEBUG
|
||||
if (WIDGET_FX(ImGui::BeginTabItem("Debug")))
|
||||
{
|
||||
debug.update(character, cursor, itemManager, canvas);
|
||||
ImGui::EndTabItem();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
ImGui::EndTabBar();
|
||||
}
|
||||
|
||||
@@ -28,7 +28,6 @@ namespace game::state::main
|
||||
state::Configuration configuration;
|
||||
|
||||
bool isCheats{true};
|
||||
bool isDebug{true};
|
||||
bool isOpen{true};
|
||||
bool isChat{true};
|
||||
util::imgui::WindowSlide slide{};
|
||||
|
||||
@@ -13,7 +13,6 @@ namespace game::state::main
|
||||
void World::set(entity::Character& character, Canvas& canvas, Focus focus)
|
||||
{
|
||||
character.stage = character.stage_get();
|
||||
character.queue_idle_animation();
|
||||
character_focus(character, canvas, focus);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user