Black background for android research "tree"

This commit is contained in:
DBotThePony 2021-08-24 21:25:06 +07:00
parent 27945b62dc
commit a5af0a4a00
Signed by: DBot
GPG Key ID: DCC23B5715498507
2 changed files with 11 additions and 1 deletions

View File

@ -1,5 +1,6 @@
package ru.dbotthepony.mc.otm.screen;
import com.mojang.blaze3d.systems.RenderSystem;
import com.mojang.blaze3d.vertex.PoseStack;
import net.minecraft.ChatFormatting;
import net.minecraft.client.Minecraft;
@ -115,7 +116,13 @@ public class AndroidStationScreen extends MatteryScreen<AndroidStationMenu> impl
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) {
@Override

View File

@ -10,6 +10,9 @@ public record RGBAColor(float r, float g, float b, float 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) {
this(r / 255F, g / 255F, b / 255F, 1F);
}