private void performCreateCutscene(int type, string cutsceneId) { // If some value was typed and the identifier is valid if (!controller.isElementIdValid(cutsceneId)) { cutsceneId = controller.makeElementValid(cutsceneId); } Cutscene newCutscene = null; // Create the new cutscene switch (type) { default: case Controller.CUTSCENE_SLIDES: newCutscene = new Slidescene(cutsceneId); break; case Controller.CUTSCENE_VIDEO: newCutscene = new Videoscene(cutsceneId); break; } // Add the new cutscene cutscenesList.Add(newCutscene); cutscenesDataControlList.Add(new CutsceneDataControl(newCutscene)); controller.IdentifierSummary.addId <Cutscene>(cutsceneId); }
/* * @Override * public Object clone() throws CloneNotSupportedException * { * * Videoscene v = (Videoscene) super.clone( ); * v.canSkip = canSkip; * return v; * }*/ public override object Clone() { Videoscene v = (Videoscene)base.Clone(); v.canSkip = canSkip; return(v); }
public override bool addElement(int type, string cutsceneId) { bool elementAdded = false; ////if (type == Controller.CUTSCENE) ////{ // //TODO: implement // //CutsceneTypesDialog cutscenesTypesDialog = new CutsceneTypesDialog(); // //type = cutscenesTypesDialog.getOptionSelected(); // //TODO: tmp, delete // type = Controller.CUTSCENE_SLIDES; if (type == Controller.CUTSCENE_SLIDES) { // Show a dialog asking for the cutscene id if (cutsceneId == null || cutsceneId.Equals("")) { cutsceneId = controller.showInputDialog(TC.get("Operation.AddCutsceneTitle"), TC.get("Operation.AddCutsceneMessage"), TC.get("Operation.AddCutsceneDefaultValue")); } // If some value was typed and the identifier is valid if (!controller.isElementIdValid(cutsceneId)) { cutsceneId = controller.makeElementValid(cutsceneId); } Cutscene newCutscene = null; // Create the new cutscene if (type == Controller.CUTSCENE_SLIDES) { newCutscene = new Slidescene(cutsceneId); } // Add the new cutscene cutscenesList.Add(newCutscene); cutscenesDataControlList.Add(new CutsceneDataControl(newCutscene)); controller.getIdentifierSummary().addCutsceneId(cutsceneId); //controller.dataModified( ); elementAdded = true; } else if (type == Controller.CUTSCENE_VIDEO) { // Show a dialog asking for the cutscene id if (cutsceneId == null) { cutsceneId = controller.showInputDialog(TC.get("Operation.AddCutsceneTitle"), TC.get("Operation.AddCutsceneMessage"), TC.get("Operation.AddCutsceneDefaultValue")); } // If some value was typed and the identifier is valid if (!controller.isElementIdValid(cutsceneId)) { cutsceneId = controller.makeElementValid(cutsceneId); } Cutscene newCutscene = null; // Create the new cutscene if (type == Controller.CUTSCENE_VIDEO) { newCutscene = new Videoscene(cutsceneId); } // Add the new cutscene cutscenesList.Add(newCutscene); cutscenesDataControlList.Add(new CutsceneDataControl(newCutscene)); controller.getIdentifierSummary().addCutsceneId(cutsceneId); //controller.dataModified( ); elementAdded = true; } //} return(elementAdded); }