use of eidolons.game.module.adventure.gui.map.obj.PartyComp in project Eidolons by IDemiurge.
the class MapComp method refresh.
public void refresh() {
// re-evaluate available Routes
getComp().removeAll();
G_Panel backgroundComp = getBackgroundComp();
// ++ border of sorts?
getComp().add(backgroundComp);
if (listener != null) {
backgroundComp.addMouseListener(listener);
}
index = 0;
if (playerPartyComp == null) {
playerPartyComp = new PartyComp(getParty());
}
Coordinates ppp = getPlayerPartyPoint();
getComp().add(playerPartyComp.getComp(), "pos " + ppp.x + " " + ppp.y);
comp.setComponentZOrder(playerPartyComp.getComp(), index);
index++;
resetVisiblePlaces();
resetDisplayedRoutes();
for (Coordinates p : routes.keySet()) {
// ++ refresh
RouteComp routeComp = routes.get(p);
add(routeComp, "pos " + p.x + " " + p.y);
routeComp.refresh();
}
for (Coordinates p : places.keySet()) {
// ++ symbol if not available?
PlaceComp placeComp = places.get(p);
// Selectable?
getComp().add(placeComp.getComp(), "pos " + p.x + " " + p.y);
comp.setComponentZOrder(placeComp.getComp(), index);
index++;
placeComp.refresh();
}
comp.setComponentZOrder(backgroundComp, index);
addSpecialIcons();
// Route route = getParty().getCurrentRoute();
// if (route != null) {
// getComp().add(
// route.getComp().getComp(),
// "pos " + route.getMapPoint().x + " "
// + route.getMapPoint().y);
// }
// only display the active route if traveling!
getComp().revalidate();
}
Aggregations