Skip to content

Commit

Permalink
latest changes
Browse files Browse the repository at this point in the history
* ui: Use only one option for settings window (xemu-project#1122)

* rebase code

* remove unsused item

* restore "system" displaying on first boot

* restore popup menu functions (separate commit)

* restore snapshot function in popup menu

* get current index value from config file

* ui: Warn user about no output when AV Pack set to "None"

---------

Co-authored-by: Fabx <[email protected]>
  • Loading branch information
EqUiNoX-Labs and Fabxx authored Dec 17, 2023
1 parent 67efc98 commit a743688
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 33 deletions.
29 changes: 10 additions & 19 deletions ui/xui/main-menu.cc
Original file line number Diff line number Diff line change
Expand Up @@ -989,6 +989,10 @@ void MainMenuSystemView::Draw()
ImGui::TextColored(ImVec4(1,0,0,1), "Application restart required to apply settings");
}

if ((int)g_config.sys.avpack == CONFIG_SYS_AVPACK_NONE) {
ImGui::TextColored(ImVec4(1,0,0,1), "Setting AV Pack to NONE disables video output.");
}

SectionTitle("System Configuration");

if (ChevronCombo(
Expand Down Expand Up @@ -1184,34 +1188,21 @@ MainMenuScene::MainMenuScene()
m_next_view_index = m_current_view_index;
}

void MainMenuScene::ShowGeneral()
{
SetNextViewIndexWithFocus(0);
}
void MainMenuScene::ShowInput()
void MainMenuScene::ShowSettings()
{
SetNextViewIndexWithFocus(1);
SetNextViewIndexWithFocus(g_config.general.last_viewed_menu_index);
}
void MainMenuScene::ShowDisplay()
{
SetNextViewIndexWithFocus(2);
}
void MainMenuScene::ShowAudio()
{
SetNextViewIndexWithFocus(3);
}
void MainMenuScene::ShowNetwork()
{
SetNextViewIndexWithFocus(4);
}
void MainMenuScene::ShowSnapshots()

void MainMenuScene::ShowSnapshots()
{
SetNextViewIndexWithFocus(5);
}

void MainMenuScene::ShowSystem()
{
SetNextViewIndexWithFocus(6);
}

void MainMenuScene::ShowAbout()
{
SetNextViewIndexWithFocus(7);
Expand Down
8 changes: 2 additions & 6 deletions ui/xui/main-menu.hh
Original file line number Diff line number Diff line change
Expand Up @@ -182,14 +182,10 @@ protected:

public:
MainMenuScene();
void ShowGeneral();
void ShowInput();
void ShowDisplay();
void ShowAudio();
void ShowNetwork();
void ShowSnapshots();
void ShowSettings();
void ShowSystem();
void ShowAbout();
void ShowSnapshots();
void SetNextViewIndexWithFocus(int i);
void Show() override;
void Hide() override;
Expand Down
9 changes: 1 addition & 8 deletions ui/xui/menubar.cc
Original file line number Diff line number Diff line change
Expand Up @@ -138,14 +138,7 @@ void ShowMainMenu()

ImGui::Separator();

ImGui::MenuItem("Settings", NULL, false, false);
if (ImGui::MenuItem(" General")) g_main_menu.ShowGeneral();
if (ImGui::MenuItem(" Input")) g_main_menu.ShowInput();
if (ImGui::MenuItem(" Display")) g_main_menu.ShowDisplay();
if (ImGui::MenuItem(" Audio")) g_main_menu.ShowAudio();
if (ImGui::MenuItem(" Network")) g_main_menu.ShowNetwork();
if (ImGui::MenuItem(" Snapshots")) g_main_menu.ShowSnapshots();
if (ImGui::MenuItem(" System")) g_main_menu.ShowSystem();
if (ImGui::MenuItem("Settings...")) g_main_menu.ShowSettings();

ImGui::Separator();

Expand Down

0 comments on commit a743688

Please sign in to comment.