Added Apply and Cancel buttons to the game options menu.

This commit is contained in:
Leon Styhre 2020-06-13 10:48:46 +02:00
parent f1f82ac29f
commit b01bccc8d6

View file

@ -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() -