mirror of
https://github.com/Vita3K/Vita3K-Android.git
synced 2025-02-25 16:00:46 +00:00
external: update imgui submodule.
gui/app_selector: fix size on text if firmware font is missing. emu: fix not show app_selector with using command run or vpk drop.
This commit is contained in:
parent
76189aa57f
commit
844762baee
2
external/imgui
vendored
2
external/imgui
vendored
@ -1 +1 @@
|
||||
Subproject commit c077dd4872f435dd959feb024e5a9adb2c7df20c
|
||||
Subproject commit 5503c0a12e0c929e84b3f61b2cb4bb9177ea3da1
|
2
external/imgui_club
vendored
2
external/imgui_club
vendored
@ -1 +1 @@
|
||||
Subproject commit e680ad8d6b9278367d0f71a698beb96b70762ed4
|
||||
Subproject commit 50b79d1609c496b67c199aa79de4f7c590d5a5d7
|
@ -62,7 +62,7 @@ static void draw_ime_dialog(DialogState &common_dialog) {
|
||||
|
||||
static void draw_message_dialog(DialogState &common_dialog) {
|
||||
const ImVec2 PROGRESS_BAR_SIZE = ImVec2(120.f, 5.f);
|
||||
ImGui::SetNextWindowPosCenter();
|
||||
ImGui::SetNextWindowPos(ImVec2(ImGui::GetIO().DisplaySize.x / 2.f, ImGui::GetIO().DisplaySize.y / 2.f), ImGuiCond_Always, ImVec2(0.5f, 0.5f));
|
||||
ImGui::SetNextWindowSize(ImVec2(0, 0));
|
||||
ImGui::Begin("Message Dialog");
|
||||
ImGui::Text("%s", common_dialog.msg.message.c_str());
|
||||
@ -191,7 +191,7 @@ static void draw_savedata_dialog(DialogState &common_dialog, GuiState &gui) {
|
||||
|
||||
switch (common_dialog.savedata.mode_to_display) {
|
||||
case SCE_SAVEDATA_DIALOG_MODE_LIST:
|
||||
ImGui::SetNextWindowPosCenter();
|
||||
ImGui::SetNextWindowPos(ImVec2(ImGui::GetIO().DisplaySize.x / 2.f, ImGui::GetIO().DisplaySize.y / 2.f), ImGuiCond_Always, ImVec2(0.5f, 0.5f));
|
||||
ImGui::SetNextWindowSize(WINDOW_SIZE);
|
||||
ImGui::Begin("##Savedata Dialog", nullptr, ImGuiWindowFlags_NoDecoration);
|
||||
ImGui::SetWindowFontScale(1.5f);
|
||||
@ -231,7 +231,7 @@ static void draw_savedata_dialog(DialogState &common_dialog, GuiState &gui) {
|
||||
break;
|
||||
default:
|
||||
case SCE_SAVEDATA_DIALOG_MODE_FIXED:
|
||||
ImGui::SetNextWindowPosCenter();
|
||||
ImGui::SetNextWindowPos(ImVec2(ImGui::GetIO().DisplaySize.x / 2.f, ImGui::GetIO().DisplaySize.y / 2.f), ImGuiCond_Always, ImVec2(0.5f, 0.5f));
|
||||
ImGui::SetNextWindowSize(WINDOW_SIZE);
|
||||
ImGui::Begin("##Savedata Dialog", nullptr, ImGuiWindowFlags_NoDecoration);
|
||||
ImGui::SetWindowFontScale(1.5f);
|
||||
|
@ -64,7 +64,7 @@ void draw_controls_dialog(GuiState &gui, HostState &host) {
|
||||
float width = ImGui::GetWindowWidth() / 1.35f;
|
||||
float height = ImGui::GetWindowHeight() / 1.25f;
|
||||
ImGui::SetNextWindowSize(ImVec2(width, height));
|
||||
ImGui::SetNextWindowPosCenter();
|
||||
ImGui::SetNextWindowPos(ImVec2(ImGui::GetIO().DisplaySize.x / 2.f, ImGui::GetIO().DisplaySize.y / 2.f), ImGuiCond_Always, ImVec2(0.5f, 0.5f));
|
||||
ImGui::Begin("Controls", &gui.controls_menu.controls_dialog);
|
||||
ImGui::TextColored(GUI_COLOR_TEXT_MENUBAR, "%-16s %-16s", "Button", "Mapped button");
|
||||
remapper_button(gui, host, &host.cfg.keyboard_leftstick_up, "Left stick up", ImVec2(7.0f, 7.0f));
|
||||
|
@ -225,7 +225,7 @@ void draw_app_context_menu(GuiState &gui, HostState &host) {
|
||||
ImGui::SetNextWindowPos(ImVec2(0, 0), ImGuiCond_Always);
|
||||
ImGui::SetNextWindowSize(display_size, ImGuiCond_Always);
|
||||
ImGui::Begin("##context_dialog", nullptr, ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoBackground | ImGuiWindowFlags_NoDecoration | ImGuiWindowFlags_NoSavedSettings);
|
||||
ImGui::SetNextWindowPosCenter();
|
||||
ImGui::SetNextWindowPos(ImVec2(display_size.x / 2.f, display_size.y / 2.f), ImGuiCond_Always, ImVec2(0.5f, 0.5f));
|
||||
ImGui::SetNextWindowBgAlpha(0.999f);
|
||||
ImGui::BeginChild("##context_dialog_child", WINDOW_SIZE, true, ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoDecoration | ImGuiWindowFlags_NoSavedSettings);
|
||||
// Update History
|
||||
|
@ -18,9 +18,6 @@
|
||||
#include "private.h"
|
||||
|
||||
#include <gui/functions.h>
|
||||
#include <gui/state.h>
|
||||
|
||||
#include <host/state.h>
|
||||
|
||||
#include <util/log.h>
|
||||
#include <util/string_utils.h>
|
||||
@ -104,11 +101,9 @@ void draw_game_selector(GuiState &gui, HostState &host) {
|
||||
switch (gui.game_selector.title_id_sort_state) {
|
||||
case ASCENDANT:
|
||||
title_id_label += " >";
|
||||
title_id_size += ImGui::CalcTextSize(" >").x;
|
||||
break;
|
||||
case DESCENDANT:
|
||||
title_id_label += " <";
|
||||
title_id_size += ImGui::CalcTextSize(" <").x;
|
||||
break;
|
||||
}
|
||||
ImGui::SetColumnWidth(1, title_id_size);
|
||||
@ -232,14 +227,14 @@ void draw_game_selector(GuiState &gui, HostState &host) {
|
||||
}
|
||||
ImGui::PushStyleColor(ImGuiCol_Text, GUI_COLOR_SEARCH_BAR_TEXT);
|
||||
ImGui::PushStyleColor(ImGuiCol_FrameBg, GUI_COLOR_SEARCH_BAR_BG);
|
||||
ImGui::SameLine(ImGui::GetColumnWidth() - (ImGui::CalcTextSize("Refresh").x + ImGui::GetStyle().DisplayWindowPadding.x + 270));
|
||||
ImGui::SameLine(ImGui::GetColumnWidth() - (ImGui::CalcTextSize("Refresh").x + ImGui::GetStyle().DisplayWindowPadding.x + 270.f));
|
||||
if (ImGui::Button("Refresh"))
|
||||
refresh_game_list(gui, host);
|
||||
ImGui::PopStyleColor(3);
|
||||
ImGui::SameLine(ImGui::GetColumnWidth() - (ImGui::CalcTextSize("Search").x + ImGui::GetStyle().DisplayWindowPadding.x + 180));
|
||||
ImGui::TextColored(GUI_COLOR_TEXT, "Search");
|
||||
ImGui::SameLine();
|
||||
gui.game_search_bar.Draw("##game_search_bar", 180);
|
||||
gui.game_search_bar.Draw("##game_search_bar", 180.f);
|
||||
if (!host.cfg.apps_list_grid) {
|
||||
ImGui::NextColumn();
|
||||
ImGui::Columns(1);
|
||||
@ -262,7 +257,7 @@ void draw_game_selector(GuiState &gui, HostState &host) {
|
||||
ImGui::SetColumnWidth(2, GRID_ICON_SIZE.x + 80.f);
|
||||
ImGui::SetColumnWidth(3, GRID_ICON_SIZE.x + 80.f);
|
||||
}
|
||||
ImGui::SetWindowFontScale(0.74f);
|
||||
ImGui::SetWindowFontScale(!gui.live_area_font_data.empty() ? 0.76f : 1.f);
|
||||
ImGui::PushStyleColor(ImGuiCol_Text, GUI_COLOR_TEXT);
|
||||
for (const auto &game : gui.game_selector.games) {
|
||||
bool selected = false;
|
||||
@ -296,10 +291,9 @@ void draw_game_selector(GuiState &gui, HostState &host) {
|
||||
}
|
||||
if (host.io.title_id == game.title_id)
|
||||
draw_app_context_menu(gui, host);
|
||||
ImGui::SetWindowFontScale(0.76f);
|
||||
if (!host.cfg.apps_list_grid) {
|
||||
ImGui::NextColumn();
|
||||
ImGui::PushStyleVar(ImGuiStyleVar_SelectableTextAlign, ImVec2(0.0f, 0.5f));
|
||||
ImGui::PushStyleVar(ImGuiStyleVar_SelectableTextAlign, ImVec2(0.f, 0.5f));
|
||||
ImGui::Selectable(game.title_id.c_str(), false, ImGuiSelectableFlags_None, ImVec2(0.f, icon_size));
|
||||
ImGui::NextColumn();
|
||||
ImGui::Selectable(game.app_ver.c_str(), false, ImGuiSelectableFlags_None, ImVec2(0.f, icon_size));
|
||||
@ -324,6 +318,7 @@ void draw_game_selector(GuiState &gui, HostState &host) {
|
||||
gui.game_selector.selected_title_id = game.title_id;
|
||||
}
|
||||
}
|
||||
ImGui::PopStyleColor();
|
||||
ImGui::Columns(1);
|
||||
ImGui::EndChild();
|
||||
break;
|
||||
|
@ -59,7 +59,7 @@ static void init_style() {
|
||||
style->Colors[ImGuiCol_Text] = ImVec4(0.95f, 0.95f, 0.95f, 1.00f);
|
||||
style->Colors[ImGuiCol_TextDisabled] = ImVec4(0.24f, 0.23f, 0.29f, 1.00f);
|
||||
style->Colors[ImGuiCol_WindowBg] = ImVec4(0.07f, 0.08f, 0.10f, 0.80f);
|
||||
style->Colors[ImGuiCol_ChildWindowBg] = ImVec4(0.07f, 0.07f, 0.09f, 0.90f);
|
||||
style->Colors[ImGuiCol_ChildBg] = ImVec4(0.07f, 0.07f, 0.09f, 0.90f);
|
||||
style->Colors[ImGuiCol_PopupBg] = ImVec4(0.07f, 0.07f, 0.09f, 0.90f);
|
||||
style->Colors[ImGuiCol_Border] = ImVec4(0.80f, 0.80f, 0.80f, 0.88f);
|
||||
style->Colors[ImGuiCol_BorderShadow] = ImVec4(0.92f, 0.91f, 0.88f, 0.00f);
|
||||
@ -133,7 +133,8 @@ static void init_live_area_font(GuiState &gui, HostState &host) {
|
||||
|
||||
// check existence of font file
|
||||
if (!fs::exists(font_path)) {
|
||||
LOG_WARN("Could not find font file at \"{}\", falling back to default live area font.", font_path.string());
|
||||
LOG_WARN("Could not find firmware font file at \"{}\", using defaut vita3k font.", font_path.string());
|
||||
gui.live_area_font = gui.normal_font;
|
||||
return;
|
||||
}
|
||||
|
||||
@ -314,7 +315,7 @@ void draw_end(GuiState &gui, SDL_Window *window) {
|
||||
void draw_live_area(GuiState &gui, HostState &host) {
|
||||
ImGui::PushFont(gui.live_area_font);
|
||||
|
||||
if (gui.game_selector.selected_title_id.empty())
|
||||
if (!host.cfg.run_title_id && !host.cfg.vpk_path && gui.game_selector.selected_title_id.empty())
|
||||
draw_game_selector(gui, host);
|
||||
draw_app_context_menu(gui, host);
|
||||
if (gui.live_area.live_area_dialog)
|
||||
|
@ -1033,7 +1033,7 @@ void draw_live_area_dialog(GuiState &gui, HostState &host) {
|
||||
ImGui::SetCursorPos(ImVec2(60.f * scal.x, 14.0f * scal.y));
|
||||
if (ImGui::Button("Help", BUTTON_SIZE))
|
||||
ImGui::OpenPopup("Live Area Help");
|
||||
ImGui::SetNextWindowPosCenter();
|
||||
ImGui::SetNextWindowPos(ImVec2(display_size.x / 2.f, display_size.y / 2.f), ImGuiCond_Always, ImVec2(0.5f, 0.5f));
|
||||
if (ImGui::BeginPopupModal("Live Area Help", nullptr, ImGuiWindowFlags_AlwaysAutoResize | ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoDecoration | ImGuiWindowFlags_NoSavedSettings)) {
|
||||
ImGui::SetCursorPosX(ImGui::GetWindowWidth() / 2.f - (ImGui::CalcTextSize("Help").x / 2.f));
|
||||
ImGui::TextColored(GUI_COLOR_TEXT_TITLE, "Help");
|
||||
|
@ -90,7 +90,7 @@ void draw_manual_dialog(GuiState &gui, HostState &host) {
|
||||
ImGui::SetNextWindowSize(ImVec2(display_size.x + 10.f, display_size.y + 2.f), ImGuiCond_Always);
|
||||
ImGui::SetNextWindowBgAlpha(0.999f);
|
||||
ImGui::Begin("##manual", &gui.live_area.manual_dialog, ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoDecoration | ImGuiWindowFlags_NoSavedSettings);
|
||||
ImGui::SetNextWindowPosCenter();
|
||||
ImGui::SetNextWindowPos(ImVec2(display_size.x / 2.f, display_size.y / 2.f), ImGuiCond_Always, ImVec2(0.5f, 0.5f));
|
||||
if (zoom[host.io.title_id].first && ImGui::IsMouseDoubleClicked(0)) {
|
||||
zoom[host.io.title_id].second ? size_page[host.io.title_id]["current"] = size_page[host.io.title_id]["mini"] : size_page[host.io.title_id]["current"] = size_page[host.io.title_id]["max"];
|
||||
zoom[host.io.title_id].second = !zoom[host.io.title_id].second;
|
||||
|
@ -22,7 +22,7 @@
|
||||
namespace gui {
|
||||
|
||||
void draw_reinstall_dialog(GenericDialogState *status) {
|
||||
ImGui::SetNextWindowPosCenter();
|
||||
ImGui::SetNextWindowPos(ImVec2(ImGui::GetIO().DisplaySize.x / 2.f, ImGui::GetIO().DisplaySize.y / 2.f), ImGuiCond_Always, ImVec2(0.5f, 0.5f));
|
||||
ImGui::SetNextWindowSize(ImVec2(0, 0));
|
||||
ImGui::Begin("Reinstall this application?");
|
||||
ImGui::Text("This application is already installed.");
|
||||
|
@ -135,6 +135,7 @@ void get_modules_list(GuiState &gui, HostState &host) {
|
||||
void draw_settings_dialog(GuiState &gui, HostState &host) {
|
||||
const ImGuiWindowFlags settings_flags = ImGuiWindowFlags_AlwaysAutoResize;
|
||||
ImGui::PushStyleColor(ImGuiCol_Text, GUI_COLOR_TEXT_MENUBAR);
|
||||
ImGui::SetNextWindowPos(ImVec2(ImGui::GetIO().DisplaySize.x / 2.f, ImGui::GetIO().DisplaySize.y / 2.f), ImGuiCond_Always, ImVec2(0.5f, 0.5f));
|
||||
ImGui::Begin("Settings", &gui.configuration_menu.settings_dialog, settings_flags);
|
||||
const ImGuiTabBarFlags settings_tab_flags = ImGuiTabBarFlags_None;
|
||||
ImGui::BeginTabBar("SettingsTabBar", settings_tab_flags);
|
||||
|
Loading…
x
Reference in New Issue
Block a user