@Override public void contentHiding(ActionFireable actionFireable, AbstractContentProvider nextContent) { uiContentUpdater.stop(); if (activeBuilding != null) { actionFireable.fireAction(new ShowConstructionMarksAction(null)); } } }
public BuildingButton(EBuildingType buildingType) { super(new ShowConstructionMarksAction(buildingType), null, null, Labels.getName(buildingType)); this.buildingType = buildingType; buildingImageLink = buildingType.getGuiImage(); addChild(constructedLabel, 0.05f, 0.05f, .95f, .95f); }
@Override public IAction catchAction(IAction action) { if ((action.getActionType() == EActionType.MOVE_TO || action.getActionType() == EActionType.ABORT) && activeBuilding != null) { action = new ShowConstructionMarksAction(null); } if (action.getActionType() == EActionType.SHOW_CONSTRUCTION_MARK) { setActiveBuilding(((ShowConstructionMarksAction) action).getBuildingType()); } return super.catchAction(action); }