Allows for different Pixels/Area (#6562)

* Allows for different Pixels/Area

Spent the entire day asking people if they knew of any mod that change would break, the answer is negative

modders, if you want the screen to take the entire space, remove both the -4

* ScaleFactor so it doesnt break existing mods

scale = (size * 32 - bordersize / 2) / displaySize

* facepalm

* Update LogicDisplay.java

why am i dumb every time i do changes on the fly

* Update LogicDisplay.java
This commit is contained in:
hortiSquash
2022-02-09 00:02:59 +01:00
committed by GitHub
parent 6a053f2f45
commit 761b357e46

View File

@@ -29,6 +29,7 @@ public class LogicDisplay extends Block{
public int maxSides = 25;
public int displaySize = 64;
public float scaleFactor = 1f;
public LogicDisplay(String name){
super(name);
@@ -102,7 +103,7 @@ public class LogicDisplay extends Block{
Draw.blend(Blending.disabled);
Draw.draw(Draw.z(), () -> {
if(buffer != null){
Draw.rect(Draw.wrap(buffer.getTexture()), x, y, buffer.getWidth() * Draw.scl, -buffer.getHeight() * Draw.scl);
Draw.rect(Draw.wrap(buffer.getTexture()), x, y, buffer.getWidth() * scaleFactor * Draw.scl, -buffer.getHeight() * scaleFactor * Draw.scl);
}
});
Draw.blend();