1
0
mirror of https://github.com/Anuken/Mindustry.git synced 2024-09-19 20:37:28 +03:00

Dont configure if not needed (#5745)

* Dont configure if not needed

* fix
This commit is contained in:
buthed010203 2021-08-11 17:23:34 -04:00 committed by GitHub
parent 4fc18d35ce
commit fa9257182b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -92,7 +92,9 @@ public class MessageBlock extends Block{
text = message.toString();
multiline = true;
maxLength = maxTextLength;
accepted = str -> configure(str);
accepted = str -> {
if(!str.equals(text)) configure(str);
};
}});
}else{
BaseDialog dialog = new BaseDialog("@editmessage");
@ -112,7 +114,7 @@ public class MessageBlock extends Block{
});
a.setMaxLength(maxTextLength);
dialog.buttons.button("@ok", () -> {
configure(a.getText());
if(!a.getText().equals(message.toString())) configure(a.getText());
dialog.hide();
}).size(130f, 60f);
dialog.update(() -> {