use of limelight.ui.model.Scene in project limelight by slagyr.
the class CastingDirector method castRole.
public Player castRole(PropPanel panel, String playerName, PlayerRecruiter playerRecruiter) {
Player result;
final Scene scene = panel.getRoot();
final String scenePlayersPath = Context.fs().pathTo(scene.getPath(), "players");
result = castFrom(panel, playerName, playerRecruiter, scenePlayersPath);
if (result == null && scene.getProduction() != null) {
final String productionPlayersPath = Context.fs().pathTo(scene.getProduction().getPath(), "players");
result = castFrom(panel, playerName, playerRecruiter, productionPlayersPath);
}
if (result == null)
result = castFrom(panel, playerName, builtinPlayerRecruiter, BuiltinBeacon.getBuiltinPlayersPath());
return result;
}
use of limelight.ui.model.Scene in project limelight by slagyr.
the class JavaProductionTest method loadEmptyStylesForScene.
@Test
public void loadEmptyStylesForScene() throws Exception {
final Scene scene = production.loadScene("aScene", new Opts());
final Map<String, RichStyle> styles = production.loadStyles(scene, new HashMap<String, RichStyle>());
assertEquals(0, styles.size());
}
use of limelight.ui.model.Scene in project limelight by slagyr.
the class ProductionTest method openDefaultScenes.
@Test
public void openDefaultScenes() throws Exception {
production.getEventHandler().add(ProductionOpenedEvent.class, action);
MockStage stage = new MockStage();
production.getTheater().add(stage);
stage.setDefaultSceneName("defaultScene");
Scene scene = new FakeScene();
production.stubbedScene = scene;
production.open(new Opts());
assertEquals(true, action.invoked);
assertEquals(true, stage.isOpen());
assertEquals(scene, stage.getScene());
}
use of limelight.ui.model.Scene in project limelight by slagyr.
the class ProductionTest method openSceneWithActiveStage.
@Test
public void openSceneWithActiveStage() throws Exception {
production.loadProduction();
MockStage stage = new MockStage("active");
production.getTheater().add(stage);
new StageActivatedEvent().dispatch(stage);
Scene scene = new FakeScene();
production.stubbedScene = scene;
production.openScene("scenePath", Util.toMap());
assertEquals("scenePath", production.loadedScenePath);
assertEquals(scene, stage.getScene());
assertEquals(true, stage.opened);
}
Aggregations