Skip to content
This repository has been archived by the owner on Jan 20, 2025. It is now read-only.

Commit

Permalink
fixed motdManagement
Browse files Browse the repository at this point in the history
  • Loading branch information
engsr6982 committed Apr 23, 2024
1 parent da0534b commit 06043e7
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions src/Form/function/MotdManagement.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ void EditMotd(Player& player, int index) {

motd::motd_list[index] = value;

motd::saveMotd();
showMotd(pl, index);
});
}
Expand All @@ -55,13 +56,22 @@ void showMotd(Player& player, int index) {

fm.appendButton("Edit"_tr(), [index](Player& pl) { EditMotd(pl, index); });

fm.appendButton("Move Up"_tr(), [index](Player&) { moveVectorItem(MoveUp, index); });
fm.appendButton("Move Up"_tr(), [index](Player& pl) {
moveVectorItem(MoveUp, index);
motd::saveMotd();
motdManagement(pl);
});

fm.appendButton("Move Down"_tr(), [index](Player&) { moveVectorItem(MoveDown, index); });
fm.appendButton("Move Down"_tr(), [index](Player& pl) {
moveVectorItem(MoveDown, index);
motd::saveMotd();
motdManagement(pl);
});

fm.appendButton("Delete"_tr(), [index](Player&) {
fm.appendButton("Delete"_tr(), [index](Player& pl) {
motd::motd_list.erase(motd::motd_list.begin() + index);
motd::saveMotd();
motdManagement(pl);
});

fm.appendButton("Return"_tr(), [](Player& pl) { motdManagement(pl); });
Expand Down

0 comments on commit 06043e7

Please sign in to comment.