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:
parent
4fc18d35ce
commit
fa9257182b
@ -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(() -> {
|
||||
|
Loading…
Reference in New Issue
Block a user