Here are the examples of the java api com.github.chainmailstudios.astromine.common.widget.blade.TransferTypeSelectorButtonWidget.setRotation() taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.
1 Examples
0
Source : WidgetUtilities.java
with MIT License
from Mixinors
with MIT License
from Mixinors
public static void createTransferTab(TabWidgetCollection tab, Position anchor, Direction rotation, BlockEnreplacedyTransferComponent component, BlockPos blockPos, ComponentType<?> type) {
final Position finalNorth = Position.of(anchor, 7 + 22, 31 + 22);
final Position finalSouth = Position.of(anchor, 7 + 0, 31 + 44);
final Position finalUp = Position.of(anchor, 7 + 22, 31 + 0);
final Position finalDown = Position.of(anchor, 7 + 22, 31 + 44);
final Position finalWest = Position.of(anchor, 7 + 44, 31 + 22);
final Position finalEast = Position.of(anchor, 7 + 0, 31 + 22);
final ImmutableMap<Direction, Position> positions = ImmutableMap.<Direction, Position>builder().put(Direction.NORTH, finalNorth).put(Direction.SOUTH, finalSouth).put(Direction.WEST, finalWest).put(Direction.EAST, finalEast).put(Direction.UP, finalUp).put(Direction.DOWN, finalDown).build();
for (Direction direction : Direction.values()) {
TransferTypeSelectorButtonWidget button = new TransferTypeSelectorButtonWidget();
button.setPosition(positions.get(MirrorUtilities.rotate(direction, rotation)));
button.setSize(Size.of(18, 18));
button.setComponent(component);
button.setType(type);
button.setRotation(rotation);
button.setDirection(direction);
button.setBlockPos(blockPos);
tab.addWidget(button);
}
}