UI fixes; fixed conveyor infinite item pileup
This commit is contained in:
@@ -48,7 +48,8 @@ io.anuke.ucore.scene.ui.ImageTextButton$ImageTextButtonStyle: {
|
|||||||
toggle: {checked: button-down, down: button-down, up: button, font: default-font, fontColor: white, over: button-over, disabled: button, disabledFontColor: grey }
|
toggle: {checked: button-down, down: button-down, up: button, font: default-font, fontColor: white, over: button-over, disabled: button, disabledFontColor: grey }
|
||||||
},
|
},
|
||||||
io.anuke.ucore.scene.ui.ScrollPane$ScrollPaneStyle: {
|
io.anuke.ucore.scene.ui.ScrollPane$ScrollPaneStyle: {
|
||||||
default: {background: border, vScroll: scroll, vScrollKnob: scroll-knob-vertical}
|
default: {background: border, vScroll: scroll, vScrollKnob: scroll-knob-vertical},
|
||||||
|
clear: {vScroll: scroll, vScrollKnob: scroll-knob-vertical}
|
||||||
},
|
},
|
||||||
io.anuke.ucore.scene.ui.Window$WindowStyle: {
|
io.anuke.ucore.scene.ui.Window$WindowStyle: {
|
||||||
default: {titleFont: default-font, background: window, titleFontColor: orange },
|
default: {titleFont: default-font, background: window, titleFontColor: orange },
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ import io.anuke.ucore.util.*;
|
|||||||
public class Renderer extends RendererModule{
|
public class Renderer extends RendererModule{
|
||||||
String[] surfaces = { "shadow", "shield", "pixel", "indicators" };
|
String[] surfaces = { "shadow", "shield", "pixel", "indicators" };
|
||||||
int targetscale = baseCameraScale;
|
int targetscale = baseCameraScale;
|
||||||
int chunksize = 32;
|
int chunksize = 16;
|
||||||
int[][][] cache;
|
int[][][] cache;
|
||||||
FloatArray shieldHits = new FloatArray();
|
FloatArray shieldHits = new FloatArray();
|
||||||
float shieldHitDuration = 18f;
|
float shieldHitDuration = 18f;
|
||||||
|
|||||||
@@ -171,23 +171,29 @@ public class BlocksFragment implements Fragment{
|
|||||||
GameState.set(State.paused);
|
GameState.set(State.paused);
|
||||||
|
|
||||||
FloatingDialog d = new FloatingDialog("Block Info");
|
FloatingDialog d = new FloatingDialog("Block Info");
|
||||||
|
Table table = new Table();
|
||||||
|
table.defaults().pad(1f).units(Unit.dp);
|
||||||
|
ScrollPane pane = new ScrollPane(table, "clear");
|
||||||
|
pane.setFadeScrollBars(false);
|
||||||
Table top = new Table();
|
Table top = new Table();
|
||||||
top.left();
|
top.left();
|
||||||
top.add(new Image(Draw.region(recipe.result.name))).size(8*5 * recipe.result.width).units(Unit.dp);
|
top.add(new Image(Draw.region(recipe.result.name))).size(8*5 * recipe.result.width).units(Unit.dp);
|
||||||
top.add("[orange]"+recipe.result.formalName).padLeft(6f).units(Unit.dp);
|
top.add("[orange]"+recipe.result.formalName).padLeft(6f).units(Unit.dp);
|
||||||
d.content().add(top).fill().left();
|
table.add(top).fill().left();
|
||||||
d.content().row();
|
table.row();
|
||||||
d.content().add(desclabel).width(600).units(Unit.dp);
|
table.add(desclabel).width(600).units(Unit.dp);
|
||||||
d.content().row();
|
table.row();
|
||||||
|
|
||||||
|
d.content().add(pane).grow();
|
||||||
|
|
||||||
if(statlist.size > 0){
|
if(statlist.size > 0){
|
||||||
d.content().add("[coral][[extra block info]:").padTop(6).padBottom(5).left();
|
table.add("[coral][[extra block info]:").padTop(6).padBottom(5).left();
|
||||||
d.content().row();
|
table.row();
|
||||||
}
|
}
|
||||||
|
|
||||||
for(String s : statlist){
|
for(String s : statlist){
|
||||||
d.content().add(s).left();
|
table.add(s).left();
|
||||||
d.content().row();
|
table.row();
|
||||||
}
|
}
|
||||||
|
|
||||||
d.buttons().addButton("OK", ()->{
|
d.buttons().addButton("OK", ()->{
|
||||||
|
|||||||
@@ -120,7 +120,7 @@ public class Conveyor extends Block{
|
|||||||
int direction = source == null ? 0 : Math.abs(source.relativeTo(dest.x, dest.y) - dest.getRotation());
|
int direction = source == null ? 0 : Math.abs(source.relativeTo(dest.x, dest.y) - dest.getRotation());
|
||||||
float minitem = dest.<ConveyorEntity>entity().minitem;
|
float minitem = dest.<ConveyorEntity>entity().minitem;
|
||||||
return ((direction == 0) && minitem > 0.05f) ||
|
return ((direction == 0) && minitem > 0.05f) ||
|
||||||
((direction %2 == 1) && minitem > 0.5f);
|
((direction %2 == 1) && minitem > 0.52f);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
Binary file not shown.
@@ -17,7 +17,7 @@ public class DesktopLauncher {
|
|||||||
Lwjgl3ApplicationConfiguration config = new Lwjgl3ApplicationConfiguration();
|
Lwjgl3ApplicationConfiguration config = new Lwjgl3ApplicationConfiguration();
|
||||||
config.setTitle("Mindustry");
|
config.setTitle("Mindustry");
|
||||||
config.setMaximized(true);
|
config.setMaximized(true);
|
||||||
config.useVsync(false);
|
//config.useVsync(false);
|
||||||
config.setWindowedMode(800, 600);
|
config.setWindowedMode(800, 600);
|
||||||
config.setWindowIcon("sprites/icon.png");
|
config.setWindowIcon("sprites/icon.png");
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user