From 313ffcee9ec18ca928b40c3285b81f95853e0f75 Mon Sep 17 00:00:00 2001 From: scribam Date: Mon, 2 Sep 2024 13:46:17 +0200 Subject: [PATCH] imgui: ImGuiChildFlags_Border migration --- vita3k/gui/src/app_context_menu.cpp | 4 ++-- vita3k/gui/src/archive_install_dialog.cpp | 4 ++-- vita3k/gui/src/common_dialog.cpp | 6 +++--- vita3k/gui/src/content_manager.cpp | 4 ++-- vita3k/gui/src/gui.cpp | 2 +- vita3k/gui/src/home_screen.cpp | 4 ++-- vita3k/gui/src/ime.cpp | 2 +- vita3k/gui/src/information_bar.cpp | 2 +- vita3k/gui/src/initial_setup.cpp | 4 ++-- vita3k/gui/src/license_install_dialog.cpp | 2 +- vita3k/gui/src/live_area.cpp | 2 +- vita3k/gui/src/manual.cpp | 4 ++-- vita3k/gui/src/perf_overlay.cpp | 2 +- vita3k/gui/src/settings.cpp | 4 ++-- vita3k/gui/src/trophy_collection.cpp | 4 ++-- vita3k/gui/src/user_management.cpp | 4 ++-- vita3k/gui/src/vita3k_update.cpp | 2 +- 17 files changed, 28 insertions(+), 28 deletions(-) diff --git a/vita3k/gui/src/app_context_menu.cpp b/vita3k/gui/src/app_context_menu.cpp index c93e20ee29..7d5c1830ec 100644 --- a/vita3k/gui/src/app_context_menu.cpp +++ b/vita3k/gui/src/app_context_menu.cpp @@ -545,12 +545,12 @@ void draw_app_context_menu(GuiState &gui, EmuEnvState &emuenv, const std::string ImGui::SetNextWindowBgAlpha(0.999f); ImGui::SetNextWindowPos(ImVec2(emuenv.viewport_pos.x + (display_size.x / 2.f) - (WINDOW_SIZE.x / 2.f), emuenv.viewport_pos.y + (display_size.y / 2.f) - (WINDOW_SIZE.y / 2.f)), ImGuiCond_Always); ImGui::PushStyleVar(ImGuiStyleVar_ChildRounding, 10.f * SCALE.x); - ImGui::BeginChild("##context_dialog_child", WINDOW_SIZE, true, ImGuiWindowFlags_NoDecoration | ImGuiWindowFlags_NoSavedSettings); + ImGui::BeginChild("##context_dialog_child", WINDOW_SIZE, ImGuiChildFlags_Border, ImGuiWindowFlags_NoDecoration | ImGuiWindowFlags_NoSavedSettings); ImGui::PushStyleVar(ImGuiStyleVar_FrameRounding, 10.f * SCALE.x); // Update History if (context_dialog == "history") { ImGui::SetNextWindowPos(ImVec2(ImGui::GetWindowPos().x + 20.f * SCALE.x, ImGui::GetWindowPos().y + BUTTON_SIZE.y)); - ImGui::BeginChild("##info_update_list", ImVec2(WINDOW_SIZE.x - (30.f * SCALE.x), WINDOW_SIZE.y - (BUTTON_SIZE.y * 2.f) - (25.f * SCALE.y)), false, ImGuiWindowFlags_NoBackground | ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoCollapse | ImGuiWindowFlags_NoSavedSettings); + ImGui::BeginChild("##info_update_list", ImVec2(WINDOW_SIZE.x - (30.f * SCALE.x), WINDOW_SIZE.y - (BUTTON_SIZE.y * 2.f) - (25.f * SCALE.y)), ImGuiChildFlags_None, ImGuiWindowFlags_NoBackground | ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoCollapse | ImGuiWindowFlags_NoSavedSettings); for (const auto &update : update_history_infos) { ImGui::SetWindowFontScale(1.4f); const auto version_str = fmt::format(fmt::runtime(lang.main["history_version"].c_str()), update.first); diff --git a/vita3k/gui/src/archive_install_dialog.cpp b/vita3k/gui/src/archive_install_dialog.cpp index 0f9a159e49..58315b343a 100644 --- a/vita3k/gui/src/archive_install_dialog.cpp +++ b/vita3k/gui/src/archive_install_dialog.cpp @@ -80,7 +80,7 @@ void draw_archive_install_dialog(GuiState &gui, EmuEnvState &emuenv) { ImGui::Begin("archive_install", &gui.file_menu.archive_install_dialog, ImGuiWindowFlags_NoBackground | ImGuiWindowFlags_NoDecoration | ImGuiWindowFlags_NoSavedSettings); ImGui::SetNextWindowPos(ImVec2(emuenv.viewport_pos.x + (display_size.x / 2.f) - (WINDOW_SIZE.x / 2.f), emuenv.viewport_pos.y + (display_size.y / 2.f) - (WINDOW_SIZE.y / 2.f)), ImGuiCond_Always); ImGui::PushStyleVar(ImGuiStyleVar_ChildRounding, 10.f * SCALE.x); - ImGui::BeginChild("##archive_Install_child", WINDOW_SIZE, true, ImGuiWindowFlags_AlwaysAutoResize | ImGuiWindowFlags_NoDecoration | ImGuiWindowFlags_NoSavedSettings); + ImGui::BeginChild("##archive_Install_child", WINDOW_SIZE, ImGuiChildFlags_Border | ImGuiChildFlags_AlwaysAutoResize | ImGuiChildFlags_AutoResizeX | ImGuiChildFlags_AutoResizeY, ImGuiWindowFlags_NoDecoration | ImGuiWindowFlags_NoSavedSettings); const auto POS_BUTTON = (ImGui::GetWindowWidth() / 2.f) - (BUTTON_SIZE.x / 2.f) + (10.f * SCALE.x); ImGui::SetWindowFontScale(RES_SCALE.x); ImGui::SetCursorPosX((WINDOW_SIZE.x / 2.f) - (ImGui::CalcTextSize(title.c_str()).x / 2.f)); @@ -192,7 +192,7 @@ void draw_archive_install_dialog(GuiState &gui, EmuEnvState &emuenv) { title = indicator["install_complete"]; ImGui::SetNextWindowPos(ImVec2(ImGui::GetWindowPos().x + (5.f * SCALE.x), ImGui::GetWindowPos().y + BUTTON_SIZE.y)); ImGui::PushStyleVar(ImGuiStyleVar_ChildBorderSize, 0.f); - ImGui::BeginChild("##content_installed_list", ImVec2(WINDOW_SIZE.x - (10.f * SCALE.x), WINDOW_SIZE.y - (BUTTON_SIZE.y * 2.f) - (25 * SCALE.y)), false, ImGuiWindowFlags_NoBackground | ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoCollapse | ImGuiWindowFlags_NoSavedSettings); + ImGui::BeginChild("##content_installed_list", ImVec2(WINDOW_SIZE.x - (10.f * SCALE.x), WINDOW_SIZE.y - (BUTTON_SIZE.y * 2.f) - (25 * SCALE.y)), ImGuiChildFlags_None, ImGuiWindowFlags_NoBackground | ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoCollapse | ImGuiWindowFlags_NoSavedSettings); if (!contents_archives.empty()) { const auto count_content_state = [&](const fs::path &path, const bool state) { return std::count_if(contents_archives[path].begin(), contents_archives[path].end(), [&](const ContentInfo &c) { diff --git a/vita3k/gui/src/common_dialog.cpp b/vita3k/gui/src/common_dialog.cpp index 019c25e8c9..0006f7fd6b 100644 --- a/vita3k/gui/src/common_dialog.cpp +++ b/vita3k/gui/src/common_dialog.cpp @@ -130,7 +130,7 @@ static void draw_trophy_setup_dialog(DialogState &common_dialog, float FONT_SCAL ImGui::PushStyleVar(ImGuiStyleVar_ChildRounding, 10.f * SCALE.x); ImGui::PushStyleVar(ImGuiStyleVar_ChildBorderSize, 0.f); ImGui::SetNextWindowPos(ImVec2(display_size.x / 2.f, display_size.y / 2.f), ImGuiCond_Always, ImVec2(0.5f, 0.5f)); - ImGui::BeginChild("##preparing_app_child", WINDOW_SIZE, false, ImGuiWindowFlags_NoDecoration | ImGuiWindowFlags_NoSavedSettings); + ImGui::BeginChild("##preparing_app_child", WINDOW_SIZE, ImGuiChildFlags_None, ImGuiWindowFlags_NoDecoration | ImGuiWindowFlags_NoSavedSettings); const auto str = common_dialog.lang.trophy["preparing_start_app"].c_str(); ImGui::SetWindowFontScale(1.2f * FONT_SCALE); const auto str_size = ImGui::CalcTextSize(str); @@ -510,7 +510,7 @@ static void draw_savedata_dialog(GuiState &gui, EmuEnvState &emuenv, float FONT_ const auto WINDOW_SIZE = ImVec2(VIEWPORT_SIZE.x, 448.f * SCALE.y); ImGui::SetCursorPos(WINDOW_POS); ImGui::SetNextWindowBgAlpha(0.f); - ImGui::BeginChild("##selectables", WINDOW_SIZE, false, flags); + ImGui::BeginChild("##selectables", WINDOW_SIZE, ImGuiChildFlags_None, flags); if (emuenv.common_dialog.savedata.draw_info_window) draw_save_info(gui, emuenv, WINDOW_SIZE, FONT_SCALE, SCALE, emuenv.common_dialog.savedata.icon_texture[emuenv.common_dialog.savedata.selected_save]); else { @@ -558,7 +558,7 @@ static void draw_savedata_dialog(GuiState &gui, EmuEnvState &emuenv, float FONT_ ImGui::SetNextWindowPos(ImVec2(VIEWPORT_POS.x + (VIEWPORT_SIZE.x / 2.f) - HALF_WINDOW_SIZE.x, VIEWPORT_POS.y + (VIEWPORT_SIZE.y / 2.f) - HALF_WINDOW_SIZE.y)); ImGui::PushStyleVar(ImGuiStyleVar_ChildRounding, 12.f * SCALE.x); ImGui::PushStyleColor(ImGuiCol_ChildBg, GUI_COMMON_DIALOG_BG); - ImGui::BeginChild("##save_data_fixed_dialog", WINDOW_SIZE, true, flags); + ImGui::BeginChild("##save_data_fixed_dialog", WINDOW_SIZE, ImGuiChildFlags_Border, flags); ImGui::SetWindowFontScale(1.2f * FONT_SCALE); const ImVec2 ICON_POS(48 * SCALE.x, 34 * SCALE.y); diff --git a/vita3k/gui/src/content_manager.cpp b/vita3k/gui/src/content_manager.cpp index 7a3863d757..a1a2861bba 100644 --- a/vita3k/gui/src/content_manager.cpp +++ b/vita3k/gui/src/content_manager.cpp @@ -311,7 +311,7 @@ void draw_content_manager(GuiState &gui, EmuEnvState &emuenv) { const auto CHILD_SIZE = menu == "info" ? SIZE_INFO : SIZE_LIST; ImGui::SetNextWindowPos(ImVec2(WINDOW_POS.x + (WINDOW_SIZE.x / 2.f) - (CHILD_SIZE.x / 2.f), WINDOW_POS.y + (menu == "info" ? 98.f : 70.0f) * SCALE.y), ImGuiCond_Always); ImGui::PushStyleVar(ImGuiStyleVar_FrameRounding, 10.f * SCALE.x); - ImGui::BeginChild("##content_manager_child", CHILD_SIZE, false, ImGuiWindowFlags_NoBackground | ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoCollapse | ImGuiWindowFlags_NoSavedSettings); + ImGui::BeginChild("##content_manager_child", CHILD_SIZE, ImGuiChildFlags_None, ImGuiWindowFlags_NoBackground | ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoCollapse | ImGuiWindowFlags_NoSavedSettings); if (menu.empty()) { title = lang.main["title"]; @@ -381,7 +381,7 @@ void draw_content_manager(GuiState &gui, EmuEnvState &emuenv) { ImGui::SetNextWindowBgAlpha(0.999f); ImGui::SetNextWindowPos(ImVec2(WINDOW_POS.x + (WINDOW_SIZE.x / 2.f) - (POPUP_SIZE.x / 2), WINDOW_POS.y + (WINDOW_SIZE.y / 2.f) - (POPUP_SIZE.y / 2)), ImGuiCond_Always); ImGui::PushStyleVar(ImGuiStyleVar_ChildRounding, 10.f * SCALE.x); - ImGui::BeginChild("##app_delete_child", POPUP_SIZE, true, ImGuiWindowFlags_NoDecoration | ImGuiWindowFlags_NoSavedSettings); + ImGui::BeginChild("##app_delete_child", POPUP_SIZE, ImGuiChildFlags_Border, ImGuiWindowFlags_NoDecoration | ImGuiWindowFlags_NoSavedSettings); ImGui::PushStyleVar(ImGuiStyleVar_FrameRounding, 10.f * SCALE.x); ImGui::SetWindowFontScale(1.6f * RES_SCALE.x); ImGui::SetCursorPos(ImVec2(52.f * SCALE.x, 80.f * SCALE.y)); diff --git a/vita3k/gui/src/gui.cpp b/vita3k/gui/src/gui.cpp index 20b0023b64..3bd1cc757f 100644 --- a/vita3k/gui/src/gui.cpp +++ b/vita3k/gui/src/gui.cpp @@ -61,7 +61,7 @@ void draw_info_message(GuiState &gui, EmuEnvState &emuenv) { ImGui::Begin("##information", nullptr, ImGuiWindowFlags_NoBackground | ImGuiWindowFlags_NoSavedSettings | ImGuiWindowFlags_NoDecoration); ImGui::SetNextWindowPos(ImVec2(emuenv.viewport_pos.x + (display_size.x / 2) - (WINDOW_SIZE.x / 2.f), emuenv.viewport_pos.y + (display_size.y / 2.f) - (WINDOW_SIZE.y / 2.f)), ImGuiCond_Always); ImGui::PushStyleVar(ImGuiStyleVar_ChildRounding, 10.f * SCALE.x); - ImGui::BeginChild("##info", WINDOW_SIZE, true, ImGuiWindowFlags_NoSavedSettings | ImGuiWindowFlags_NoDecoration); + ImGui::BeginChild("##info", WINDOW_SIZE, ImGuiChildFlags_Border, ImGuiWindowFlags_NoSavedSettings | ImGuiWindowFlags_NoDecoration); const auto &title = gui.info_message.title; ImGui::SetWindowFontScale(RES_SCALE.x); ImGui::SetCursorPosX((ImGui::GetWindowWidth() - ImGui::CalcTextSize(title.c_str()).x) / 2); diff --git a/vita3k/gui/src/home_screen.cpp b/vita3k/gui/src/home_screen.cpp index 7fc91463f6..b118c1abd2 100644 --- a/vita3k/gui/src/home_screen.cpp +++ b/vita3k/gui/src/home_screen.cpp @@ -238,7 +238,7 @@ void draw_app_close(GuiState &gui, EmuEnvState &emuenv) { ImGui::Begin("##app_close", &gui.vita_area.app_close, ImGuiWindowFlags_NoBackground | ImGuiWindowFlags_NoDecoration | ImGuiWindowFlags_NoSavedSettings); ImGui::SetNextWindowPos(ImVec2(emuenv.viewport_pos.x + (display_size.x / 2.f) - (WINDOW_SIZE.x / 2.f), emuenv.viewport_pos.y + (display_size.y / 2.f) - (WINDOW_SIZE.y / 2.f)), ImGuiCond_Always); ImGui::PushStyleVar(ImGuiStyleVar_ChildRounding, 10.f * SCALE.x); - ImGui::BeginChild("##app_close_child", WINDOW_SIZE, true, ImGuiWindowFlags_NoDecoration | ImGuiWindowFlags_NoSavedSettings); + ImGui::BeginChild("##app_close_child", WINDOW_SIZE, ImGuiChildFlags_Border, ImGuiWindowFlags_NoDecoration | ImGuiWindowFlags_NoSavedSettings); ImGui::PushStyleVar(ImGuiStyleVar_FrameRounding, 10.f * SCALE.x); const auto ICON_SIZE = ImVec2(64.f * SCALE.x, 64.f * SCALE.y); @@ -719,7 +719,7 @@ void draw_home_screen(GuiState &gui, EmuEnvState &emuenv) { if (gui.is_nav_button) child_flags |= ImGuiWindowFlags_NoMouseInputs; ImGui::SetNextWindowPos(emuenv.cfg.apps_list_grid ? POS_APP_LIST : ImVec2(emuenv.viewport_pos.x, VIEWPORT_POS.y + MARGIN_HEIGHT), ImGuiCond_Always); - ImGui::BeginChild("##apps_list", SIZE_APP_LIST, false, child_flags); + ImGui::BeginChild("##apps_list", SIZE_APP_LIST, ImGuiChildFlags_None, child_flags); // Get Scroll Pos current_scroll_pos = ImGui::GetScrollY(); diff --git a/vita3k/gui/src/ime.cpp b/vita3k/gui/src/ime.cpp index e62fb1d2f2..dbd8e907d3 100644 --- a/vita3k/gui/src/ime.cpp +++ b/vita3k/gui/src/ime.cpp @@ -293,7 +293,7 @@ void draw_ime(Ime &ime, EmuEnvState &emuenv) { ImGui::SetCursorPosX(MARGE_BORDER); ImGui::VSliderFloat("##scroll_special", ImVec2(42.f * SCALE.x, 140.f * SCALE.y), &scroll_special["current"], scroll_special["max"], 0, ""); ImGui::SetNextWindowPos(ImVec2(WINDOW_POS.x + (74.f * SCALE.x), WINDOW_POS.y)); - ImGui::BeginChild("##special_key", ImVec2(488.f * SCALE.x, 178.f * SCALE.y), false, ImGuiWindowFlags_NoBackground | ImGuiWindowFlags_NoDecoration | ImGuiWindowFlags_NoSavedSettings | ImGuiWindowFlags_NoScrollWithMouse); + ImGui::BeginChild("##special_key", ImVec2(488.f * SCALE.x, 178.f * SCALE.y), ImGuiChildFlags_None, ImGuiWindowFlags_NoBackground | ImGuiWindowFlags_NoDecoration | ImGuiWindowFlags_NoSavedSettings | ImGuiWindowFlags_NoScrollWithMouse); const auto scroll_value = ImGui::GetIO().MouseWheel * 20.f; if (ImGui::GetIO().MouseWheel == 1) scroll_special["current"] -= std::min(scroll_value, scroll_special["current"]); diff --git a/vita3k/gui/src/information_bar.cpp b/vita3k/gui/src/information_bar.cpp index 7477c1cfc8..964f72a746 100644 --- a/vita3k/gui/src/information_bar.cpp +++ b/vita3k/gui/src/information_bar.cpp @@ -396,7 +396,7 @@ static void draw_notice_info(GuiState &gui, EmuEnvState &emuenv) { ImGui::PushStyleVar(ImGuiStyleVar_ChildRounding, 10.f * SCALE.x); ImGui::PushStyleVar(ImGuiStyleVar_ChildBorderSize, notice_info.empty() ? 0.f : 8.0f * SCALE.x); ImGui::SetNextWindowPos(POPUP_POS, ImGuiCond_Always); - ImGui::BeginChild("##notice_info_child", POPUP_SIZE, true, ImGuiWindowFlags_NoSavedSettings); + ImGui::BeginChild("##notice_info_child", POPUP_SIZE, ImGuiChildFlags_Border, ImGuiWindowFlags_NoSavedSettings); auto &lang = gui.lang.indicator; if (notice_info.empty()) { ImGui::SetWindowFontScale(1.2f * RES_SCALE.x); diff --git a/vita3k/gui/src/initial_setup.cpp b/vita3k/gui/src/initial_setup.cpp index f22c465c28..750e01793b 100644 --- a/vita3k/gui/src/initial_setup.cpp +++ b/vita3k/gui/src/initial_setup.cpp @@ -94,7 +94,7 @@ void draw_initial_setup(GuiState &gui, EmuEnvState &emuenv) { ImGui::PushStyleColor(ImGuiCol_Border, GUI_COLOR_TEXT); ImGui::SetNextWindowBgAlpha(0.0f); - ImGui::BeginChild("##window_box", WINDOW_SIZE, true, ImGuiWindowFlags_NoDecoration | ImGuiWindowFlags_NoSavedSettings); + ImGui::BeginChild("##window_box", WINDOW_SIZE, ImGuiChildFlags_Border, ImGuiWindowFlags_NoDecoration | ImGuiWindowFlags_NoSavedSettings); ImGui::SetWindowFontScale(1.3f * RES_SCALE.x); const auto SELECT_COLOR = ImVec4(0.23f, 0.68f, 0.95f, 0.60f); const auto SELECT_COLOR_HOVERED = ImVec4(0.23f, 0.68f, 0.99f, 0.80f); @@ -109,7 +109,7 @@ void draw_initial_setup(GuiState &gui, EmuEnvState &emuenv) { title_str = lang["select_language"]; ImGui::SetNextWindowPos(ImVec2(198.f * SCALE.x, 126.f * SCALE.y), ImGuiCond_Always); ImGui::PushStyleVar(ImGuiStyleVar_ChildBorderSize, 0.f); - ImGui::BeginChild("##lang_list", ImVec2(WINDOW_SIZE.x - (200.f * SCALE.x), WINDOW_SIZE.y - (108.f * SCALE.y)), false, ImGuiWindowFlags_NoBackground | ImGuiWindowFlags_NoSavedSettings); + ImGui::BeginChild("##lang_list", ImVec2(WINDOW_SIZE.x - (200.f * SCALE.x), WINDOW_SIZE.y - (108.f * SCALE.y)), ImGuiChildFlags_None, ImGuiWindowFlags_NoBackground | ImGuiWindowFlags_NoSavedSettings); ImGui::Columns(3, nullptr, false); ImGui::SetColumnWidth(0, 96.f * SCALE.x); ImGui::SetColumnWidth(1, 30.f * SCALE.x); diff --git a/vita3k/gui/src/license_install_dialog.cpp b/vita3k/gui/src/license_install_dialog.cpp index 962b4675ac..19d51ea3c4 100644 --- a/vita3k/gui/src/license_install_dialog.cpp +++ b/vita3k/gui/src/license_install_dialog.cpp @@ -44,7 +44,7 @@ void draw_license_install_dialog(GuiState &gui, EmuEnvState &emuenv) { ImGui::SetNextWindowPos(ImVec2(display_size.x / 2.f, display_size.y / 2.f), ImGuiCond_Always, ImVec2(0.5f, 0.5f)); ImGui::SetWindowFontScale(RES_SCALE.x); ImGui::PushStyleVar(ImGuiStyleVar_ChildRounding, 10.f * SCALE.x); - ImGui::BeginChild("##license_install_child", ImVec2(616.f * SCALE.x, 264.f * SCALE.y), true, ImGuiWindowFlags_AlwaysAutoResize | ImGuiWindowFlags_NoDecoration | ImGuiWindowFlags_NoSavedSettings); + ImGui::BeginChild("##license_install_child", ImVec2(616.f * SCALE.x, 264.f * SCALE.y), ImGuiChildFlags_Border | ImGuiChildFlags_AlwaysAutoResize | ImGuiChildFlags_AutoResizeX | ImGuiChildFlags_AutoResizeY, ImGuiWindowFlags_NoDecoration | ImGuiWindowFlags_NoSavedSettings); const auto POS_BUTTON = (ImGui::GetWindowWidth() / 2.f) - (BUTTON_SIZE.x / 2.f) + (10.f * SCALE.x); ImGui::SetCursorPosX((ImGui::GetWindowSize().x / 2.f) - (ImGui::CalcTextSize(title.c_str()).x / 2.f)); ImGui::TextColored(GUI_COLOR_TEXT_TITLE, "%s", title.c_str()); diff --git a/vita3k/gui/src/live_area.cpp b/vita3k/gui/src/live_area.cpp index a5ab5b7f58..b8790b54a3 100644 --- a/vita3k/gui/src/live_area.cpp +++ b/vita3k/gui/src/live_area.cpp @@ -997,7 +997,7 @@ void draw_live_area_screen(GuiState &gui, EmuEnvState &emuenv) { // TODO Multiple color support on same frame, used by eg: Asphalt: Injection // TODO Correct display few line on same frame, used by eg: Asphalt: Injection ImGui::SetNextWindowPos(ImVec2(WINDOW_POS.x + text_pos.x, WINDOW_POS.y + text_pos.y)); - ImGui::BeginChild(frame.id.c_str(), str_size, false, ImGuiWindowFlags_NoDecoration | ImGuiWindowFlags_NoBackground | ImGuiWindowFlags_NoSavedSettings); + ImGui::BeginChild(frame.id.c_str(), str_size, ImGuiChildFlags_None, ImGuiWindowFlags_NoDecoration | ImGuiWindowFlags_NoBackground | ImGuiWindowFlags_NoSavedSettings); if (liveitem[app_path][frame.id]["text"]["word-wrap"].second != "off") ImGui::PushTextWrapPos(str_wrap); if (liveitem[app_path][frame.id]["text"]["word-scroll"].second == "on") { diff --git a/vita3k/gui/src/manual.cpp b/vita3k/gui/src/manual.cpp index b5ab08f27a..21665bc020 100644 --- a/vita3k/gui/src/manual.cpp +++ b/vita3k/gui/src/manual.cpp @@ -141,7 +141,7 @@ void draw_manual(GuiState &gui, EmuEnvState &emuenv) { const auto SCALE = ImVec2(RES_SCALE.x * emuenv.dpi_scale, RES_SCALE.y * emuenv.dpi_scale); const ImVec2 WINDOW_POS(emuenv.viewport_pos.x, emuenv.viewport_pos.y); ImGui::SetNextWindowPos(WINDOW_POS, ImGuiCond_Always); - ImGui::BeginChild("##manual_page", display_size, false, ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoDecoration | ImGuiWindowFlags_NoScrollWithMouse | ImGuiWindowFlags_NoSavedSettings); + ImGui::BeginChild("##manual_page", display_size, ImGuiChildFlags_None, ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoDecoration | ImGuiWindowFlags_NoScrollWithMouse | ImGuiWindowFlags_NoSavedSettings); // Draw manual image if exists and is valid if (!gui.manuals.empty() && gui.manuals[current_page]) @@ -162,7 +162,7 @@ void draw_manual(GuiState &gui, EmuEnvState &emuenv) { // Set pos and begin child window for manual buttons ImGui::SetNextWindowPos(WINDOW_POS, ImGuiCond_Always); - ImGui::BeginChild("##manual_buttons", display_size, false, ImGuiWindowFlags_NoBackground | ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoDecoration | ImGuiWindowFlags_NoSavedSettings); + ImGui::BeginChild("##manual_buttons", display_size, ImGuiChildFlags_None, ImGuiWindowFlags_NoBackground | ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoDecoration | ImGuiWindowFlags_NoSavedSettings); // Set window font scale for buttons ImGui::SetWindowFontScale(RES_SCALE.x); diff --git a/vita3k/gui/src/perf_overlay.cpp b/vita3k/gui/src/perf_overlay.cpp index c51c16fd8e..8ee6424388 100644 --- a/vita3k/gui/src/perf_overlay.cpp +++ b/vita3k/gui/src/perf_overlay.cpp @@ -73,7 +73,7 @@ void draw_perf_overlay(GuiState &gui, EmuEnvState &emuenv) { ImGui::Begin("##performance", nullptr, ImGuiWindowFlags_NoBackground | ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoDecoration | ImGuiWindowFlags_NoSavedSettings | ImGuiWindowFlags_NoBringToFrontOnFocus); ImGui::PushStyleColor(ImGuiCol_ChildBg, PERF_OVERLAY_BG_COLOR); ImGui::PushStyleVar(ImGuiStyleVar_ChildRounding, 5.f * SCALE.x); - ImGui::BeginChild("#perf_stats", WINDOW_SIZE, true, ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoDecoration | ImGuiWindowFlags_NoSavedSettings); + ImGui::BeginChild("#perf_stats", WINDOW_SIZE, ImGuiChildFlags_Border, ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoDecoration | ImGuiWindowFlags_NoSavedSettings); ImGui::PushFont(gui.vita_font); ImGui::SetWindowFontScale(0.7f * RES_SCALE.x); if (emuenv.cfg.performance_overlay_detail == PerformanceOverlayDetail::MINIMUM) diff --git a/vita3k/gui/src/settings.cpp b/vita3k/gui/src/settings.cpp index 707c1f4f7a..a78e1474a2 100644 --- a/vita3k/gui/src/settings.cpp +++ b/vita3k/gui/src/settings.cpp @@ -297,7 +297,7 @@ void draw_settings(GuiState &gui, EmuEnvState &emuenv) { ImGui::SetNextWindowPos(ImVec2(WINDOW_POS.x + (WINDOW_SIZE.x / 2.f) - (SIZE_LIST.x / 2.f), WINDOW_POS.y + ((settings_menu == THEME_BACKGROUND) && !menu.empty() ? 86.f : 64.f) * SCALE.y), ImGuiCond_Always); ImGui::PushStyleVar(ImGuiStyleVar_FrameRounding, 10.f * SCALE.x); ImGui::PushStyleVar(ImGuiStyleVar_ChildBorderSize, 0.f); - ImGui::BeginChild("##settings_child", SIZE_LIST, false, ImGuiWindowFlags_NoBackground | ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoCollapse | ImGuiWindowFlags_NoSavedSettings); + ImGui::BeginChild("##settings_child", SIZE_LIST, ImGuiChildFlags_None, ImGuiWindowFlags_NoBackground | ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoCollapse | ImGuiWindowFlags_NoSavedSettings); const auto SIZE_SELECT = 80.f * SCALE.y; const auto SIZE_PUPUP_SELECT = 70.f * SCALE.y; @@ -438,7 +438,7 @@ void draw_settings(GuiState &gui, EmuEnvState &emuenv) { ImGui::Begin("##delete_theme", nullptr, ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoBackground | ImGuiWindowFlags_NoDecoration | ImGuiWindowFlags_NoSavedSettings); ImGui::SetNextWindowPos(ImVec2(WINDOW_SIZE.x / 2.f, WINDOW_SIZE.y / 2.f), ImGuiCond_Always, ImVec2(0.5f, 0.5f)); ImGui::PushStyleVar(ImGuiStyleVar_ChildRounding, 10.f * SCALE.x); - ImGui::BeginChild("##delete_theme_popup", POPUP_SIZE, true, ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoDecoration | ImGuiWindowFlags_NoSavedSettings); + ImGui::BeginChild("##delete_theme_popup", POPUP_SIZE, ImGuiChildFlags_Border, ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoDecoration | ImGuiWindowFlags_NoSavedSettings); ImGui::SetCursorPos(ImVec2(48.f * SCALE.x, 28.f * SCALE.y)); ImGui::SetWindowFontScale(1.6f * RES_SCALE.x); ImGui::Image(gui.themes_preview[selected][PACKAGE], SIZE_MINI_PACKAGE); diff --git a/vita3k/gui/src/trophy_collection.cpp b/vita3k/gui/src/trophy_collection.cpp index 128bcfbf8e..6b243fedff 100644 --- a/vita3k/gui/src/trophy_collection.cpp +++ b/vita3k/gui/src/trophy_collection.cpp @@ -449,7 +449,7 @@ void draw_trophy_collection(GuiState &gui, EmuEnvState &emuenv) { ImGui::SetWindowFontScale(1.f); } ImGui::SetNextWindowPos(ImVec2(WINDOW_POS.x + (90.f * SCALE.x), WINDOW_POS.y + (!trophy_id_selected.empty() || detail_np_com_id ? 16.0f : 58.f) * SCALE.y), ImGuiCond_Always); - ImGui::BeginChild("##trophy_collection_child", !trophy_id_selected.empty() || detail_np_com_id ? SIZE_INFO : SIZE_LIST, false, ImGuiWindowFlags_NoBackground | ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoCollapse | ImGuiWindowFlags_NoSavedSettings); + ImGui::BeginChild("##trophy_collection_child", !trophy_id_selected.empty() || detail_np_com_id ? SIZE_INFO : SIZE_LIST, ImGuiChildFlags_None, ImGuiWindowFlags_NoBackground | ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoCollapse | ImGuiWindowFlags_NoSavedSettings); // Trophy Collection if (np_com_id_list.empty()) { @@ -473,7 +473,7 @@ void draw_trophy_collection(GuiState &gui, EmuEnvState &emuenv) { ImGui::SetNextWindowBgAlpha(0.999f); ImGui::SetNextWindowPos(ImVec2(WINDOW_POS.x + (WINDOW_SIZE.x / 2.f) - (POPUP_SIZE.x / 2.f), WINDOW_POS.y + (WINDOW_SIZE.y / 2.f) - (POPUP_SIZE.y / 2.f)), ImGuiCond_Always); ImGui::PushStyleVar(ImGuiStyleVar_ChildRounding, 10.f * SCALE.x); - ImGui::BeginChild("##trophy_delete_child", POPUP_SIZE, true, ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoDecoration | ImGuiWindowFlags_NoSavedSettings); + ImGui::BeginChild("##trophy_delete_child", POPUP_SIZE, ImGuiChildFlags_Border, ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoDecoration | ImGuiWindowFlags_NoSavedSettings); ImGui::PushStyleVar(ImGuiStyleVar_FrameRounding, 10.f * SCALE.x); const ImVec2 ICON_POS(48.f * SCALE.x, 28.f * SCALE.y); if (gui.trophy_np_com_id_list_icons[delete_np_com_id].contains("000")) { diff --git a/vita3k/gui/src/user_management.cpp b/vita3k/gui/src/user_management.cpp index 5c7ef99290..9419c75636 100644 --- a/vita3k/gui/src/user_management.cpp +++ b/vita3k/gui/src/user_management.cpp @@ -516,7 +516,7 @@ void draw_user_management(GuiState &gui, EmuEnvState &emuenv) { auto flags = ImGuiWindowFlags_NoBackground | ImGuiWindowFlags_NoScrollbar | ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoCollapse | ImGuiWindowFlags_NoSavedSettings; if (gui.is_nav_button) flags |= ImGuiWindowFlags_NoMouseInputs; - ImGui::BeginChild("##user_child", SIZE_USER, false, flags); + ImGui::BeginChild("##user_child", SIZE_USER, ImGuiChildFlags_None, flags); // Draw user background const auto draw_user_bg = [&](const AvatarSize size, const ImVec2 origin_pos) { @@ -737,7 +737,7 @@ void draw_user_management(GuiState &gui, EmuEnvState &emuenv) { auto delete_flags = ImGuiWindowFlags_NoBackground | ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoCollapse | ImGuiWindowFlags_NoSavedSettings; if (gui.is_nav_button) delete_flags |= ImGuiWindowFlags_NoMouseInputs; - ImGui::BeginChild("##delete_user_child", CHILD_DELETE_USER_SIZE, false, delete_flags); + ImGui::BeginChild("##delete_user_child", CHILD_DELETE_USER_SIZE, ImGuiChildFlags_None, delete_flags); ImGui::SetWindowFontScale(RES_SCALE.x); ImGui::Columns(2, nullptr, false); ImGui::SetColumnWidth(0, SMALL_AVATAR_SIZE.x + (10.f * SCALE.x)); diff --git a/vita3k/gui/src/vita3k_update.cpp b/vita3k/gui/src/vita3k_update.cpp index cfbc13c33a..ab1e9fbe9e 100644 --- a/vita3k/gui/src/vita3k_update.cpp +++ b/vita3k/gui/src/vita3k_update.cpp @@ -274,7 +274,7 @@ void draw_vita3k_update(GuiState &gui, EmuEnvState &emuenv) { ImGui::PushStyleVar(ImGuiStyleVar_ChildBorderSize, 4.f * SCALE.x); ImGui::PushStyleVar(ImGuiStyleVar_ScrollbarSize, 15.f * SCALE.x); ImGui::SetNextWindowBgAlpha(0.f); - ImGui::BeginChild("##description_child", ImVec2(860 * SCALE.x, 334.f * SCALE.y), true, ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoCollapse | ImGuiWindowFlags_NoSavedSettings); + ImGui::BeginChild("##description_child", ImVec2(860 * SCALE.x, 334.f * SCALE.y), ImGuiChildFlags_Border, ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoCollapse | ImGuiWindowFlags_NoSavedSettings); ImGui::SetWindowFontScale(0.8f); ImGui::Columns(2, "commit_columns", true); ImGui::SetColumnWidth(0, 200 * SCALE.x);