Fix android station missing widgets
This commit is contained in:
parent
95a96c35ca
commit
c45435a6b0
@ -112,6 +112,9 @@ public class AndroidStationScreen extends MatteryScreen<AndroidStationMenu> impl
|
||||
@Override
|
||||
protected FramePanel makeMainFrame() {
|
||||
var frame = new FramePanel(this, null, 0, 0, FRAME_WIDTH, FRAME_HEIGHT, getTitle());
|
||||
|
||||
autoAttachToFrame(frame);
|
||||
|
||||
var grid = new GridPanel(this, frame, 0, 0, GRID_WIDTH * 18, 0, GRID_WIDTH, GRID_HEIGHT);
|
||||
|
||||
minecraft.player.getCapability(MatteryCapability.ANDROID).ifPresent(_cap -> {
|
||||
|
@ -157,11 +157,17 @@ public abstract class MatteryScreen<T extends MatteryMenu> extends AbstractConta
|
||||
protected FramePanel makeMainFrame() {
|
||||
var frame = new FramePanel(this, null, 0, 0, 18 * 9 + 16, 100, getTitle());
|
||||
|
||||
autoAttachToFrame(frame);
|
||||
|
||||
return frame;
|
||||
}
|
||||
|
||||
protected void autoAttachToFrame(FramePanel frame) {
|
||||
if (this instanceof IMatteryScreenLeftPanel) {
|
||||
var reserve = new EditablePanel(this, frame, 0, 0, 0, 0);
|
||||
reserve.setDock(Dock.LEFT);
|
||||
|
||||
float available_height = 90;
|
||||
float available_height = frame.getHeight() - 14;
|
||||
|
||||
if (this instanceof IMatteryScreenGaugeGetter gauges) {
|
||||
float width = 0;
|
||||
@ -213,8 +219,6 @@ public abstract class MatteryScreen<T extends MatteryMenu> extends AbstractConta
|
||||
|
||||
grid_based.createGridPanels(grid);
|
||||
}
|
||||
|
||||
return frame;
|
||||
}
|
||||
|
||||
public ItemRenderer getItemRenderer() {
|
||||
|
Loading…
Reference in New Issue
Block a user