Skip to content

Commit

Permalink
Merge pull request #5 from RetroDECK/feat/smaller-menu
Browse files Browse the repository at this point in the history
feat/smaller menu
  • Loading branch information
XargonWan authored Aug 6, 2024
2 parents 1532897 + 188873c commit cac4e7c
Show file tree
Hide file tree
Showing 6 changed files with 65 additions and 252 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -109,3 +109,7 @@ CPackSourceConfig.cmake

# VSCode
.vscode/

.flatpak-builder
es-de-build-dir
es-de-repo
72 changes: 58 additions & 14 deletions es-app/src/guis/GuiMenu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,26 +57,14 @@ GuiMenu::GuiMenu()
addEntry("SCRAPER", mMenuColorPrimary, true, [this] { openScraperOptions(); });

if (isFullUI)
addEntry("UI SETTINGS", mMenuColorPrimary, true, [this] { openUIOptions(); });

addEntry("SOUND SETTINGS", mMenuColorPrimary, true, [this] { openSoundOptions(); });

if (isFullUI)
addEntry("INPUT DEVICE SETTINGS", mMenuColorPrimary, true,
[this] { openInputDeviceOptions(); });
addEntry("RETRODECK CONFIGURATOR", mMenuColorPrimary, false, [this] { openRetroDeckConfigurator(); });

if (isFullUI)
addEntry("GAME COLLECTION SETTINGS", mMenuColorPrimary, true,
[this] { openCollectionSystemOptions(); });

if (isFullUI)
addEntry("OTHER SETTINGS", mMenuColorPrimary, true, [this] { openOtherOptions(); });
addEntry("ES-DE CONFIGURATIONS", mMenuColorPrimary, true, [this] { openESDEConfiguration(); });

if (isFullUI)
addEntry("UTILITIES", mMenuColorPrimary, true, [this] { openUtilities(); });

addEntry("RETRODECK CONFIGURATOR", mMenuColorPrimary, false, [this] { openRetroDeckConfigurator(); });

if (!Settings::getInstance()->getBool("ForceKiosk") &&
Settings::getInstance()->getString("UIMode") != "kiosk") {
#if defined(__APPLE__)
Expand Down Expand Up @@ -2033,6 +2021,62 @@ void GuiMenu::openUtilities()
mWindow->pushGui(s);
}

void GuiMenu::openESDEConfiguration() {
// Create a new GuiSettings instance for the ES-DE Configurations menu
auto s = new GuiSettings("ES-DE CONFIGURATIONS");

HelpStyle style{getHelpStyle()};

// UI SETTINGS
ComponentListRow row;
row.addElement(std::make_shared<TextComponent>("UI SETTINGS",
Font::get(FONT_SIZE_MEDIUM), mMenuColorPrimary),
true);
row.addElement(mMenu.makeArrow(), false);
row.makeAcceptInputHandler([this] {
openUIOptions();
});
s->addRow(row);

// SOUND SETTINGS
row.elements.clear();
row.addElement(std::make_shared<TextComponent>("SOUND SETTINGS",
Font::get(FONT_SIZE_MEDIUM), mMenuColorPrimary),
true);
row.addElement(mMenu.makeArrow(), false);
row.makeAcceptInputHandler([this] {
openSoundOptions();
});
s->addRow(row);

// INPUT DEVICE SETTINGS
row.elements.clear();
row.addElement(std::make_shared<TextComponent>("INPUT DEVICE SETTINGS",
Font::get(FONT_SIZE_MEDIUM), mMenuColorPrimary),
true);
row.addElement(mMenu.makeArrow(), false);
row.makeAcceptInputHandler([this] {
openInputDeviceOptions();
});
s->addRow(row);

// OTHER SETTINGS
row.elements.clear();
row.addElement(std::make_shared<TextComponent>("OTHER SETTINGS",
Font::get(FONT_SIZE_MEDIUM), mMenuColorPrimary),
true);
row.addElement(mMenu.makeArrow(), false);
row.makeAcceptInputHandler([this] {
openOtherOptions();
});
s->addRow(row);

// Set the size and push the menu onto the GUI stack
s->setSize(mSize);
mWindow->pushGui(s);
}


void GuiMenu::openQuitMenu()
{
#if defined(__APPLE__) || defined(__ANDROID__)
Expand Down
1 change: 1 addition & 0 deletions es-app/src/guis/GuiMenu.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ class GuiMenu : public GuiComponent
void openCollectionSystemOptions();
void openOtherOptions();
void openRetroDeckConfigurator();
void openESDEConfiguration();
void openUtilities();
void openQuitMenu();

Expand Down
2 changes: 1 addition & 1 deletion es-de-module.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ modules:
sources:
- type: git
url: https://github.com/RetroDECK/ES-DE
branch: retrodeck-main
branch: feat/smaller-menu
- type: shell

# ES-DE - END
28 changes: 1 addition & 27 deletions manifest-header.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,32 +4,7 @@ runtime-version: "6.7"
sdk: org.kde.Sdk
sdk-extensions:
- org.freedesktop.Sdk.Extension.llvm18
command: retrodeck.sh

finish-args:
- --socket=wayland
- --socket=x11
- --socket=pulseaudio
- --share=ipc
- --share=network
- --device=all
- --filesystem=host
- --filesystem=home/.var/app/com.valvesoftware.Steam
- --allow=multiarch
- --talk-name=org.freedesktop.ScreenSaver
- --talk-name=org.freedesktop.PowerManagement.Inhibit
- --talk-name=org.freedesktop.login1.Manager
- --filesystem=xdg-run/app/com.discordapp.Discord:create
- --filesystem=xdg-config/gtk-3.0:ro
- --env=QT_QPA_PLATFORM=wayland;wayland-egl;xcb
- --allow=bluetooth
- --env=SDL_VIDEO_X11_WMCLASS=net.retrodeck.es-de
- --env=SDL_VIDEO_WAYLAND_WMCLASS=net.retrodeck.es-de
- --unset-env=QEMU_AUDIO_DRV
- --filesystem=xdg-data/Steam:rw
- --filesystem=~/.steam:rw
- --filesystem=~/.var/app/com.valvesoftware.Steam:rw
- --filesystem=xdg-run/gamescope-0:ro
command: /app/bin/es-de

cleanup:
- /include
Expand All @@ -48,7 +23,6 @@ cleanup:
- '*.la'
- /lib/debug
- /share/runtime
command: /app/bin/es-de

finish-args:
- --socket=wayland
Expand Down
210 changes: 0 additions & 210 deletions net.retrodeck.es-de.yml

This file was deleted.

0 comments on commit cac4e7c

Please sign in to comment.