Fixed screenshot key firing when chat open

This commit is contained in:
Anuken
2018-11-28 20:30:34 -05:00
parent f3d35e9537
commit 22aeddc655
2 changed files with 1 additions and 22 deletions

View File

@@ -372,7 +372,7 @@ public class Control extends Module{
}
}
if(Inputs.keyTap("screenshot")){
if(Inputs.keyTap("screenshot") && !ui.chatfrag.chatOpen()){
renderer.takeMapScreenshot();
}

View File

@@ -1,8 +1,6 @@
package io.anuke.mindustry.game;
import com.badlogic.gdx.utils.Array;
import com.badlogic.gdx.utils.ObjectMap;
import com.badlogic.gdx.utils.ObjectMap.Entry;
import com.badlogic.gdx.utils.ObjectSet;
import io.anuke.mindustry.game.EventType.UnlockEvent;
import io.anuke.mindustry.type.ContentType;
@@ -67,27 +65,8 @@ public class Unlocks{
save();
}
/**Loads 'legacy' unlocks. Will be removed in final release.*/
public void tryLoadLegacy(){
try{
ObjectMap<String, ObjectMap<ContentType, Array<String>>> sets = Settings.getObject("content-sets", ObjectMap.class, ObjectMap::new);
for(Entry<ContentType, Array<String>> entry : sets.get("root").entries()){
unlocked.put(entry.key, new ObjectSet<>());
unlocked.get(entry.key).addAll(entry.value);
}
}catch(Throwable t){
t.printStackTrace();
}
Settings.prefs().remove("content-sets");
Settings.save();
}
public void load(){
unlocked = Settings.getObject("unlockset", ObjectMap.class, ObjectMap::new);
if(Settings.has("content-sets")){
tryLoadLegacy();
}
}
public void save(){