Black background for android research "tree"
This commit is contained in:
parent
27945b62dc
commit
a5af0a4a00
@ -1,5 +1,6 @@
|
|||||||
package ru.dbotthepony.mc.otm.screen;
|
package ru.dbotthepony.mc.otm.screen;
|
||||||
|
|
||||||
|
import com.mojang.blaze3d.systems.RenderSystem;
|
||||||
import com.mojang.blaze3d.vertex.PoseStack;
|
import com.mojang.blaze3d.vertex.PoseStack;
|
||||||
import net.minecraft.ChatFormatting;
|
import net.minecraft.ChatFormatting;
|
||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
@ -115,7 +116,13 @@ public class AndroidStationScreen extends MatteryScreen<AndroidStationMenu> impl
|
|||||||
|
|
||||||
autoAttachToFrame(frame);
|
autoAttachToFrame(frame);
|
||||||
|
|
||||||
var canvas = new DraggableCanvasPanel(this, frame, 0, 0, GRID_WIDTH * 22, 0);
|
var canvas = new DraggableCanvasPanel(this, frame, 0, 0, GRID_WIDTH * 22, 0) {
|
||||||
|
@Override
|
||||||
|
protected void innerRender(PoseStack stack, float mouse_x, float mouse_y, float flag) {
|
||||||
|
RenderHelper.setDrawColor(RGBAColor.BLACK);
|
||||||
|
RenderHelper.drawRect(stack, 0, 0, width, height);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
var grid = new GridPanel(this, canvas, 0, 0, 0, 0, GRID_WIDTH, GRID_HEIGHT) {
|
var grid = new GridPanel(this, canvas, 0, 0, 0, 0, GRID_WIDTH, GRID_HEIGHT) {
|
||||||
@Override
|
@Override
|
||||||
|
@ -10,6 +10,9 @@ public record RGBAColor(float r, float g, float b, float a) {
|
|||||||
this.a = a;
|
this.a = a;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static final RGBAColor BLACK = new RGBAColor(0, 0, 0, 1f);
|
||||||
|
public static final RGBAColor WHITE = new RGBAColor(1f, 1f, 1f, 1f);
|
||||||
|
|
||||||
public RGBAColor(int r, int g, int b) {
|
public RGBAColor(int r, int g, int b) {
|
||||||
this(r / 255F, g / 255F, b / 255F, 1F);
|
this(r / 255F, g / 255F, b / 255F, 1F);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user