Package games.stendhal.client
Interface IGameScreen
- All Known Implementing Classes:
GameScreen
public interface IGameScreen
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
center()
Center the view.void
Removes all the text entities.convertScreenViewToWorld(int x, int y)
Convert screen view coordinates to world coordinates.Convert screen view coordinates to world coordinates.EntityView<?>
getEntityViewAt(double x, double y)
Gets an entity view at given coordinates.EntityView<?>
getMovableEntityViewAt(double x, double y)
Get a movable entity view at given coordinates.getTextAt(int x, int y)
Get the text bubble at specific coordinates.void
Prepare screen for the next frame to be rendered and move it if needed .void
positionChanged(double x, double y)
The user position changed.void
removeText(RemovableSprite entity)
Removes a text bubble.void
setOffline(boolean offline)
Set the offline indication state.
-
Field Details
-
SIZE_UNIT_PIXELS
static final int SIZE_UNIT_PIXELSThe width / height of one tile.- See Also:
- Constant Field Values
-
-
Method Details
-
nextFrame
void nextFrame()Prepare screen for the next frame to be rendered and move it if needed . -
center
void center()Center the view. -
setOffline
void setOffline(boolean offline)Set the offline indication state.- Parameters:
offline
-true
if offline.
-
removeText
Removes a text bubble.- Parameters:
entity
- The text to be removed.
-
clearTexts
void clearTexts()Removes all the text entities. -
getEntityViewAt
Gets an entity view at given coordinates.- Parameters:
x
- The X world coordinate.y
- The Y world coordinate.- Returns:
- The entity view, or
null
if none found.
-
getMovableEntityViewAt
Get a movable entity view at given coordinates.- Parameters:
x
- The X world coordinate.y
- The Y world coordinate.- Returns:
- The entity view, or
null
if none found.
-
getTextAt
Get the text bubble at specific coordinates.- Parameters:
x
- Screen X coordinate.y
- Screen Y world coordinate.- Returns:
- the text bubble at the given coordinate or
null
if not found.
-
convertScreenViewToWorld
Convert screen view coordinates to world coordinates.- Parameters:
p
- The screen view coordinates.- Returns:
- World coordinates.
-
convertScreenViewToWorld
Convert screen view coordinates to world coordinates.- Parameters:
x
- The screen view X coordinate.y
- The screen view Y coordinate.- Returns:
- World coordinates.
-
positionChanged
void positionChanged(double x, double y)The user position changed. This sets the target coordinates that the screen centers on.- Parameters:
x
- The X coordinate (in world units).y
- The Y coordinate (in world units).
-