Fixed #7829
This commit is contained in:
@@ -142,7 +142,8 @@ public class TypeIO{
|
|||||||
case 5 -> content.getByID(ContentType.all[read.b()], read.s());
|
case 5 -> content.getByID(ContentType.all[read.b()], read.s());
|
||||||
case 6 -> {
|
case 6 -> {
|
||||||
short length = read.s();
|
short length = read.s();
|
||||||
IntSeq arr = new IntSeq(); for(int i = 0; i < length; i ++) arr.add(read.i());
|
IntSeq arr = new IntSeq(length);
|
||||||
|
for(int i = 0; i < length; i ++) arr.add(read.i());
|
||||||
yield arr;
|
yield arr;
|
||||||
}
|
}
|
||||||
case 7 -> new Point2(read.i(), read.i());
|
case 7 -> new Point2(read.i(), read.i());
|
||||||
|
|||||||
@@ -93,21 +93,11 @@ public class ResearchDialog extends BaseDialog{
|
|||||||
|
|
||||||
shouldPause = true;
|
shouldPause = true;
|
||||||
|
|
||||||
Runnable checkMargin = () -> {
|
onResize(this::checkMargin);
|
||||||
if(Core.graphics.isPortrait() && showTechSelect){
|
|
||||||
itemDisplay.marginTop(60f);
|
|
||||||
}else{
|
|
||||||
itemDisplay.marginTop(0f);
|
|
||||||
}
|
|
||||||
itemDisplay.invalidate();
|
|
||||||
itemDisplay.layout();
|
|
||||||
};
|
|
||||||
|
|
||||||
onResize(checkMargin);
|
|
||||||
|
|
||||||
shown(() -> {
|
shown(() -> {
|
||||||
checkMargin.run();
|
checkMargin();
|
||||||
Core.app.post(checkMargin);
|
Core.app.post(this::checkMargin);
|
||||||
|
|
||||||
Planet currPlanet = ui.planet.isShown() ?
|
Planet currPlanet = ui.planet.isShown() ?
|
||||||
ui.planet.state.planet :
|
ui.planet.state.planet :
|
||||||
@@ -187,6 +177,16 @@ public class ResearchDialog extends BaseDialog{
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void checkMargin(){
|
||||||
|
if(Core.graphics.isPortrait() && showTechSelect){
|
||||||
|
itemDisplay.marginTop(60f);
|
||||||
|
}else{
|
||||||
|
itemDisplay.marginTop(0f);
|
||||||
|
}
|
||||||
|
itemDisplay.invalidate();
|
||||||
|
itemDisplay.layout();
|
||||||
|
}
|
||||||
|
|
||||||
public void rebuildItems(){
|
public void rebuildItems(){
|
||||||
items = new ItemSeq(){
|
items = new ItemSeq(){
|
||||||
//store sector item amounts for modifications
|
//store sector item amounts for modifications
|
||||||
@@ -698,6 +698,10 @@ public class ResearchDialog extends BaseDialog{
|
|||||||
}
|
}
|
||||||
|
|
||||||
addChild(infoTable);
|
addChild(infoTable);
|
||||||
|
|
||||||
|
checkMargin();
|
||||||
|
Core.app.post(() -> checkMargin());
|
||||||
|
|
||||||
infoTable.pack();
|
infoTable.pack();
|
||||||
infoTable.act(Core.graphics.getDeltaTime());
|
infoTable.act(Core.graphics.getDeltaTime());
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user