use of com.simibubi.create.foundation.gui.AllIcons in project Create by Creators-of-Create.
the class SchematicannonScreen method initPlacementSettings.
private void initPlacementSettings() {
removeWidgets(placementSettingWidgets);
placementSettingWidgets.clear();
if (placementSettingsHidden())
return;
int x = leftPos;
int y = topPos;
// Replace settings
replaceLevelButtons = new Vector<>(4);
replaceLevelIndicators = new Vector<>(4);
List<AllIcons> icons = ImmutableList.of(AllIcons.I_DONT_REPLACE, AllIcons.I_REPLACE_SOLID, AllIcons.I_REPLACE_ANY, AllIcons.I_REPLACE_EMPTY);
List<Component> toolTips = ImmutableList.of(Lang.translate("gui.schematicannon.option.dontReplaceSolid"), Lang.translate("gui.schematicannon.option.replaceWithSolid"), Lang.translate("gui.schematicannon.option.replaceWithAny"), Lang.translate("gui.schematicannon.option.replaceWithEmpty"));
for (int i = 0; i < 4; i++) {
replaceLevelIndicators.add(new Indicator(x + 33 + i * 18, y + 111, TextComponent.EMPTY));
IconButton replaceLevelButton = new IconButton(x + 33 + i * 18, y + 117, icons.get(i));
int replaceMode = i;
replaceLevelButton.withCallback(() -> {
if (menu.contentHolder.replaceMode != replaceMode)
sendOptionUpdate(Option.values()[replaceMode], true);
});
replaceLevelButton.setToolTip(toolTips.get(i));
replaceLevelButtons.add(replaceLevelButton);
}
placementSettingWidgets.addAll(replaceLevelButtons);
placementSettingWidgets.addAll(replaceLevelIndicators);
// Other Settings
skipMissingButton = new IconButton(x + 111, y + 117, AllIcons.I_SKIP_MISSING);
skipMissingButton.withCallback(() -> {
sendOptionUpdate(Option.SKIP_MISSING, !menu.contentHolder.skipMissing);
});
skipMissingButton.setToolTip(Lang.translate("gui.schematicannon.option.skipMissing"));
skipMissingIndicator = new Indicator(x + 111, y + 111, TextComponent.EMPTY);
Collections.addAll(placementSettingWidgets, skipMissingButton, skipMissingIndicator);
skipTilesButton = new IconButton(x + 129, y + 117, AllIcons.I_SKIP_TILES);
skipTilesButton.withCallback(() -> {
sendOptionUpdate(Option.SKIP_TILES, !menu.contentHolder.replaceTileEntities);
});
skipTilesButton.setToolTip(Lang.translate("gui.schematicannon.option.skipTileEntities"));
skipTilesIndicator = new Indicator(x + 129, y + 111, TextComponent.EMPTY);
Collections.addAll(placementSettingWidgets, skipTilesButton, skipTilesIndicator);
addRenderableWidgets(placementSettingWidgets);
}
Aggregations