mirror of https://github.com/xemu-project/xemu.git
ui: Use only one option for settings window (#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
This commit is contained in:
parent
b3fc80b3a8
commit
b605381adb
|
@ -1184,34 +1184,21 @@ MainMenuScene::MainMenuScene()
|
|||
m_next_view_index = m_current_view_index;
|
||||
}
|
||||
|
||||
void MainMenuScene::ShowGeneral()
|
||||
void MainMenuScene::ShowSettings()
|
||||
{
|
||||
SetNextViewIndexWithFocus(0);
|
||||
SetNextViewIndexWithFocus(g_config.general.last_viewed_menu_index);
|
||||
}
|
||||
void MainMenuScene::ShowInput()
|
||||
{
|
||||
SetNextViewIndexWithFocus(1);
|
||||
}
|
||||
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);
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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();
|
||||
|
||||
|
|
Loading…
Reference in New Issue