public class EditorModel extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
ACTION_EDIT_TILE |
static int |
ACTION_PLACE_PORTAL |
static int |
ACTION_PLACE_TILE
Action mode constants.
|
static int |
BASE_LAYER
Miso layer constants.
|
static String[] |
CMD_ACTIONS
String translations for action identifiers.
|
static String[] |
LAYER_NAMES |
static int |
NUM_ACTIONS
The number of actions.
|
static int |
OBJECT_LAYER |
static String[] |
TIP_ACTIONS
Prose descriptions of actions suitable for tool tip display.
|
| Constructor and Description |
|---|
EditorModel(com.threerings.media.tile.TileManager tilemgr) |
| Modifier and Type | Method and Description |
|---|---|
void |
addListener(EditorModelListener l)
Add an editor model listener.
|
void |
clearTile()
Marks the currently selected tile as invalid such that editing
when no tiles are available can be properly effected.
|
int |
getActionMode()
Returns the current editor action mode.
|
int |
getFQTileId()
Returns the fully qualified tile id of the currently selected tile.
|
int |
getLayerIndex()
Returns the current scene layer index undergoing edit.
|
int |
getObjectGripDirection()
Gets the direction in which we should grip objects.
|
com.threerings.media.tile.Tile |
getTile()
Returns the currently selected tile for placement within the
scene.
|
int |
getTileId()
Returns the currently selected tile id within the selected tile
set.
|
com.threerings.media.tile.TileSet |
getTileSet()
Returns the currently selected tile set.
|
int |
getTileSetId()
Returns the currently selected tile set id.
|
boolean |
isTileValid()
Returns whether the currently selected tile is valid.
|
void |
setActionMode(String cmd)
Sets the editor action mode.
|
void |
setLayerIndex(int lnum)
Sets the scene layer index undergoing edit.
|
void |
setObjectGripDirection(int direction)
Sets the direction in which we should grip objects.
|
void |
setTile(com.threerings.media.tile.TileSet set,
int tileSetId,
int tileIndex)
Sets the selected tile for placement within the scene.
|
void |
setTileId(int tileIndex)
Sets the tile id of the tile selected for placement within the
scene.
|
String |
toString() |
public static final int ACTION_PLACE_TILE
public static final int ACTION_EDIT_TILE
public static final int ACTION_PLACE_PORTAL
public static final int NUM_ACTIONS
public static final int BASE_LAYER
public static final int OBJECT_LAYER
public static final String[] LAYER_NAMES
public static final String[] TIP_ACTIONS
public static final String[] CMD_ACTIONS
public void addListener(EditorModelListener l)
l - the listener.public boolean isTileValid()
public int getActionMode()
public int getLayerIndex()
public com.threerings.media.tile.TileSet getTileSet()
public int getTileSetId()
public int getTileId()
public com.threerings.media.tile.Tile getTile()
public int getFQTileId()
public void clearTile()
public void setActionMode(String cmd)
CMD_ACTIONS.public void setLayerIndex(int lnum)
public void setTile(com.threerings.media.tile.TileSet set,
int tileSetId,
int tileIndex)
public void setTileId(int tileIndex)
public void setObjectGripDirection(int direction)
public int getObjectGripDirection()
Copyright © 2015. All rights reserved.