Mod browser layout fixes
This commit is contained in:
@@ -37,8 +37,9 @@ public class PhysicsProcess implements AsyncProcess{
|
||||
|
||||
//find Unit without bodies and assign them
|
||||
for(Unit entity : group){
|
||||
if(entity.type == null) continue;
|
||||
|
||||
if(entity.physref() == null){
|
||||
if(entity.physref == null){
|
||||
PhysicsBody body = new PhysicsBody();
|
||||
body.x = entity.x();
|
||||
body.y = entity.y();
|
||||
@@ -48,13 +49,13 @@ public class PhysicsProcess implements AsyncProcess{
|
||||
PhysicRef ref = new PhysicRef(entity, body);
|
||||
refs.add(ref);
|
||||
|
||||
entity.physref(ref);
|
||||
entity.physref = ref;
|
||||
|
||||
physics.add(body);
|
||||
}
|
||||
|
||||
//save last position
|
||||
PhysicRef ref = entity.physref();
|
||||
PhysicRef ref = entity.physref;
|
||||
|
||||
ref.body.layer =
|
||||
entity.type.allowLegStep ? layerLegs :
|
||||
|
||||
@@ -681,7 +681,7 @@ public class Mods implements Loadable{
|
||||
//make sure the main class exists before loading it; if it doesn't just don't put it there
|
||||
//if the mod is explicitly marked as java, try loading it anyway
|
||||
if((mainFile.exists() || meta.java) &&
|
||||
Core.settings.getBool("mod-" + baseName + "-enabled", true) && Version.isAtLeast(meta.minGameVersion) && meta.getMinMajor() >= 105){
|
||||
Core.settings.getBool("mod-" + baseName + "-enabled", true) && Version.isAtLeast(meta.minGameVersion) && (meta.getMinMajor() >= 105 || headless)){
|
||||
|
||||
if(ios){
|
||||
throw new IllegalArgumentException("Java class mods are not supported on iOS.");
|
||||
|
||||
@@ -385,7 +385,7 @@ public class ModsDialog extends BaseDialog{
|
||||
|
||||
}).tooltip(c.localizedName);
|
||||
|
||||
if(++i % Math.min(Core.graphics.getWidth() / 70, 14) == 0) cs.row();
|
||||
if(++i % Math.min(Core.graphics.getWidth() / Scl.scl(70), 14) == 0) cs.row();
|
||||
}
|
||||
}).grow();
|
||||
d.addCloseButton();
|
||||
@@ -408,7 +408,7 @@ public class ModsDialog extends BaseDialog{
|
||||
browserTable.clear();
|
||||
browserTable.add("@loading");
|
||||
|
||||
int cols = Math.max(Core.graphics.getWidth() / 482, 1);
|
||||
int cols = (int)Math.max(Core.graphics.getWidth() / Scl.scl(482), 1);
|
||||
|
||||
getModList(rlistings -> {
|
||||
browserTable.clear();
|
||||
|
||||
Reference in New Issue
Block a user