Fixed #7829
This commit is contained in:
@@ -93,21 +93,11 @@ public class ResearchDialog extends BaseDialog{
|
||||
|
||||
shouldPause = true;
|
||||
|
||||
Runnable checkMargin = () -> {
|
||||
if(Core.graphics.isPortrait() && showTechSelect){
|
||||
itemDisplay.marginTop(60f);
|
||||
}else{
|
||||
itemDisplay.marginTop(0f);
|
||||
}
|
||||
itemDisplay.invalidate();
|
||||
itemDisplay.layout();
|
||||
};
|
||||
|
||||
onResize(checkMargin);
|
||||
onResize(this::checkMargin);
|
||||
|
||||
shown(() -> {
|
||||
checkMargin.run();
|
||||
Core.app.post(checkMargin);
|
||||
checkMargin();
|
||||
Core.app.post(this::checkMargin);
|
||||
|
||||
Planet currPlanet = ui.planet.isShown() ?
|
||||
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(){
|
||||
items = new ItemSeq(){
|
||||
//store sector item amounts for modifications
|
||||
@@ -698,6 +698,10 @@ public class ResearchDialog extends BaseDialog{
|
||||
}
|
||||
|
||||
addChild(infoTable);
|
||||
|
||||
checkMargin();
|
||||
Core.app.post(() -> checkMargin());
|
||||
|
||||
infoTable.pack();
|
||||
infoTable.act(Core.graphics.getDeltaTime());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user