From b01bccc8d642105763d5d98f4df54790050024db Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Sat, 13 Jun 2020 10:48:46 +0200 Subject: [PATCH] Added Apply and Cancel buttons to the game options menu. --- es-app/src/guis/GuiGamelistOptions.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/es-app/src/guis/GuiGamelistOptions.cpp b/es-app/src/guis/GuiGamelistOptions.cpp index a600c1aea..b48e281b1 100644 --- a/es-app/src/guis/GuiGamelistOptions.cpp +++ b/es-app/src/guis/GuiGamelistOptions.cpp @@ -136,6 +136,10 @@ GuiGamelistOptions::GuiGamelistOptions( mMenu.addRow(row); } + // Buttons. Logic to apply or cancel settings are handled by the destructor. + mMenu.addButton("APPLY", "apply", [&] { delete this; }); + mMenu.addButton("CANCEL", "cancel", [&] { mCancelled = true; delete this; }); + // Center the menu. setSize((float)Renderer::getScreenWidth(), (float)Renderer::getScreenHeight()); mMenu.setPosition((mSize.x() - mMenu.getSize().x()) / 2, (mSize.y() -