Skip to content

Commit

Permalink
minor: acceptInput -> saveSettings to avoid confusion
Browse files Browse the repository at this point in the history
  • Loading branch information
y5nw committed Sep 12, 2024
1 parent be6f829 commit eb96efe
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/gui/guiKeyChangeMenu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ static const std::vector<setting_entry> control_settings {
void GUIKeyChangeMenu::KeyChangeFormspecHandler::gotText(const StringMap &fields)
{
if (fields.find("btn_save") != fields.end()) {
form->acceptInput();
form->saveSettings();
return;
}
if (fields.find("btn_cancel") != fields.end())
Expand Down Expand Up @@ -187,7 +187,7 @@ void GUIKeyChangeMenu::updateFormSource(const std::string &message)
setFormSource(form_src);
}

void GUIKeyChangeMenu::acceptInput()
void GUIKeyChangeMenu::saveSettings()
{
for (const auto &setting: keymap)
g_settings->set(setting.first, setting.second.sym());
Expand Down
2 changes: 1 addition & 1 deletion src/gui/guiKeyChangeMenu.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class GUIKeyChangeMenu : public GUIFormSpecMenu
guienv->setFocus(this);
}

void acceptInput();
void saveSettings();

bool OnEvent(const SEvent &event);

Expand Down

0 comments on commit eb96efe

Please sign in to comment.