Balancing & bugfixes
This commit is contained in:
@@ -34,6 +34,7 @@ public class PlacementFragment extends Fragment{
|
||||
ObjectMap<Category,Block> selectedBlocks = new ObjectMap<>();
|
||||
ObjectFloatMap<Category> scrollPositions = new ObjectFloatMap<>();
|
||||
Block menuHoverBlock;
|
||||
Displayable hover;
|
||||
Object lastDisplayState;
|
||||
boolean wasHovered;
|
||||
Table blockTable, toggler, topTable;
|
||||
@@ -262,7 +263,7 @@ public class PlacementFragment extends Fragment{
|
||||
top.add(new Table()).growX().update(topTable -> {
|
||||
|
||||
//find current hovered thing
|
||||
Displayable hovered = hovered();
|
||||
Displayable hovered = hover;
|
||||
Block displayBlock = menuHoverBlock != null ? menuHoverBlock : control.input.block;
|
||||
Object displayState = displayBlock != null ? displayBlock : hovered;
|
||||
boolean isHovered = displayBlock == null; //use hovered thing if displayblock is null
|
||||
@@ -430,7 +431,8 @@ public class PlacementFragment extends Fragment{
|
||||
}
|
||||
|
||||
boolean hasInfoBox(){
|
||||
return control.input.block != null || menuHoverBlock != null || hovered() != null;
|
||||
hover = hovered();
|
||||
return control.input.block != null || menuHoverBlock != null || hover != null;
|
||||
}
|
||||
|
||||
/** Returns the thing being hovered over. */
|
||||
@@ -451,7 +453,7 @@ public class PlacementFragment extends Fragment{
|
||||
if(hoverTile != null){
|
||||
//if the tile has a building, display it
|
||||
if(hoverTile.build != null){
|
||||
hoverTile.build.updateFlow(true);
|
||||
hoverTile.build.updateFlow = true;
|
||||
return hoverTile.build;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user