Package group24.escaperoom.screens
Class LevelEditorScreen
java.lang.Object
com.badlogic.gdx.InputAdapter
com.badlogic.gdx.scenes.scene2d.Stage
group24.escaperoom.screens.AbstractScreen
group24.escaperoom.screens.MapScreen
group24.escaperoom.screens.LevelEditorScreen
- All Implemented Interfaces:
com.badlogic.gdx.InputProcessor,com.badlogic.gdx.Screen,com.badlogic.gdx.utils.Disposable
-
Nested Class Summary
Nested classes/interfaces inherited from class com.badlogic.gdx.scenes.scene2d.Stage
com.badlogic.gdx.scenes.scene2d.Stage.TouchFocus -
Field Summary
Fields inherited from class group24.escaperoom.screens.MapScreen
batch, cameraManager, grid, gridSize, metadata, pollItems, room, roomProxyFields inherited from class group24.escaperoom.screens.AbstractScreen
fillView, followActor, inputPlex, SCREEN_HEIGHT, SCREEN_WIDTH, skin, spriteBatch, sprites, WORLD_HEIGHT, WORLD_WIDTH -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddOverlayDrawable(Drawable drawable) Draw someDrawableon top of everthing in on the game stagevoidvoid<T extends Menu>
Menu.MenuEntrycollidedMenuEntry(float x, float y, Class<T> type) booleancollidesMenu(float x, float y) voidAsk the editor to deselect all toolsvoiddraw()com.badlogic.gdx.scenes.scene2d.utils.DragAndDropReturn theDragAndDropinstance for this EditorKit (to addDragAndDrop.Source)com.badlogic.gdx.utils.Array<Item>Get theItemSelectionToolfrom this editorgetTool(ToolManager.ToolType type) getUI()booleanitemIsPlaced(Item i) voidpanCamera(float x, float y) voidpanCamera(CamMan.Translation translation) priorityItemAt(int x, int y) Get the "best" item at this location.voidAdd anActionHistory.EditorActionto the historyvoidvoidremoveOverlayDrawable(Drawable drawable) Remove someDrawablefrom the overlayvoidsetActiveTool(EditorTool tool) voidsetGridView(GridView view) voidsetPanEnabled(boolean panEnabled) voidShow the play screenbooleanMethods inherited from class group24.escaperoom.screens.MapScreen
act, canPlace, canPlace, containsItemWhere, draw, findItemWhere, getDrawables, getGrid, getItems, getItemsAt, getItemsAt, getItemsAt, getItemsIn, getTileDepthOf, loadGrid, maybeAddPolling, placeItem, removeItemFromGrid, resize, updateProxyMethods inherited from class group24.escaperoom.screens.AbstractScreen
addInputProcessor, addPollable, addSprite, addUI, dispose, gameCoordToUI, getNotificationOverlay, getUIStage, hide, init, pause, removePollable, render, resume, show, UIcoordToGameMethods inherited from class com.badlogic.gdx.scenes.scene2d.Stage
act, actorRemoved, addAction, addActor, addCaptureListener, addListener, addTouchFocus, calculateScissors, cancelTouchFocus, cancelTouchFocus, cancelTouchFocusExcept, clear, getActionsRequestRendering, getActors, getBatch, getCamera, getDebugColor, getHeight, getKeyboardFocus, getRoot, getScrollFocus, getViewport, getWidth, hit, isDebugAll, isInsideViewport, keyDown, keyTyped, keyUp, mouseMoved, removeCaptureListener, removeListener, removeTouchFocus, screenToStageCoordinates, scrolled, setActionsRequestRendering, setDebugAll, setDebugInvisible, setDebugParentUnderMouse, setDebugTableUnderMouse, setDebugTableUnderMouse, setDebugUnderMouse, setKeyboardFocus, setRoot, setScrollFocus, setViewport, stageToScreenCoordinates, toScreenCoordinates, touchCancelled, touchDown, touchDragged, touchUp, unfocus, unfocusAll
-
Constructor Details
-
LevelEditorScreen
-
-
Method Details
-
getItemPrototypes
-
setPlayMode
public void setPlayMode()Show the play screen -
getMetadata
Get theItemSelectionToolfrom this editor- Overrides:
getMetadatain classMapScreen
-
getSelectionTool
-
getUI
-
getDragAndDrop
public com.badlogic.gdx.scenes.scene2d.utils.DragAndDrop getDragAndDrop()Return theDragAndDropinstance for this EditorKit (to addDragAndDrop.Source) -
deselectTools
public void deselectTools()Ask the editor to deselect all tools -
setActiveTool
-
getActiveTool
-
getTool
-
recordEditorAction
Add anActionHistory.EditorActionto the history -
getSelectedItem
-
priorityItemAt
Get the "best" item at this location. That is, the item that is most likely to be selected by the player -
itemIsPlaced
- Overrides:
itemIsPlacedin classMapScreen
-
collidesMenu
public boolean collidesMenu(float x, float y) -
collidedMenuEntry
-
setPanEnabled
public void setPanEnabled(boolean panEnabled) -
panCamera
public void panCamera(float x, float y) -
panCamera
-
reloadItems
public void reloadItems() -
setGridView
-
clearGridView
public void clearGridView() -
applyGridView
public void applyGridView() -
addOverlayDrawable
Draw someDrawableon top of everthing in on the game stage- Parameters:
drawable- to add- See Also:
-
removeOverlayDrawable
Remove someDrawablefrom the overlay- Parameters:
drawable- to remove- See Also:
-
draw
public void draw() -
shouldHandleTouchDown
public boolean shouldHandleTouchDown()
-