Class LevelEditorScreen

java.lang.Object
com.badlogic.gdx.InputAdapter
com.badlogic.gdx.scenes.scene2d.Stage
All Implemented Interfaces:
com.badlogic.gdx.InputProcessor, com.badlogic.gdx.Screen, com.badlogic.gdx.utils.Disposable

public class LevelEditorScreen extends MapScreen
  • Constructor Details

    • LevelEditorScreen

      public LevelEditorScreen(MapData data)
  • Method Details

    • getItemPrototypes

      public com.badlogic.gdx.utils.Array<Item> getItemPrototypes()
    • setPlayMode

      public void setPlayMode()
      Show the play screen
    • getMetadata

      public MapMetadata getMetadata()
      Get the ItemSelectionTool from this editor
      Overrides:
      getMetadata in class MapScreen
    • getSelectionTool

      public ItemSelectionTool getSelectionTool()
    • getUI

      public EditorUI getUI()
    • getDragAndDrop

      public com.badlogic.gdx.scenes.scene2d.utils.DragAndDrop getDragAndDrop()
      Return the DragAndDrop instance for this EditorKit (to add DragAndDrop.Source)
    • deselectTools

      public void deselectTools()
      Ask the editor to deselect all tools
    • setActiveTool

      public void setActiveTool(EditorTool tool)
    • getActiveTool

      public EditorTool getActiveTool()
    • getTool

      public EditorTool getTool(ToolManager.ToolType type)
    • recordEditorAction

      public void recordEditorAction(ActionHistory.EditorAction action)
      Add an ActionHistory.EditorAction to the history
    • getSelectedItem

      public Optional<Item> getSelectedItem()
    • priorityItemAt

      public Optional<Item> priorityItemAt(int x, int y)
      Get the "best" item at this location. That is, the item that is most likely to be selected by the player
    • itemIsPlaced

      public boolean itemIsPlaced(Item i)
      Overrides:
      itemIsPlaced in class MapScreen
    • collidesMenu

      public boolean collidesMenu(float x, float y)
    • collidedMenuEntry

      public <T extends Menu> Menu.MenuEntry collidedMenuEntry(float x, float y, Class<T> type)
    • setPanEnabled

      public void setPanEnabled(boolean panEnabled)
    • panCamera

      public void panCamera(float x, float y)
    • panCamera

      public void panCamera(CamMan.Translation translation)
    • reloadItems

      public void reloadItems()
    • setGridView

      public void setGridView(GridView view)
    • clearGridView

      public void clearGridView()
    • applyGridView

      public void applyGridView()
    • addOverlayDrawable

      public void addOverlayDrawable(Drawable drawable)
      Draw some Drawable on top of everthing in on the game stage
      Parameters:
      drawable - to add
      See Also:
    • removeOverlayDrawable

      public void removeOverlayDrawable(Drawable drawable)
      Remove some Drawable from the overlay
      Parameters:
      drawable - to remove
      See Also:
    • draw

      public void draw()
      Overrides:
      draw in class MapScreen
    • shouldHandleTouchDown

      public boolean shouldHandleTouchDown()