public class EnterMap<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>>
extends java.lang.Object
| Constructor and Description |
|---|
EnterMap(@NotNull java.awt.Component parent,
@NotNull Direction[] directionMap,
@NotNull FileControl<G,A,R> fileControl,
@NotNull MapViewsManager<G,A,R> mapViewsManager)
Creates a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
static @NotNull java.awt.Point |
calculateNewCursorLocation(@NotNull java.awt.Point oldCursorLocation,
@NotNull Size2D mapSize,
@NotNull Direction direction)
Calculate the map cursor location for the new viewport.
|
boolean |
enterExit(@NotNull MapView<G,A,R> mapView,
@NotNull GameObject<G,A,R> exit,
boolean allowRandomMapParameters)
Opens the map an exit game object points to.
|
boolean |
enterMap(@Nullable MapView<G,A,R> mapView,
@NotNull MapFile mapFile,
@Nullable java.awt.Point destinationPoint,
@NotNull Direction direction)
Enters a map.
|
boolean |
enterMap(@NotNull MapView<G,A,R> mapView,
@NotNull MapPath mapPath,
@NotNull Direction direction,
@Nullable java.awt.Point destinationPoint)
Enters a map wanted.
|
public EnterMap(@NotNull
@NotNull java.awt.Component parent,
@NotNull
@NotNull Direction[] directionMap,
@NotNull
@NotNull FileControl<G,A,R> fileControl,
@NotNull
@NotNull MapViewsManager<G,A,R> mapViewsManager)
parent - the component for showing dialog boxesdirectionMap - maps relative direction to map window directionfileControl - the file controlmapViewsManager - the map viewspublic boolean enterMap(@NotNull
@NotNull MapView<G,A,R> mapView,
@NotNull
@NotNull MapPath mapPath,
@NotNull
@NotNull Direction direction,
@Nullable
@Nullable java.awt.Point destinationPoint)
mapView - the map view to leavemapPath - path to map that should be loadeddirection - the direction to godestinationPoint - the desired destination point on the map (pass
null if unknown, and note that the point gets modified)public boolean enterMap(@Nullable
@Nullable MapView<G,A,R> mapView,
@NotNull
@NotNull MapFile mapFile,
@Nullable
@Nullable java.awt.Point destinationPoint,
@NotNull
@NotNull Direction direction)
mapView - the current map view; may be closed it non-nullmapFile - the map file to enterdestinationPoint - the desired destination point on the map or
null for defaultdirection - the direction to gopublic boolean enterExit(@NotNull
@NotNull MapView<G,A,R> mapView,
@NotNull
@NotNull GameObject<G,A,R> exit,
boolean allowRandomMapParameters)
mapView - the map view to leaveexit - the game objectallowRandomMapParameters - whether exit paths may point to random
maps@NotNull
public static @NotNull java.awt.Point calculateNewCursorLocation(@NotNull
@NotNull java.awt.Point oldCursorLocation,
@NotNull
@NotNull Size2D mapSize,
@NotNull
@NotNull Direction direction)
oldCursorLocation - the old cursor locationmapSize - the size of the new mapdirection - the direction to scroll