mirror of
https://github.com/Anuken/Mindustry.git
synced 2026-04-27 16:00:51 -07:00
Join dialog performance improvement
This commit is contained in:
parent
a6f2aa6c43
commit
b7485b5bc4
2 changed files with 12 additions and 1 deletions
|
|
@ -1,6 +1,7 @@
|
|||
package mindustry.ui.dialogs;
|
||||
|
||||
import arc.*;
|
||||
import arc.freetype.FreeTypeFontGenerator.*;
|
||||
import arc.graphics.*;
|
||||
import arc.input.*;
|
||||
import arc.math.*;
|
||||
|
|
@ -35,6 +36,7 @@ public class JoinDialog extends BaseDialog{
|
|||
int refreshes;
|
||||
boolean showHidden;
|
||||
TextButtonStyle style;
|
||||
Task fontIgnoreDirtyTask;
|
||||
|
||||
String lastIp;
|
||||
int lastPort, lastColumns = -1;
|
||||
|
|
@ -413,6 +415,15 @@ public class JoinDialog extends BaseDialog{
|
|||
net.pingHost(resaddress, resport, res -> {
|
||||
if(refreshes != cur) return;
|
||||
|
||||
//don't recache the texture for a while
|
||||
if(fontIgnoreDirtyTask == null){
|
||||
FreeTypeFontData.ignoreDirty = true;
|
||||
fontIgnoreDirtyTask = Time.runTask(60f, () -> {
|
||||
FreeTypeFontData.ignoreDirty = false;
|
||||
fontIgnoreDirtyTask = null;
|
||||
});
|
||||
}
|
||||
|
||||
if(!serverSearch.isEmpty() && !(group.name.toLowerCase().contains(serverSearch)
|
||||
|| res.name.toLowerCase().contains(serverSearch)
|
||||
|| res.description.toLowerCase().contains(serverSearch)
|
||||
|
|
|
|||
|
|
@ -25,4 +25,4 @@ org.gradle.caching=true
|
|||
#used for slow jitpack builds; TODO see if this actually works
|
||||
org.gradle.internal.http.socketTimeout=100000
|
||||
org.gradle.internal.http.connectionTimeout=100000
|
||||
archash=7a2f8eada1
|
||||
archash=5bbfaf2ad9
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue