Mod browser layout fixes
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -43,6 +43,7 @@ ios/robovm.properties
|
|||||||
packr-out/
|
packr-out/
|
||||||
config/
|
config/
|
||||||
*.gif
|
*.gif
|
||||||
|
/tests/out
|
||||||
|
|
||||||
/core/assets/basepartnames
|
/core/assets/basepartnames
|
||||||
version.properties
|
version.properties
|
||||||
|
|||||||
@@ -37,8 +37,9 @@ public class PhysicsProcess implements AsyncProcess{
|
|||||||
|
|
||||||
//find Unit without bodies and assign them
|
//find Unit without bodies and assign them
|
||||||
for(Unit entity : group){
|
for(Unit entity : group){
|
||||||
|
if(entity.type == null) continue;
|
||||||
|
|
||||||
if(entity.physref() == null){
|
if(entity.physref == null){
|
||||||
PhysicsBody body = new PhysicsBody();
|
PhysicsBody body = new PhysicsBody();
|
||||||
body.x = entity.x();
|
body.x = entity.x();
|
||||||
body.y = entity.y();
|
body.y = entity.y();
|
||||||
@@ -48,13 +49,13 @@ public class PhysicsProcess implements AsyncProcess{
|
|||||||
PhysicRef ref = new PhysicRef(entity, body);
|
PhysicRef ref = new PhysicRef(entity, body);
|
||||||
refs.add(ref);
|
refs.add(ref);
|
||||||
|
|
||||||
entity.physref(ref);
|
entity.physref = ref;
|
||||||
|
|
||||||
physics.add(body);
|
physics.add(body);
|
||||||
}
|
}
|
||||||
|
|
||||||
//save last position
|
//save last position
|
||||||
PhysicRef ref = entity.physref();
|
PhysicRef ref = entity.physref;
|
||||||
|
|
||||||
ref.body.layer =
|
ref.body.layer =
|
||||||
entity.type.allowLegStep ? layerLegs :
|
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
|
//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 the mod is explicitly marked as java, try loading it anyway
|
||||||
if((mainFile.exists() || meta.java) &&
|
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){
|
if(ios){
|
||||||
throw new IllegalArgumentException("Java class mods are not supported on iOS.");
|
throw new IllegalArgumentException("Java class mods are not supported on iOS.");
|
||||||
|
|||||||
@@ -385,7 +385,7 @@ public class ModsDialog extends BaseDialog{
|
|||||||
|
|
||||||
}).tooltip(c.localizedName);
|
}).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();
|
}).grow();
|
||||||
d.addCloseButton();
|
d.addCloseButton();
|
||||||
@@ -408,7 +408,7 @@ public class ModsDialog extends BaseDialog{
|
|||||||
browserTable.clear();
|
browserTable.clear();
|
||||||
browserTable.add("@loading");
|
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 -> {
|
getModList(rlistings -> {
|
||||||
browserTable.clear();
|
browserTable.clear();
|
||||||
|
|||||||
Reference in New Issue
Block a user