public abstract class RenderingScreen extends Object implements KeyboardInterface, TouchInterface, GestureInterface, Disposable
| Constructor and Description |
|---|
RenderingScreen() |
| Modifier and Type | Method and Description |
|---|---|
void |
dispose() |
void |
onClick(int x,
int y,
int button)
Invoked when the pointer (mouse or touch) is pressed (once).
|
void |
onDrag(int x,
int y)
Invoked when the pointer (mouse or touch) is moved and down.
|
void |
onFling(float velocityX,
float velocityY,
int button)
Called when the user dragged a finger over the screen and lifted it.
|
protected abstract void |
onGraphicRender(GdxGraphics g) |
abstract void |
onInit() |
void |
onKeyDown(int keycode)
Invoked when a key is typed.
|
void |
onKeyUp(int keycode)
Invoked when a key is released.
|
void |
onLongPress(float x,
float y)
Called on long press on Android.
|
void |
onPan(float x,
float y,
float deltaX,
float deltaY)
Called when the user drags a finger over the screen on Android.
|
void |
onPinch(Vector2 initialPointer1,
Vector2 initialPointer2,
Vector2 pointer1,
Vector2 pointer2)
Called when a user performs a pinch zoom gesture on Android.
|
void |
onRelease(int x,
int y,
int button)
Invoked when the pointer (mouse or touch) is released.
|
void |
onScroll(int amount)
Invoked when the mouse scroll (wheel) has been moved.
|
void |
onTap(float x,
float y,
int count,
int button)
Invoked for a tap gesture on Android.
|
void |
onZoom(float initialDistance,
float distance)
Called when the user performs a pinch zoom gesture on Android.
|
void |
render(GdxGraphics g) |
public abstract void onInit()
protected abstract void onGraphicRender(GdxGraphics g)
public void onClick(int x,
int y,
int button)
TouchInterfaceInput.Buttons.LEFT.onClick in interface TouchInterfacex - the screen X coordinate (origin is the lower left corner)y - the screen Y coordinate (origin is the lower left corner)button - Input.Buttons.LEFT or
Input.Buttons.RIGHT button clickedpublic void onDrag(int x,
int y)
TouchInterfaceonDrag in interface TouchInterfacex - the screen X coordinate (origin is the lower left corner)y - the screen Y coordinate (origin is the lower left corner)public void onFling(float velocityX,
float velocityY,
int button)
GestureInterfaceonFling in interface GestureInterfacevelocityX - velocity on the X axis in secondsvelocityY - velocity on the Y axis in secondsbutton - Input.Buttons.LEFT or
Input.Buttons.RIGHT button clickedpublic void onLongPress(float x,
float y)
GestureInterfaceonLongPress in interface GestureInterfacex - the screen X coordinate (origin is the lower left corner)y - the screen Y coordinate (origin is the lower left corner)public void onPan(float x,
float y,
float deltaX,
float deltaY)
GestureInterfaceonPan in interface GestureInterfacex - the screen X coordinate (origin is the lower left corner)y - the screen Y coordinate (origin is the lower left corner)deltaX - the difference in pixels to the last drag event on xdeltaY - the difference in pixels to the last drag event on ypublic void onPinch(Vector2 initialPointer1, Vector2 initialPointer2, Vector2 pointer1, Vector2 pointer2)
GestureInterfaceonPinch in interface GestureInterfaceinitialPointer1 - finger 1 initial positioninitialPointer2 - finger 2 initial positionpointer1 - finger 1 current positionpointer2 - finger 2 current positionpublic void onRelease(int x,
int y,
int button)
TouchInterfaceInput.Buttons.LEFT.onRelease in interface TouchInterfacex - the screen X coordinate (origin is the lower left corner)y - the screen Y coordinate (origin is the lower left corner)button - Input.Buttons.LEFT or
Input.Buttons.RIGHT button clickedpublic void onScroll(int amount)
TouchInterfaceonScroll in interface TouchInterfaceamount - the scroll amountpublic void onTap(float x,
float y,
int count,
int button)
GestureInterfaceonTap in interface GestureInterfacex - the screen X coordinate (origin is the lower left corner)y - the screen Y coordinate (origin is the lower left corner)count - the number of tapsbutton - Input.Buttons.LEFT or
Input.Buttons.RIGHT button clickedpublic void onZoom(float initialDistance,
float distance)
GestureInterfaceonZoom in interface GestureInterfaceinitialDistance - distance between fingers when the gesture starteddistance - current distance between fingerspublic void onKeyDown(int keycode)
KeyboardInterfaceInput.Keys to read the key code.onKeyDown in interface KeyboardInterfacekeycode - the code key, see Input.Keyspublic void onKeyUp(int keycode)
KeyboardInterfaceInput.Keys to read the key code.onKeyUp in interface KeyboardInterfacekeycode - the code key, see Input.Keyspublic void dispose()
dispose in interface Disposablepublic final void render(GdxGraphics g)
Copyright © 2014-2016 gdx2d - https://github.com/hevs-isi/gdx2d