Class ItemEditor

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

public class ItemEditor extends AbstractScreen
  • Field Details

    • batch

      protected final com.badlogic.gdx.graphics.g2d.Batch batch
    • itemMenu

      public Menu itemMenu
    • itemSidebar

      public ItemSideBar itemSidebar
    • screen

      public static ItemEditor screen
  • Constructor Details

    • ItemEditor

      public ItemEditor(MapData data, @Null Item target)
  • Method Details

    • getNewItem

      public Item getNewItem()
    • getDragAndDrop

      public com.badlogic.gdx.scenes.scene2d.utils.DragAndDrop getDragAndDrop()
    • get

      public static ItemEditor get()
    • markModified

      public void markModified()
    • mouseCollidesMenu

      public boolean mouseCollidesMenu()
    • repack

      public void repack()
      Repack the root UI elements in the editor
    • resetItem

      public void resetItem()
    • getMapData

      public MapData getMapData()
    • returnToEditor

      public void returnToEditor()
    • updateItemPosition

      public void updateItemPosition()
      Update the position of the item in the editor. This should be called anytime the item's size is changed
    • fillPropertyParams

      public void fillPropertyParams()
      Ensures that the propertyParameters field of this item's ObjectTypeData is filled
    • modifyingItem

      public boolean modifyingItem()
    • saveItem

      public void saveItem()
      Save the editing item to this maps custom object folder
    • draw

      public void draw()
      Overrides:
      draw in class com.badlogic.gdx.scenes.scene2d.Stage
    • act

      public void act(float delta)
      Overrides:
      act in class AbstractScreen
    • dispose

      public void dispose()
      Specified by:
      dispose in interface com.badlogic.gdx.utils.Disposable
      Specified by:
      dispose in interface com.badlogic.gdx.Screen
      Overrides:
      dispose in class AbstractScreen
    • resize

      public void resize(int width, int height)
      Specified by:
      resize in interface com.badlogic.gdx.Screen
      Overrides:
      resize in class AbstractScreen