public void OnCliked() { Controller.getInstance().getSelectedChapterDataControl().getBooksList().getBooks()[ GameRources.GetInstance().selectedBookIndex].getBookParagraphsList() .addElement(Controller.BOOK_IMAGE_PARAGRAPH, String.Empty); }
void OnVideosceneChanged(string val) { videoscenePath = val; Controller.getInstance().getSelectedChapterDataControl().getCutscenesList().getCutscenes()[ GameRources.GetInstance().selectedCutsceneIndex].setPathToVideo(val); }
public override void Draw(int aID) { /* * View for videoscene */ if (Controller.getInstance().getSelectedChapterDataControl().getCutscenesList().getCutscenes()[ GameRources.GetInstance().selectedCutsceneIndex].isVideoscene()) { // Background chooser GUILayout.Label(TC.get("Resources.DescriptionVideoscenes")); GUILayout.BeginHorizontal(); if (GUILayout.Button(clearImg, GUILayout.Width(0.1f * windowWidth))) { OnVideosceneChanged(""); } GUILayout.Box(videoscenePath, GUILayout.Width(0.6f * windowWidth)); if (GUILayout.Button(TC.get("Buttons.Select"), GUILayout.Width(0.1f * windowWidth))) { ShowAssetChooser(AssetType.VIDEOSCENE); } GUILayout.EndHorizontal(); GUILayout.Space(30); GUILayout.Label(TC.get("Videoscene.Skip.border")); canSkipVideo = GUILayout.Toggle(canSkipVideo, new GUIContent(TC.get("Videoscene.Skip.label"))); if (canSkipVideo != canSkipVideoLast) { OnVideosceneCanSkipVideoChanged(canSkipVideo); } } /* * View for slidescene */ else { // Background chooser GUILayout.Label(TC.get("Resources.DescriptionSlidesceneSlides")); GUILayout.BeginHorizontal(); if (GUILayout.Button(clearImg, GUILayout.Width(0.1f * windowWidth))) { OnSlidesceneChanged(""); } GUILayout.Box(slidesPath, GUILayout.Width(0.6f * windowWidth)); if (GUILayout.Button(TC.get("Buttons.Select"), GUILayout.Width(0.1f * windowWidth))) { ShowAssetChooser(AssetType.SELECT_SLIDES); } // Create/edit slidescene if (GUILayout.Button(TC.get("Resources.Create") + "/" + TC.get("Resources.Edit"), GUILayout.Width(0.2f * windowWidth))) { // For not-existing cutscene - show new cutscene name dialog if (slidesPath == null || slidesPath.Equals("")) { CutsceneNameInputPopup createCutsceneDialog = (CutsceneNameInputPopup)ScriptableObject.CreateInstance(typeof(CutsceneNameInputPopup)); createCutsceneDialog.Init(this, ""); } else { EditCutscene(); } } GUILayout.EndHorizontal(); // Music chooser GUILayout.BeginHorizontal(); if (GUILayout.Button(clearImg, GUILayout.Width(0.1f * windowWidth))) { musicPath = ""; } GUILayout.Box(musicPath, GUILayout.Width(0.7f * windowWidth)); if (GUILayout.Button(TC.get("Buttons.Select"), GUILayout.Width(0.19f * windowWidth))) { ShowAssetChooser(AssetType.MUSIC); } GUILayout.EndHorizontal(); } GUILayout.Space(30); GUILayout.Label(TC.get("ImageAssets.Preview")); if (Controller.getInstance().getSelectedChapterDataControl().getCutscenesList().getCutscenes()[ GameRources.GetInstance().selectedCutsceneIndex].isVideoscene()) { GUI.DrawTexture(previewRect, slidePreviewMovie, ScaleMode.ScaleToFit); } else { if (slidesPath != "") { GUI.DrawTexture(previewRect, slidesPreview, ScaleMode.ScaleToFit); } } }
public override void Draw(int aID) { GUILayout.BeginArea(tableRect); GUILayout.BeginHorizontal(); GUILayout.Box(TC.get("ActiveAreasList.Id"), GUILayout.Width(windowWidth * 0.54f)); GUILayout.Box(TC.get("Conditions.Title"), GUILayout.Width(windowWidth * 0.14f)); GUILayout.Box(TC.get("ActiveAreasList.Documentation"), GUILayout.Width(windowWidth * 0.18f)); GUILayout.EndHorizontal(); scrollPosition = GUILayout.BeginScrollView(scrollPosition); for (int i = 0; i < Controller.getInstance().getSelectedChapterDataControl().getScenesList().getScenes()[ GameRources.GetInstance().selectedSceneIndex].getActiveAreasList().getActiveAreasList().Count; i++) { if (i == selectedArea) { GUI.skin = selectedAreaSkin; } GUILayout.BeginHorizontal(); if (GUILayout.Button(Controller.getInstance().getSelectedChapterDataControl().getScenesList().getScenes()[ GameRources.GetInstance().selectedSceneIndex].getActiveAreasList().getActiveAreasList()[i].getId(), GUILayout.Width(windowWidth * 0.54f))) { OnSelectionChanged(i); } if (GUILayout.Button(conditionTex, GUILayout.Width(windowWidth * 0.14f))) { OnSelectionChanged(i); ConditionEditorWindow window = (ConditionEditorWindow)ScriptableObject.CreateInstance(typeof(ConditionEditorWindow)); window.Init(Controller.getInstance().getSelectedChapterDataControl().getScenesList().getScenes()[ GameRources.GetInstance().selectedSceneIndex].getActiveAreasList().getActiveAreasList()[i] .getConditions()); } if (GUILayout.Button(TC.get("GeneralText.EditDocumentation"), GUILayout.Width(windowWidth * 0.18f))) { OnSelectionChanged(i); } GUILayout.EndHorizontal(); GUI.skin = defaultSkin; } GUILayout.EndScrollView(); GUILayout.EndArea(); /* * Right panel */ GUILayout.BeginArea(rightPanelRect); GUI.skin = noBackgroundSkin; if (GUILayout.Button(addTexture, GUILayout.MaxWidth(0.08f * windowWidth))) { ActiveAreaNewName window = (ActiveAreaNewName)ScriptableObject.CreateInstance(typeof(ActiveAreaNewName)); window.Init(this, "IdObject"); } if (GUILayout.Button(duplicateImg, GUILayout.MaxWidth(0.08f * windowWidth))) { Controller.getInstance().getSelectedChapterDataControl().getScenesList().getScenes()[ GameRources.GetInstance().selectedSceneIndex].getActiveAreasList() .duplicateElement(Controller.getInstance().getSelectedChapterDataControl().getScenesList().getScenes()[ GameRources.GetInstance().selectedSceneIndex].getActiveAreasList().getActiveAreas()[selectedArea]); } if (GUILayout.Button(moveUp, GUILayout.MaxWidth(0.08f * windowWidth))) { Controller.getInstance().getSelectedChapterDataControl().getScenesList().getScenes()[ GameRources.GetInstance().selectedSceneIndex].getActiveAreasList() .moveElementUp(Controller.getInstance().getSelectedChapterDataControl().getScenesList().getScenes()[ GameRources.GetInstance().selectedSceneIndex].getActiveAreasList().getActiveAreas()[selectedArea]); } if (GUILayout.Button(moveDown, GUILayout.MaxWidth(0.08f * windowWidth))) { Controller.getInstance().getSelectedChapterDataControl().getScenesList().getScenes()[ GameRources.GetInstance().selectedSceneIndex].getActiveAreasList() .moveElementDown(Controller.getInstance().getSelectedChapterDataControl().getScenesList().getScenes()[ GameRources.GetInstance().selectedSceneIndex].getActiveAreasList().getActiveAreas()[selectedArea]); } if (GUILayout.Button(clearImg, GUILayout.MaxWidth(0.08f * windowWidth))) { Controller.getInstance().getSelectedChapterDataControl().getScenesList().getScenes()[ GameRources.GetInstance().selectedSceneIndex].getActiveAreasList() .deleteElement(Controller.getInstance().getSelectedChapterDataControl().getScenesList().getScenes()[ GameRources.GetInstance().selectedSceneIndex].getActiveAreasList().getActiveAreas()[selectedArea], false); if (selectedArea >= 0) { selectedArea--; } if (selectedAction >= 0) { selectedAction--; } } GUI.skin = defaultSkin; GUILayout.EndArea(); /** * ACTION EDITOR */ GUILayout.BeginArea(actionRect); GUILayout.BeginHorizontal(); GUILayout.Box(TC.get("Element.Action"), GUILayout.Width(windowWidth * 0.39f)); GUILayout.Box(TC.get("ActionsList.NeedsGoTo"), GUILayout.Width(windowWidth * 0.39f)); GUILayout.Box(TC.get("Element.Effects") + "/" + TC.get("SmallAction.Conditions"), GUILayout.Width(windowWidth * 0.1f)); GUILayout.EndHorizontal(); scrollPositionAction = GUILayout.BeginScrollView(scrollPositionAction, GUILayout.ExpandWidth(false)); if (selectedArea >= 0) { // Action table for (int i = 0; i < Controller.getInstance().getSelectedChapterDataControl().getScenesList().getScenes()[ GameRources.GetInstance().selectedSceneIndex].getActiveAreasList().getActiveAreas()[selectedArea] .getActionsList().getActions().Count; i++) { if (i == selectedAction) { GUI.skin = selectedAreaSkin; } else { GUI.skin = noBackgroundSkin; } GUILayout.BeginHorizontal(); if (i == selectedAction) { GUILayout.Label( Controller.getInstance().getSelectedChapterDataControl().getScenesList().getScenes()[ GameRources.GetInstance().selectedSceneIndex].getActiveAreasList().getActiveAreas()[ selectedArea ].getActionsList().getActions()[i].getTypeName(), GUILayout.Width(windowWidth * 0.39f)); if (Controller.getInstance().playerMode() == Controller.FILE_ADVENTURE_1STPERSON_PLAYER) { if (GUILayout.Button(TC.get("ActionsList.NotRelevant"), GUILayout.Width(windowWidth * 0.39f))) { selectedAction = i; } } else { GUILayout.BeginHorizontal(GUILayout.Width(windowWidth * 0.39f)); Controller.getInstance().getSelectedChapterDataControl().getScenesList().getScenes()[ GameRources.GetInstance().selectedSceneIndex].getActiveAreasList().getActiveAreas()[ selectedArea].getActionsList().getActions()[i].setNeedsGoTo( GUILayout.Toggle( Controller.getInstance() .getSelectedChapterDataControl() .getScenesList() .getScenes()[ GameRources.GetInstance().selectedSceneIndex].getActiveAreasList() .getActiveAreas()[selectedArea].getActionsList().getActions()[i] .getNeedsGoTo(), "")); Controller.getInstance().getSelectedChapterDataControl().getScenesList().getScenes()[ GameRources.GetInstance().selectedSceneIndex].getActiveAreasList().getActiveAreas()[ selectedArea].getActionsList().getActions()[i].setKeepDistance( EditorGUILayout.IntField( Controller.getInstance() .getSelectedChapterDataControl() .getScenesList() .getScenes()[ GameRources.GetInstance().selectedSceneIndex].getActiveAreasList() .getActiveAreas()[selectedArea].getActionsList().getActions()[i] .getKeepDistance())); GUILayout.EndHorizontal(); } GUILayout.BeginVertical(); if (GUILayout.Button(TC.get("ActiveAreasList.Conditions"), GUILayout.Width(windowWidth * 0.1f))) { ConditionEditorWindow window = (ConditionEditorWindow)ScriptableObject.CreateInstance(typeof(ConditionEditorWindow)); window.Init( Controller.getInstance().getSelectedChapterDataControl().getScenesList().getScenes()[ GameRources.GetInstance().selectedSceneIndex].getActiveAreasList().getActiveAreas()[ selectedArea ].getActionsList().getActions()[i].getConditions()); } if (GUILayout.Button(TC.get("Element.Effects"), GUILayout.Width(windowWidth * 0.1f))) { EffectEditorWindow window = (EffectEditorWindow)ScriptableObject.CreateInstance(typeof(EffectEditorWindow)); window.Init( Controller.getInstance().getSelectedChapterDataControl().getScenesList().getScenes()[ GameRources.GetInstance().selectedSceneIndex].getActiveAreasList().getActiveAreas()[ selectedArea ].getActionsList().getActions()[i].getEffects()); } if (GUILayout.Button(TC.get("SmallAction.EditNotEffects"), GUILayout.Width(windowWidth * 0.1f))) { EffectEditorWindow window = (EffectEditorWindow)ScriptableObject.CreateInstance(typeof(EffectEditorWindow)); window.Init( Controller.getInstance().getSelectedChapterDataControl().getScenesList().getScenes()[ GameRources.GetInstance().selectedSceneIndex].getActiveAreasList().getActiveAreas()[ selectedArea ].getActionsList().getActions()[i].getNotEffectsController()); } GUILayout.EndVertical(); } else { if ( GUILayout.Button( Controller.getInstance().getSelectedChapterDataControl().getScenesList().getScenes()[ GameRources.GetInstance().selectedSceneIndex].getActiveAreasList().getActiveAreas()[ selectedArea].getActionsList().getActions()[i].getTypeName(), GUILayout.Width(windowWidth * 0.39f))) { selectedAction = i; } if (Controller.getInstance().playerMode() == Controller.FILE_ADVENTURE_1STPERSON_PLAYER) { if (GUILayout.Button(TC.get("ActionsList.NotRelevant"), GUILayout.Width(windowWidth * 0.39f))) { selectedAction = i; } } else { if ( GUILayout.Button( Controller.getInstance().getSelectedChapterDataControl().getScenesList().getScenes()[ GameRources.GetInstance().selectedSceneIndex].getActiveAreasList().getActiveAreas()[ selectedArea].getActionsList().getActions()[i].getNeedsGoTo().ToString(), GUILayout.Width(windowWidth * 0.39f))) { selectedAction = i; } } } GUILayout.EndHorizontal(); GUI.skin = defaultSkin; } } GUILayout.EndScrollView(); GUILayout.EndArea(); /* * Right action panel */ GUILayout.BeginArea(actionRightPanelRect); GUI.skin = noBackgroundSkin; if (GUILayout.Button(addTexture, GUILayout.MaxWidth(0.08f * windowWidth))) { addMenu.menu.ShowAsContext(); } if (GUILayout.Button(duplicateImg, GUILayout.MaxWidth(0.08f * windowWidth))) { Controller.getInstance().getSelectedChapterDataControl().getScenesList().getScenes()[ GameRources.GetInstance().selectedSceneIndex].getActiveAreasList().getActiveAreas()[selectedArea] .getActionsList() .duplicateElement(Controller.getInstance().getSelectedChapterDataControl().getScenesList().getScenes()[ GameRources.GetInstance().selectedSceneIndex].getActiveAreasList().getActiveAreas()[selectedArea] .getActionsList().getActions()[selectedAction]); } if (GUILayout.Button(clearImg, GUILayout.MaxWidth(0.08f * windowWidth))) { Controller.getInstance().getSelectedChapterDataControl().getScenesList().getScenes()[ GameRources.GetInstance().selectedSceneIndex].getActiveAreasList().getActiveAreas()[selectedArea] .getActionsList() .deleteElement(Controller.getInstance().getSelectedChapterDataControl().getScenesList().getScenes()[ GameRources.GetInstance().selectedSceneIndex].getActiveAreasList().getActiveAreas()[selectedArea] .getActionsList().getActions()[selectedAction], false); if (selectedAction >= 0) { selectedAction--; } } GUI.skin = defaultSkin; GUILayout.EndArea(); if (backgroundPath != "") { GUILayout.BeginArea(infoPreviewRect); // Show preview dialog if (GUILayout.Button(TC.get("DefaultClickAction.ShowDetails") + "/" + TC.get("GeneralText.Edit"))) { ActiveAreasEditor window = (ActiveAreasEditor)ScriptableObject.CreateInstance(typeof(ActiveAreasEditor)); window.Init(this, Controller.getInstance().getSelectedChapterDataControl().getScenesList().getScenes()[ GameRources.GetInstance().selectedSceneIndex], selectedArea); } GUILayout.EndArea(); GUI.DrawTexture(previewRect, backgroundPreviewTex, ScaleMode.ScaleToFit); } else { GUILayout.BeginArea(infoPreviewRect); GUILayout.Button("No background!"); GUILayout.EndArea(); } }
public override void Draw(int aID) { GUILayout.BeginArea(appearanceTableRect); GUILayout.BeginHorizontal(); GUILayout.Box(TC.get("Item.LookPanelTitle"), GUILayout.Width(windowWidth * 0.44f)); GUILayout.Box(TC.get("Conditions.Title"), GUILayout.Width(windowWidth * 0.44f)); GUILayout.EndHorizontal(); scrollPosition = GUILayout.BeginScrollView(scrollPosition); // Appearance table for (int i = 0; i < Controller.getInstance().getSelectedChapterDataControl().getItemsList().getItems()[GameRources.GetInstance().selectedItemIndex].getResourcesCount(); i++) { if (i == selectedAppearance) { GUI.skin = selectedAreaSkin; } else { GUI.skin = noBackgroundSkin; } tmpTex = (Controller.getInstance().getSelectedChapterDataControl().getItemsList().getItems()[ GameRources.GetInstance().selectedItemIndex].getResources()[i].getConditions().getBlocksCount() > 0? conditionsTex:noConditionsTex); GUILayout.BeginHorizontal(); if (i == selectedAppearance) { if (GUILayout.Button(Controller.getInstance().getSelectedChapterDataControl().getItemsList().getItems()[ GameRources.GetInstance().selectedItemIndex].getResources()[i].getName(), GUILayout.Width(windowWidth * 0.44f))) { OnAppearanceSelectionChange(i); } if (GUILayout.Button(tmpTex, GUILayout.Width(windowWidth * 0.44f))) { ConditionEditorWindow window = (ConditionEditorWindow)ScriptableObject.CreateInstance(typeof(ConditionEditorWindow)); window.Init(Controller.getInstance().getSelectedChapterDataControl().getItemsList().getItems()[ GameRources.GetInstance().selectedItemIndex].getResources()[i].getConditions()); } } else { if (GUILayout.Button(Controller.getInstance().getSelectedChapterDataControl().getItemsList().getItems()[ GameRources.GetInstance().selectedItemIndex].getResources()[i].getName(), GUILayout.Width(windowWidth * 0.44f))) { OnAppearanceSelectionChange(i); } if (GUILayout.Button(tmpTex, GUILayout.Width(windowWidth * 0.44f))) { OnAppearanceSelectionChange(i); } } GUILayout.EndHorizontal(); GUI.skin = defaultSkin; } GUILayout.EndScrollView(); GUILayout.EndArea(); /* * Right panel */ GUILayout.BeginArea(rightPanelRect); GUI.skin = noBackgroundSkin; if (GUILayout.Button(addTex, GUILayout.MaxWidth(0.08f * windowWidth))) { Controller.getInstance().getSelectedChapterDataControl().getItemsList().getItems()[ GameRources.GetInstance().selectedItemIndex].addElement(Controller.RESOURCES, ""); } if (GUILayout.Button(duplicateTex, GUILayout.MaxWidth(0.08f * windowWidth))) { Controller.getInstance().getSelectedChapterDataControl().getItemsList().getItems()[ GameRources.GetInstance().selectedItemIndex].duplicateElement(Controller.getInstance().getSelectedChapterDataControl().getItemsList().getItems()[ GameRources.GetInstance().selectedItemIndex].getResources()[selectedAppearance]); } if (GUILayout.Button(clearTex, GUILayout.MaxWidth(0.08f * windowWidth))) { Controller.getInstance().getSelectedChapterDataControl().getItemsList().getItems()[ GameRources.GetInstance().selectedItemIndex].deleteElement(Controller.getInstance().getSelectedChapterDataControl().getItemsList().getItems()[ GameRources.GetInstance().selectedItemIndex].getResources()[selectedAppearance], false); } GUI.skin = defaultSkin; GUILayout.EndArea(); GUILayout.Space(30); GUILayout.BeginArea(propertiesTable); // Background chooser GUILayout.Label(TC.get("Resources.DescriptionItemImage")); GUILayout.BeginHorizontal(); if (GUILayout.Button(clearTex, GUILayout.Width(0.05f * windowWidth))) { imagePath = ""; } GUILayout.Box(imagePath, GUILayout.Width(0.7f * windowWidth)); if (GUILayout.Button(TC.get("Buttons.Select"), GUILayout.Width(0.19f * windowWidth))) { ShowAssetChooser(AssetType.ITEM); } GUILayout.EndHorizontal(); // Icon chooser GUILayout.Label(TC.get("Resources.DescriptionItemIcon")); GUILayout.BeginHorizontal(); if (GUILayout.Button(clearTex, GUILayout.Width(0.05f * windowWidth))) { inventoryIconPath = ""; } GUILayout.Box(inventoryIconPath, GUILayout.Width(0.7f * windowWidth)); if (GUILayout.Button(TC.get("Buttons.Select"), GUILayout.Width(0.19f * windowWidth))) { ShowAssetChooser(AssetType.ICON); } GUILayout.EndHorizontal(); // Image over chooser GUILayout.Label(TC.get("Resources.DescriptionItemImageOver")); GUILayout.BeginHorizontal(); if (GUILayout.Button(clearTex, GUILayout.Width(0.05f * windowWidth))) { imageWhenOverPath = ""; } GUILayout.Box(imageWhenOverPath, GUILayout.Width(0.7f * windowWidth)); if (GUILayout.Button(TC.get("Buttons.Select"), GUILayout.Width(0.19f * windowWidth))) { ShowAssetChooser(AssetType.ITEM_OVER); } GUILayout.EndHorizontal(); GUILayout.EndArea(); if (imagePath != "") { GUI.DrawTexture(previewRect, imageTex, ScaleMode.ScaleToFit); } }
public override void Draw(int aID) { GUILayout.BeginArea(tableRect); GUILayout.BeginHorizontal(); GUILayout.Box(TC.get("ExitsList.NextScene"), GUILayout.Width(windowWidth * 0.24f)); GUILayout.Box(TC.get("ExitsList.Transition"), GUILayout.Width(windowWidth * 0.14f)); GUILayout.Box(TC.get("ExitsList.Appearance"), GUILayout.Width(windowWidth * 0.34f)); GUILayout.Box(TC.get("ExitsList.ConditionsAndEffects"), GUILayout.Width(windowWidth * 0.14f)); GUILayout.EndHorizontal(); scrollPosition = GUILayout.BeginScrollView(scrollPosition); for (int i = 0; i < Controller.getInstance().getSelectedChapterDataControl().getScenesList().getScenes()[ GameRources.GetInstance().selectedSceneIndex].getExitsList().getExitsList().Count; i++) { if (i == selectedExit) { GUI.skin = selectedAreaSkin; } else { GUI.skin = noBackgroundSkin; } GUILayout.BeginHorizontal(); if (GUILayout.Button(Controller.getInstance().getSelectedChapterDataControl().getScenesList().getScenes()[ GameRources.GetInstance().selectedSceneIndex].getExitsList().getExitsList()[i].getNextSceneId(), GUILayout.Width(windowWidth * 0.24f))) { ChangeExitSelection(i); } // When is selected - show transition menu if (selectedExit == i) { GUILayout.BeginVertical(); selectedTransitionType = EditorGUILayout.Popup(selectedTransitionType, transitionTypes, GUILayout.Width(windowWidth * 0.12f), GUILayout.MaxWidth(windowWidth * 0.12f)); if (selectedTransitionType != selectedTransitionTypeLast) { ChangeSelectedTransitionType(selectedTransitionType); } transitionTimeString = GUILayout.TextField(transitionTimeString, 3, GUILayout.Width(windowWidth * 0.12f), GUILayout.MaxWidth(windowWidth * 0.12f)); transitionTimeString = Regex.Replace(transitionTimeString, @"[^0-9 ]", ""); if (!transitionTimeString.Equals(transitionTimeStringLast)) { ChangeSelectedTransitionTime(transitionTimeString); } GUILayout.EndVertical(); } // When is not selected - show normal text else { if (GUILayout.Button(TC.get("GeneralText.Edit"), GUILayout.Width(windowWidth * 0.14f))) { ChangeExitSelection(i); } } if (GUILayout.Button(TC.get("GeneralText.Edit"), GUILayout.Width(windowWidth * 0.34f))) { ChangeExitSelection(i); ExitsAppearance window = (ExitsAppearance)ScriptableObject.CreateInstance(typeof(ExitsAppearance)); window.Init(this, "", selectedExit); } if (selectedExit == i) { GUILayout.BeginVertical(); if (GUILayout.Button(TC.get("Exit.EditConditions"), GUILayout.Width(windowWidth * 0.14f))) { ConditionEditorWindow window = (ConditionEditorWindow)ScriptableObject.CreateInstance(typeof(ConditionEditorWindow)); window.Init(Controller.getInstance().getSelectedChapterDataControl().getScenesList().getScenes()[ GameRources.GetInstance().selectedSceneIndex].getExitsList().getExitsList()[i].getConditions()); } if (GUILayout.Button(TC.get("GeneralText.EditEffects"), GUILayout.Width(windowWidth * 0.14f))) { EffectEditorWindow window = (EffectEditorWindow)ScriptableObject.CreateInstance(typeof(EffectEditorWindow)); window.Init(Controller.getInstance().getSelectedChapterDataControl().getScenesList().getScenes()[ GameRources.GetInstance().selectedSceneIndex].getExitsList().getExitsList()[i].getEffects()); } if (GUILayout.Button(TC.get("Exit.EditPostEffects"), GUILayout.Width(windowWidth * 0.14f))) { EffectEditorWindow window = (EffectEditorWindow)ScriptableObject.CreateInstance(typeof(EffectEditorWindow)); window.Init(Controller.getInstance().getSelectedChapterDataControl().getScenesList().getScenes()[ GameRources.GetInstance().selectedSceneIndex].getExitsList().getExitsList()[i].getPostEffects()); } if (GUILayout.Button(TC.get("Exit.EditNotEffects"), GUILayout.Width(windowWidth * 0.14f))) { EffectEditorWindow window = (EffectEditorWindow)ScriptableObject.CreateInstance(typeof(EffectEditorWindow)); window.Init(Controller.getInstance().getSelectedChapterDataControl().getScenesList().getScenes()[ GameRources.GetInstance().selectedSceneIndex].getExitsList().getExitsList()[i].getNotEffects()); } GUILayout.EndVertical(); } else { if (GUILayout.Button(TC.get("GeneralText.Edit"), GUILayout.Width(windowWidth * 0.14f))) { ChangeExitSelection(i); } } GUILayout.EndHorizontal(); GUI.skin = defaultSkin; } GUILayout.EndScrollView(); GUILayout.EndArea(); /* * Right panel */ GUILayout.BeginArea(rightPanelRect); GUI.skin = noBackgroundSkin; if (GUILayout.Button(addTexture, GUILayout.MaxWidth(0.08f * windowWidth))) { ExitNewLinkTo window = (ExitNewLinkTo)ScriptableObject.CreateInstance(typeof(ExitNewLinkTo)); window.Init(this); } if (GUILayout.Button(duplicateImg, GUILayout.MaxWidth(0.08f * windowWidth))) { Controller.getInstance().getSelectedChapterDataControl().getScenesList().getScenes()[ GameRources.GetInstance().selectedSceneIndex].getExitsList() .duplicateElement(Controller.getInstance().getSelectedChapterDataControl().getScenesList().getScenes()[ GameRources.GetInstance().selectedSceneIndex].getExitsList().getExits()[selectedExit]); } if (GUILayout.Button(moveUp, GUILayout.MaxWidth(0.08f * windowWidth))) { Controller.getInstance().getSelectedChapterDataControl().getScenesList().getScenes()[ GameRources.GetInstance().selectedSceneIndex].getExitsList() .moveElementUp(Controller.getInstance().getSelectedChapterDataControl().getScenesList().getScenes()[ GameRources.GetInstance().selectedSceneIndex].getExitsList().getExits()[selectedExit]); } if (GUILayout.Button(moveDown, GUILayout.MaxWidth(0.08f * windowWidth))) { Controller.getInstance().getSelectedChapterDataControl().getScenesList().getScenes()[ GameRources.GetInstance().selectedSceneIndex].getExitsList() .moveElementDown(Controller.getInstance().getSelectedChapterDataControl().getScenesList().getScenes()[ GameRources.GetInstance().selectedSceneIndex].getExitsList().getExits()[selectedExit]); } if (GUILayout.Button(clearImg, GUILayout.MaxWidth(0.08f * windowWidth))) { Controller.getInstance().getSelectedChapterDataControl().getScenesList().getScenes()[ GameRources.GetInstance().selectedSceneIndex].getExitsList() .deleteElement(Controller.getInstance().getSelectedChapterDataControl().getScenesList().getScenes()[ GameRources.GetInstance().selectedSceneIndex].getExitsList().getExits()[selectedExit], false); } GUI.skin = defaultSkin; GUILayout.EndArea(); if (backgroundPath != "") { GUILayout.BeginArea(infoPreviewRect); // Show preview dialog if (GUILayout.Button(TC.get("DefaultClickAction.ShowDetails") + "/" + TC.get("GeneralText.Edit"))) { ExitsEditor window = (ExitsEditor)ScriptableObject.CreateInstance(typeof(ExitsEditor)); window.Init(this, Controller.getInstance().getSelectedChapterDataControl().getScenesList().getScenes()[ GameRources.GetInstance().selectedSceneIndex], selectedExit); } GUILayout.EndArea(); GUI.DrawTexture(previewRect, backgroundPreviewTex, ScaleMode.ScaleToFit); } else { GUILayout.BeginArea(infoPreviewRect); GUILayout.Button("No background!"); GUILayout.EndArea(); } }
public override void Draw(int aID) { GUILayout.BeginArea(descriptionRect); GUILayout.Label(TC.get("NPC.Documentation")); fullCharacterDescription = GUILayout.TextArea(fullCharacterDescription, GUILayout.MinHeight(0.2f * windowHeight)); if (!fullCharacterDescription.Equals(fullCharacterDescriptionLast)) { OnCharacterDescriptionChanged(fullCharacterDescription); } GUILayout.EndArea(); /* * Desciptor table */ GUILayout.BeginArea(descriptionTableRect); GUILayout.BeginHorizontal(); GUILayout.Box(TC.get("DescriptionList.Descriptions"), GUILayout.Width(windowWidth * 0.44f)); GUILayout.Box(TC.get("Conditions.Title"), GUILayout.Width(windowWidth * 0.44f)); GUILayout.EndHorizontal(); scrollPosition = GUILayout.BeginScrollView(scrollPosition); for (int i = 0; i < Controller.getInstance().getSelectedChapterDataControl().getNPCsList().getNPCs()[ GameRources.GetInstance().selectedCharacterIndex].getDescriptionController().getDescriptionCount(); i++) { if (i == selectedDescription) { GUI.skin = selectedAreaSkin; } else { GUI.skin = noBackgroundSkin; } tmpTex = (Controller.getInstance().getSelectedChapterDataControl().getNPCsList().getNPCs()[ GameRources.GetInstance().selectedCharacterIndex].getDescriptionController() .getDescriptionController(i) .getConditionsController() .getBlocksCount() > 0 ? conditionsTex : noConditionsTex); GUILayout.BeginHorizontal(); if (i == selectedDescription) { if (GUILayout.Button(Controller.getInstance().getSelectedChapterDataControl().getNPCsList().getNPCs()[ GameRources.GetInstance().selectedCharacterIndex].getDescriptionController() .getDescriptionController(i) .getName(), GUILayout.Width(windowWidth * 0.44f))) { OnDescriptionSelectionChange(i); } if (GUILayout.Button(tmpTex, GUILayout.Width(windowWidth * 0.44f))) { //TODO???: condition editor } } else { if (GUILayout.Button(Controller.getInstance().getSelectedChapterDataControl().getNPCsList().getNPCs()[ GameRources.GetInstance().selectedCharacterIndex].getDescriptionController() .getDescriptionController(i) .getName(), GUILayout.Width(windowWidth * 0.44f))) { OnDescriptionSelectionChange(i); } if (GUILayout.Button(tmpTex, GUILayout.Width(windowWidth * 0.44f))) { OnDescriptionSelectionChange(i); } } GUILayout.EndHorizontal(); GUI.skin = defaultSkin; } GUILayout.EndScrollView(); GUILayout.EndArea(); /* * Right panel */ GUILayout.BeginArea(rightPanelRect); GUI.skin = noBackgroundSkin; if (GUILayout.Button(addTex, GUILayout.MaxWidth(0.08f * windowWidth))) { Controller.getInstance().getSelectedChapterDataControl().getNPCsList().getNPCs()[ GameRources.GetInstance().selectedCharacterIndex].getDescriptionController().addElement(); } if (GUILayout.Button(duplicateTex, GUILayout.MaxWidth(0.08f * windowWidth))) { Controller.getInstance().getSelectedChapterDataControl().getNPCsList().getNPCs()[ GameRources.GetInstance().selectedCharacterIndex].getDescriptionController().duplicateElement(); } if (GUILayout.Button(clearTex, GUILayout.MaxWidth(0.08f * windowWidth))) { Controller.getInstance().getSelectedChapterDataControl().getNPCsList().getNPCs()[ GameRources.GetInstance().selectedCharacterIndex].getDescriptionController().deleteElement(); } GUI.skin = defaultSkin; GUILayout.EndArea(); /* * Properties panel */ GUILayout.BeginArea(settingsTable); GUILayout.Label("Name"); GUILayout.BeginHorizontal(); descriptionName = GUILayout.TextField(descriptionName, GUILayout.MaxWidth(0.6f * windowWidth)); if (!descriptionName.Equals(descriptionNameLast)) { OnDescriptionNameChanged(descriptionName); } if (!string.IsNullOrEmpty(descriptionSound)) { audioTextureTmp = audioTexture; } else { audioTextureTmp = noAudioTexture; } GUILayout.Label(audioTextureTmp); GUILayout.Label(descriptionSound); if (GUILayout.Button(TC.get("Buttons.Select"))) { ShowAssetChooser(AssetType.NAME_SOUND); } if (GUILayout.Button(clearTex)) { OnDescriptorNameSoundChange(""); } GUILayout.EndHorizontal(); GUILayout.Label(TC.get("NPC.Description")); GUILayout.BeginHorizontal(); briefDescription = GUILayout.TextField(briefDescription, GUILayout.MaxWidth(0.6f * windowWidth)); if (!briefDescription.Equals(briefDescriptionLast)) { OnBriefDescriptionChanged(briefDescription); } if (!string.IsNullOrEmpty(briefDescriptionSound)) { audioTextureTmp = audioTexture; } else { audioTextureTmp = noAudioTexture; } GUILayout.Label(audioTextureTmp); GUILayout.Label(briefDescriptionSound); if (GUILayout.Button(TC.get("Buttons.Select"))) { ShowAssetChooser(AssetType.BRIEF_DESCRIPTION_SOUND); } if (GUILayout.Button(clearTex)) { OnDescriptorBriefSoundChange(""); } GUILayout.EndHorizontal(); GUILayout.Label(TC.get("NPC.DetailedDescription")); GUILayout.BeginHorizontal(); detailedDescription = GUILayout.TextField(detailedDescription, GUILayout.MaxWidth(0.6f * windowWidth)); if (!detailedDescription.Equals(detailedDescriptionLast)) { OnDetailedDescriptionChanged(detailedDescription); } if (!string.IsNullOrEmpty(detailedDescriptionSound)) { audioTextureTmp = audioTexture; } else { audioTextureTmp = noAudioTexture; } GUILayout.Label(audioTextureTmp); GUILayout.Label(detailedDescriptionSound); if (GUILayout.Button(TC.get("Buttons.Select"))) { ShowAssetChooser(AssetType.DETAILED_DESCRIPTION_SOUND); } if (GUILayout.Button(clearTex)) { OnDescriptorDetailedSoundChange(""); } GUILayout.EndHorizontal(); GUILayout.EndArea(); }
void OnShowBubbleChange() { shouldShowSpeachBubbleLast = shouldShowSpeachBubble; Controller.getInstance().getSelectedChapterDataControl().getNPCsList().getNPCs()[ GameRources.GetInstance().selectedCharacterIndex].setShowsSpeechBubbles(shouldShowSpeachBubble); }
public override void Draw(int aID) { GUILayout.BeginArea(descriptionRect); GUILayout.Label(TC.get("Item.Documentation")); fullItemDescription = GUILayout.TextField(fullItemDescription); if (!fullItemDescription.Equals(fullItemDescriptionLast)) { OnItemDescriptionChanged(fullItemDescription); } GUILayout.EndArea(); /* * Desciptor table */ GUILayout.BeginArea(descriptionTableRect); GUILayout.BeginHorizontal(); GUILayout.Box(TC.get("DescriptionList.Descriptions"), GUILayout.Width(windowWidth * 0.44f)); GUILayout.Box(TC.get("Conditions.Title"), GUILayout.Width(windowWidth * 0.44f)); GUILayout.EndHorizontal(); scrollPosition = GUILayout.BeginScrollView(scrollPosition); for (int i = 0; i < Controller.getInstance().getSelectedChapterDataControl().getItemsList().getItems()[ GameRources.GetInstance().selectedItemIndex].getDescriptionController().getDescriptionCount(); i++) { if (i == selectedDescription) { GUI.skin = selectedAreaSkin; } else { GUI.skin = noBackgroundSkin; } tmpTex = (Controller.getInstance().getSelectedChapterDataControl().getItemsList().getItems()[ GameRources.GetInstance().selectedItemIndex].getDescriptionController() .getDescriptionController(i) .getConditionsController() .getBlocksCount() > 0 ? conditionsTex : noConditionsTex); GUILayout.BeginHorizontal(); if (i == selectedDescription) { if (GUILayout.Button(Controller.getInstance().getSelectedChapterDataControl().getItemsList().getItems()[ GameRources.GetInstance().selectedItemIndex].getDescriptionController() .getDescriptionController(i) .getName(), GUILayout.Width(windowWidth * 0.44f))) { OnDescriptionSelectionChange(i); } if (GUILayout.Button(tmpTex, GUILayout.Width(windowWidth * 0.44f))) { ConditionEditorWindow window = (ConditionEditorWindow)ScriptableObject.CreateInstance(typeof(ConditionEditorWindow)); window.Init( Controller.getInstance().getSelectedChapterDataControl().getItemsList().getItems()[ GameRources.GetInstance().selectedItemIndex].getDescriptionController() .getDescriptionController(i) .getConditionsController()); } } else { if (GUILayout.Button(Controller.getInstance().getSelectedChapterDataControl().getItemsList().getItems()[ GameRources.GetInstance().selectedItemIndex].getDescriptionController() .getDescriptionController(i) .getName(), GUILayout.Width(windowWidth * 0.44f))) { OnDescriptionSelectionChange(i); } if (GUILayout.Button(tmpTex, GUILayout.Width(windowWidth * 0.44f))) { OnDescriptionSelectionChange(i); } } GUILayout.EndHorizontal(); GUI.skin = defaultSkin; } GUILayout.EndScrollView(); GUILayout.EndArea(); /* * Right panel */ GUILayout.BeginArea(rightPanelRect); GUI.skin = noBackgroundSkin; if (GUILayout.Button(addTex, GUILayout.MaxWidth(0.08f * windowWidth))) { Controller.getInstance().getSelectedChapterDataControl().getItemsList().getItems()[ GameRources.GetInstance().selectedItemIndex].getDescriptionController().addElement(); } if (GUILayout.Button(duplicateTex, GUILayout.MaxWidth(0.08f * windowWidth))) { Controller.getInstance().getSelectedChapterDataControl().getItemsList().getItems()[ GameRources.GetInstance().selectedItemIndex].getDescriptionController().duplicateElement(); } if (GUILayout.Button(clearTex, GUILayout.MaxWidth(0.08f * windowWidth))) { Controller.getInstance().getSelectedChapterDataControl().getItemsList().getItems()[ GameRources.GetInstance().selectedItemIndex].getDescriptionController().deleteElement(); } GUI.skin = defaultSkin; GUILayout.EndArea(); /* * Properties panel */ GUILayout.BeginArea(settingsTable); GUILayout.Label(TC.get("Item.Name")); GUILayout.BeginHorizontal(); descriptionName = GUILayout.TextField(descriptionName, GUILayout.MaxWidth(0.6f * windowWidth)); if (!descriptionName.Equals(descriptionNameLast)) { OnDescriptionNameChanged(descriptionName); } if (!string.IsNullOrEmpty(descriptionSound)) { audioTextureTmp = audioTexture; } else { audioTextureTmp = noAudioTexture; } GUILayout.Label(audioTextureTmp); GUILayout.Label(descriptionSound); if (GUILayout.Button(TC.get("Buttons.Select"))) { ShowAssetChooser(AssetType.NAME_SOUND); } if (GUILayout.Button(clearTex)) { OnDescriptorNameSoundChange(""); } GUILayout.EndHorizontal(); GUILayout.Label(TC.get("Item.Description")); GUILayout.BeginHorizontal(); briefDescription = GUILayout.TextField(briefDescription, GUILayout.MaxWidth(0.6f * windowWidth)); if (!briefDescription.Equals(briefDescriptionLast)) { OnBriefDescriptionChanged(briefDescription); } if (!string.IsNullOrEmpty(briefDescriptionSound)) { audioTextureTmp = audioTexture; } else { audioTextureTmp = noAudioTexture; } GUILayout.Label(audioTextureTmp); GUILayout.Label(briefDescriptionSound); if (GUILayout.Button(TC.get("Buttons.Select"))) { ShowAssetChooser(AssetType.BRIEF_DESCRIPTION_SOUND); } if (GUILayout.Button(clearTex)) { OnDescriptorBriefSoundChange(""); } GUILayout.EndHorizontal(); GUILayout.Label(TC.get("Item.DetailedDescription")); GUILayout.BeginHorizontal(); detailedDescription = GUILayout.TextField(detailedDescription, GUILayout.MaxWidth(0.6f * windowWidth)); if (!detailedDescription.Equals(detailedDescriptionLast)) { OnDetailedDescriptionChanged(detailedDescription); } if (!string.IsNullOrEmpty(detailedDescriptionSound)) { audioTextureTmp = audioTexture; } else { audioTextureTmp = noAudioTexture; } GUILayout.Label(audioTextureTmp); GUILayout.Label(detailedDescriptionSound); if (GUILayout.Button(TC.get("Buttons.Select"))) { ShowAssetChooser(AssetType.DETAILED_DESCRIPTION_SOUND); } if (GUILayout.Button(clearTex)) { OnDescriptorDetailedSoundChange(""); } GUILayout.EndHorizontal(); GUILayout.FlexibleSpace(); GUILayout.Label(TC.get("Item.ReturnsWhenDragged.Title")); GUILayout.Box(TC.get("Item.ReturnsWhenDragged.Description")); dragdropToogle = GUILayout.Toggle(dragdropToogle, TC.get("Item.ReturnsWhenDragged")); if (dragdropToogle != dragdropToogleLast) { OnDragAndDropToogleValueChange(dragdropToogle); } GUILayout.FlexibleSpace(); GUILayout.Label(TC.get("Behaviour")); GUILayout.BeginHorizontal(); selectedBehaviourType = EditorGUILayout.Popup(selectedBehaviourType, behaviourTypes, GUILayout.MaxWidth(0.2f * windowWidth)); if (selectedBehaviourType != selectedBehaviourTypeLast) { OnBehaviourChange(selectedBehaviourType); } GUILayout.Box(behaviourTypesDescription[selectedBehaviourType]); GUILayout.EndHorizontal(); GUILayout.FlexibleSpace(); GUILayout.Label(TC.get("Resources.TransitionTime")); GUILayout.Box(TC.get("Resources.TransitionTime.Description")); transitionTime = GUILayout.TextField(transitionTime); transitionTime = (Regex.Match(transitionTime, "^[0-9]{1,3}$").Success ? transitionTime : transitionTimeLast); if (!transitionTime.Equals(transitionTimeLast)) { OnTransitionTimeChange(transitionTime); } GUILayout.EndArea(); }
public override void Draw(int aID) { GUILayout.BeginArea(tableRect); GUILayout.BeginHorizontal(); GUILayout.Box(TC.get("ElementList.Layer"), GUILayout.Width(windowWidth * 0.12f)); GUILayout.Box("", GUILayout.Width(windowWidth * 0.06f)); GUILayout.Box(TC.get("ElementList.Title"), GUILayout.Width(windowWidth * 0.39f)); GUILayout.Box(TC.get("Conditions.Title"), GUILayout.Width(windowWidth * 0.29f)); GUILayout.EndHorizontal(); scrollPosition = GUILayout.BeginScrollView(scrollPosition); for (int i = 0; i < Controller.getInstance().getSelectedChapterDataControl().getScenesList().getScenes()[ GameRources.GetInstance().selectedSceneIndex].getReferencesList().getAllReferencesDataControl().Count; i++) { if (i == selectedElement) { GUI.skin = selectedElementSkin; } GUILayout.BeginHorizontal(); if ( GUILayout.Button( Controller.getInstance().getSelectedChapterDataControl().getScenesList().getScenes()[ GameRources.GetInstance().selectedSceneIndex].getReferencesList() .getAllReferencesDataControl()[i] .getLayer().ToString(), GUILayout.Width(windowWidth * 0.12f))) { selectedElement = i; } if (Controller.getInstance().getSelectedChapterDataControl().getScenesList().getScenes()[ GameRources.GetInstance().selectedSceneIndex].getReferencesList() .getAllReferencesDataControl()[i].getErdc() != null) { // FOR ELEMENT ERDC Controller.getInstance().getSelectedChapterDataControl().getScenesList().getScenes()[ GameRources.GetInstance().selectedSceneIndex].getReferencesList().getAllReferencesDataControl()[i] .getErdc().setVisible( GUILayout.Toggle( Controller.getInstance().getSelectedChapterDataControl().getScenesList().getScenes()[ GameRources.GetInstance().selectedSceneIndex].getReferencesList() .getAllReferencesDataControl()[i].getErdc().isVisible(), "", GUILayout.Width(windowWidth * 0.06f))); if ( GUILayout.Button( Controller.getInstance().getSelectedChapterDataControl().getScenesList().getScenes()[ GameRources.GetInstance().selectedSceneIndex].getReferencesList() .getAllReferencesDataControl()[i] .getErdc().getElementId(), GUILayout.Width(windowWidth * 0.39f))) { selectedElement = i; } if (GUILayout.Button(conditionTex, GUILayout.Width(windowWidth * 0.29f))) { selectedElement = i; ConditionEditorWindow window = (ConditionEditorWindow)ScriptableObject.CreateInstance(typeof(ConditionEditorWindow)); window.Init(Controller.getInstance().getSelectedChapterDataControl().getScenesList().getScenes()[ GameRources.GetInstance().selectedSceneIndex].getReferencesList() .getAllReferencesDataControl()[i].getErdc().getConditions()); } } else { if ( GUILayout.Button("", GUILayout.Width(windowWidth * 0.06f))) { selectedElement = i; } if ( GUILayout.Button("", GUILayout.Width(windowWidth * 0.39f))) { selectedElement = i; } if (GUILayout.Button(conditionTex, GUILayout.Width(windowWidth * 0.29f))) { selectedElement = i; } } GUILayout.EndHorizontal(); GUI.skin = defaultSkin; } GUILayout.EndScrollView(); GUILayout.EndArea(); /* * Right panel */ GUILayout.BeginArea(rightPanelRect); GUI.skin = noBackgroundSkin; if (GUILayout.Button(addTexture, GUILayout.MaxWidth(0.08f * windowWidth))) { addMenu.menu.ShowAsContext(); } if (GUILayout.Button(moveUp, GUILayout.MaxWidth(0.08f * windowWidth))) { Controller.getInstance().getSelectedChapterDataControl().getScenesList().getScenes()[ GameRources.GetInstance().selectedSceneIndex].getReferencesList() .moveElementUp(Controller.getInstance().getSelectedChapterDataControl().getScenesList().getScenes()[ GameRources.GetInstance().selectedSceneIndex].getReferencesList().getAllReferencesDataControl()[ selectedElement].getErdc()); } if (GUILayout.Button(moveDown, GUILayout.MaxWidth(0.08f * windowWidth))) { Controller.getInstance().getSelectedChapterDataControl().getScenesList().getScenes()[ GameRources.GetInstance().selectedSceneIndex].getReferencesList() .moveElementDown(Controller.getInstance().getSelectedChapterDataControl().getScenesList().getScenes()[ GameRources.GetInstance().selectedSceneIndex].getReferencesList().getAllReferencesDataControl()[ selectedElement].getErdc()); } if (GUILayout.Button(clearImg, GUILayout.MaxWidth(0.08f * windowWidth))) { Controller.getInstance().getSelectedChapterDataControl().getScenesList().getScenes()[ GameRources.GetInstance().selectedSceneIndex].getReferencesList() .deleteElement(Controller.getInstance().getSelectedChapterDataControl().getScenesList().getScenes()[ GameRources.GetInstance().selectedSceneIndex].getReferencesList().getAllReferencesDataControl()[ selectedElement].getErdc(), false); } GUI.skin = defaultSkin; GUILayout.EndArea(); if (backgroundPath != "") { GUILayout.BeginArea(infoPreviewRect); // Show preview dialog // Button visible only is there is at least 1 object if (selectedElement != -1 && Controller.getInstance().getSelectedChapterDataControl().getScenesList().getScenes()[ GameRources.GetInstance().selectedSceneIndex].getReferencesList().getAllReferencesDataControl()[ selectedElement].getErdc() != null) { if (GUILayout.Button(TC.get("DefaultClickAction.ShowDetails") + "/" + TC.get("GeneralText.Edit"))) { ObjectInSceneRefrencesEditor window = (ObjectInSceneRefrencesEditor) ScriptableObject.CreateInstance(typeof(ObjectInSceneRefrencesEditor)); window.Init(this, Controller.getInstance().getSelectedChapterDataControl().getScenesList().getScenes()[ GameRources.GetInstance().selectedSceneIndex], selectedElement); } } GUILayout.EndArea(); GUI.DrawTexture(previewRect, backgroundPreviewTex, ScaleMode.ScaleToFit); } else { GUILayout.BeginArea(infoPreviewRect); GUILayout.Button("No background!"); GUILayout.EndArea(); } }
void OnBubbleBorderChange(Color val) { bubbleBorderColorLast = val; Controller.getInstance().getSelectedChapterDataControl().getNPCsList().getNPCs()[ GameRources.GetInstance().selectedCharacterIndex].setBubbleBorderColor(ColorConverter.ColorToHex(val)); }
public override void Draw(int aID) { /** * TABLE */ GUILayout.BeginArea(tableRect); GUILayout.Label(TC.get("Resources.DescriptionBookBackground")); GUILayout.BeginHorizontal(); GUILayout.Box(backgroundPath, GUILayout.MaxWidth(0.85f * windowWidth)); if (GUILayout.Button(TC.get("Buttons.Select"), GUILayout.MaxWidth(0.15f * windowWidth))) { ImageFileOpenDialog imageDialog = (ImageFileOpenDialog)ScriptableObject.CreateInstance(typeof(ImageFileOpenDialog)); imageDialog.Init(this, BaseFileOpenDialog.FileType.BOOK_IMAGE_PARAGRAPH); } GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(); // NORMAL ARROWS PART GUILayout.Label(TC.get("Resources.ArrowLeftNormal"), GUILayout.MaxWidth(0.5f * windowWidth)); GUILayout.Label(TC.get("Resources.ArrowRightNormal"), GUILayout.MaxWidth(0.5f * windowWidth)); GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(); if (GUILayout.Button(clearImg, GUILayout.MaxWidth(0.05f * windowWidth))) { //TODO: clear } GUILayout.Box(leftNormalArrowPath, GUILayout.MaxWidth(0.3f * windowWidth)); if (GUILayout.Button(TC.get("Buttons.Select"), GUILayout.MaxWidth(0.1f * windowWidth))) { ImageFileOpenDialog imageDialog = (ImageFileOpenDialog)ScriptableObject.CreateInstance(typeof(ImageFileOpenDialog)); imageDialog.Init(this, BaseFileOpenDialog.FileType.BOOK_ARROW_LEFT_NORMAL); } GUILayout.Space(0.05f * windowWidth); if (GUILayout.Button(clearImg, GUILayout.MaxWidth(0.05f * windowWidth))) { //TODO: clear } GUILayout.Box(rightNormalArrowPath, GUILayout.MaxWidth(0.3f * windowWidth)); if (GUILayout.Button(TC.get("Buttons.Select"), GUILayout.MaxWidth(0.1f * windowWidth))) { ImageFileOpenDialog imageDialog = (ImageFileOpenDialog)ScriptableObject.CreateInstance(typeof(ImageFileOpenDialog)); imageDialog.Init(this, BaseFileOpenDialog.FileType.BOOK_ARROW_RIGHT_NORMAL); } GUILayout.EndHorizontal(); GUILayout.Space(10); // OVER ARROWS PART GUILayout.BeginHorizontal(); GUILayout.Label(TC.get("Resources.ArrowLeftOver"), GUILayout.MaxWidth(0.5f * windowWidth)); GUILayout.Label(TC.get("Resources.ArrowRightOver"), GUILayout.MaxWidth(0.5f * windowWidth)); GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(); if (GUILayout.Button(clearImg, GUILayout.MaxWidth(0.05f * windowWidth))) { //TODO: clear } GUILayout.Box(leftOverArrowPath, GUILayout.MaxWidth(0.3f * windowWidth)); if (GUILayout.Button(TC.get("Buttons.Select"), GUILayout.MaxWidth(0.1f * windowWidth))) { ImageFileOpenDialog imageDialog = (ImageFileOpenDialog)ScriptableObject.CreateInstance(typeof(ImageFileOpenDialog)); imageDialog.Init(this, BaseFileOpenDialog.FileType.BOOK_ARROW_LEFT_OVER); } GUILayout.Space(0.05f * windowWidth); if (GUILayout.Button(clearImg, GUILayout.MaxWidth(0.05f * windowWidth))) { //TODO: clear } GUILayout.Box(rightOverArrowPath, GUILayout.MaxWidth(0.3f * windowWidth)); if (GUILayout.Button(TC.get("Buttons.Select"), GUILayout.MaxWidth(0.1f * windowWidth))) { ImageFileOpenDialog imageDialog = (ImageFileOpenDialog)ScriptableObject.CreateInstance(typeof(ImageFileOpenDialog)); imageDialog.Init(this, BaseFileOpenDialog.FileType.BOOK_ARROW_RIGHT_OVER); } GUILayout.EndHorizontal(); GUILayout.EndArea(); if (backgroundPath != "") { /** * PREVIEW BUTTON */ GUILayout.BeginArea(infoPreviewRect); if (GUILayout.Button(TC.get("GeneralText.Edit"))) { BooksAppearanceEditor window = (BooksAppearanceEditor)ScriptableObject.CreateInstance(typeof(BooksAppearanceEditor)); window.Init(this, Controller.getInstance().getSelectedChapterDataControl().getBooksList().getBooks()[ GameRources.GetInstance().selectedBookIndex]); } GUILayout.EndArea(); /** * PREVIEW TEXTURE */ GUI.DrawTexture(previewRect, backgroundPreview, ScaleMode.ScaleToFit); } else { GUILayout.BeginArea(infoPreviewRect); GUILayout.Button("No background!"); GUILayout.EndArea(); } }
public override void Draw(int aID) { GUILayout.BeginArea(tableRect); GUILayout.BeginHorizontal(); GUILayout.Box(TC.get("Barrier.Title"), GUILayout.Width(windowWidth * 0.45f)); GUILayout.Box(TC.get("Conditions.Title"), GUILayout.Width(windowWidth * 0.45f)); GUILayout.EndHorizontal(); scrollPosition = GUILayout.BeginScrollView(scrollPosition); for (int i = 0; i < Controller.getInstance().getSelectedChapterDataControl().getScenesList().getScenes()[ GameRources.GetInstance().selectedSceneIndex].getBarriersList().getBarriersList().Count; i++) { if (i == selectedArea) { GUI.skin = selectedAreaSkin; } GUILayout.BeginHorizontal(); if (GUILayout.Button(Controller.getInstance().getSelectedChapterDataControl().getScenesList().getScenes()[ GameRources.GetInstance().selectedSceneIndex].getBarriersList().getBarriersList()[i].getId(), GUILayout.Width(windowWidth * 0.44f))) { selectedArea = i; } if (GUILayout.Button(conditionTex, GUILayout.Width(windowWidth * 0.44f))) { selectedArea = i; ConditionEditorWindow window = (ConditionEditorWindow)ScriptableObject.CreateInstance(typeof(ConditionEditorWindow)); window.Init(Controller.getInstance().getSelectedChapterDataControl().getScenesList().getScenes()[ GameRources.GetInstance().selectedSceneIndex].getBarriersList().getBarriersList()[i].getConditions()); } GUILayout.EndHorizontal(); GUI.skin = defaultSkin; } GUILayout.EndScrollView(); GUILayout.EndArea(); /* * Right panel */ GUILayout.BeginArea(rightPanelRect); GUI.skin = noBackgroundSkin; if (GUILayout.Button(addTexture, GUILayout.MaxWidth(0.08f * windowWidth))) { BarrierNewName window = (BarrierNewName)ScriptableObject.CreateInstance(typeof(BarrierNewName)); window.Init(this, "IdBarrier"); } if (GUILayout.Button(duplicateImg, GUILayout.MaxWidth(0.08f * windowWidth))) { Controller.getInstance().getSelectedChapterDataControl().getScenesList().getScenes()[ GameRources.GetInstance().selectedSceneIndex].getBarriersList() .duplicateElement(Controller.getInstance().getSelectedChapterDataControl().getScenesList().getScenes()[ GameRources.GetInstance().selectedSceneIndex].getBarriersList().getBarriers()[selectedArea]); } if (GUILayout.Button(moveUp, GUILayout.MaxWidth(0.08f * windowWidth))) { Controller.getInstance().getSelectedChapterDataControl().getScenesList().getScenes()[ GameRources.GetInstance().selectedSceneIndex].getBarriersList() .moveElementUp(Controller.getInstance().getSelectedChapterDataControl().getScenesList().getScenes()[ GameRources.GetInstance().selectedSceneIndex].getBarriersList().getBarriers()[selectedArea]); } if (GUILayout.Button(moveDown, GUILayout.MaxWidth(0.08f * windowWidth))) { Controller.getInstance().getSelectedChapterDataControl().getScenesList().getScenes()[ GameRources.GetInstance().selectedSceneIndex].getBarriersList() .moveElementDown(Controller.getInstance().getSelectedChapterDataControl().getScenesList().getScenes()[ GameRources.GetInstance().selectedSceneIndex].getBarriersList().getBarriers()[selectedArea]); } if (GUILayout.Button(clearImg, GUILayout.MaxWidth(0.08f * windowWidth))) { Controller.getInstance().getSelectedChapterDataControl().getScenesList().getScenes()[ GameRources.GetInstance().selectedSceneIndex].getBarriersList() .deleteElement(Controller.getInstance().getSelectedChapterDataControl().getScenesList().getScenes()[ GameRources.GetInstance().selectedSceneIndex].getBarriersList().getBarriers()[selectedArea], false); } GUI.skin = defaultSkin; GUILayout.EndArea(); if (backgroundPath != "") { GUILayout.BeginArea(infoPreviewRect); // Show preview dialog if (GUILayout.Button(TC.get("DefaultClickAction.ShowDetails") + "/" + TC.get("GeneralText.Edit"))) { // BarrierEditor window = (BarrierEditor)ScriptableObject.CreateInstance(typeof(BarrierEditor)); window.Init(this, Controller.getInstance().getSelectedChapterDataControl().getScenesList().getScenes()[ GameRources.GetInstance().selectedSceneIndex], selectedArea); } GUILayout.EndArea(); GUI.DrawTexture(previewRect, backgroundPreviewTex, ScaleMode.ScaleToFit); } else { GUILayout.BeginArea(infoPreviewRect); GUILayout.Button("No background!"); GUILayout.EndArea(); } }
public override void Draw(int aID) { GUILayout.BeginArea(tableRect); GUILayout.BeginHorizontal(); GUILayout.Box(TC.get("BookParagraphsList.ParagraphType"), GUILayout.Width(windowWidth * 0.19f)); GUILayout.Box(TC.get("BookParagraphsList.Content"), GUILayout.Width(windowWidth * 0.69f)); GUILayout.EndHorizontal(); scrollPosition = GUILayout.BeginScrollView(scrollPosition); for (int i = 0; i < Controller.getInstance().getSelectedChapterDataControl().getBooksList().getBooks()[ GameRources.GetInstance().selectedBookIndex].getBookParagraphsList().getBookParagraphs().Count; i++) { GUI.skin = noBackgroundSkin; if (i == selectedElement) { GUI.skin = selectedElementSkin; } GUILayout.BeginHorizontal(); tmpType = Controller.getInstance().getSelectedChapterDataControl().getBooksList().getBooks()[ GameRources.GetInstance().selectedBookIndex].getBookParagraphsList().getBookParagraphs()[ i].getType(); switch (tmpType) { case Controller.BOOK_TITLE_PARAGRAPH: tmpTexture = titleParagraphTex; tmpParagraphTypeName = TC.get("Element.Name14"); break; case Controller.BOOK_BULLET_PARAGRAPH: tmpTexture = bulletParagraphTex; tmpParagraphTypeName = TC.get("Element.Name16"); break; case Controller.BOOK_TEXT_PARAGRAPH: tmpTexture = textParagraphTex; tmpParagraphTypeName = TC.get("Element.Name15"); break; case Controller.BOOK_IMAGE_PARAGRAPH: tmpTexture = imageParagraphTex; tmpParagraphTypeName = TC.get("Element.Name1"); break; } if (GUILayout.Button(new GUIContent(tmpParagraphTypeName, tmpTexture), GUILayout.Width(windowWidth * 0.19f), GUILayout.MaxHeight(0.05f * windowHeight))) { selectedElement = i; } if (selectedElement != i) { if ( GUILayout.Button( Controller.getInstance().getSelectedChapterDataControl().getBooksList().getBooks()[ GameRources.GetInstance().selectedBookIndex].getBookParagraphsList().getBookParagraphs() [ i].getParagraphContent(), GUILayout.Width(windowWidth * 0.69f))) { selectedElement = i; } } else { if (tmpType == Controller.BOOK_IMAGE_PARAGRAPH) { if (GUILayout.Button(clearTex, GUILayout.MaxWidth(0.09f * windowWidth))) { } if (GUILayout.Button(TC.get("Buttons.Select"), GUILayout.MaxWidth(0.20f * windowWidth))) { ImageFileOpenDialog imageDialog = (ImageFileOpenDialog)ScriptableObject.CreateInstance(typeof(ImageFileOpenDialog)); imageDialog.Init(this, BaseFileOpenDialog.FileType.BOOK_IMAGE_PARAGRAPH); } GUILayout.Box(Controller.getInstance().getSelectedChapterDataControl().getBooksList().getBooks()[ GameRources.GetInstance().selectedBookIndex].getBookParagraphsList().getBookParagraphs()[ i].getParagraphContent(), GUILayout.MaxWidth(0.4f * windowWidth)); } else { editableFieldContent = Controller.getInstance().getSelectedChapterDataControl().getBooksList().getBooks()[ GameRources.GetInstance().selectedBookIndex].getBookParagraphsList().getBookParagraphs()[ i].getParagraphContent(); editableFieldContent = GUILayout.TextField(editableFieldContent, GUILayout.Width(0.69f * windowWidth)); Controller.getInstance().getSelectedChapterDataControl().getBooksList().getBooks()[ GameRources.GetInstance().selectedBookIndex].getBookParagraphsList().getBookParagraphs()[ i].setParagraphTextContent(editableFieldContent); } } GUILayout.EndHorizontal(); GUI.skin = defaultSkin; } GUILayout.EndScrollView(); GUILayout.EndArea(); /* * Right panel */ GUILayout.BeginArea(rightPanelRect); GUI.skin = noBackgroundSkin; if (GUILayout.Button(addTex, GUILayout.MaxWidth(0.08f * windowWidth))) { addMenu.menu.ShowAsContext(); } if (GUILayout.Button(moveUpTex, GUILayout.MaxWidth(0.08f * windowWidth))) { Controller.getInstance().getSelectedChapterDataControl().getBooksList().getBooks()[ GameRources.GetInstance().selectedBookIndex].getBookParagraphsList().moveElementUp( Controller.getInstance().getSelectedChapterDataControl().getBooksList().getBooks()[ GameRources.GetInstance().selectedBookIndex].getBookParagraphsList().getBookParagraphs()[ selectedElement]); } if (GUILayout.Button(moveDownTex, GUILayout.MaxWidth(0.08f * windowWidth))) { Controller.getInstance().getSelectedChapterDataControl().getBooksList().getBooks()[ GameRources.GetInstance().selectedBookIndex].getBookParagraphsList().moveElementDown( Controller.getInstance().getSelectedChapterDataControl().getBooksList().getBooks()[ GameRources.GetInstance().selectedBookIndex].getBookParagraphsList().getBookParagraphs()[ selectedElement]); } if (GUILayout.Button(clearTex, GUILayout.MaxWidth(0.08f * windowWidth))) { Controller.getInstance().getSelectedChapterDataControl().getBooksList().getBooks()[ GameRources.GetInstance().selectedBookIndex].getBookParagraphsList().deleteElement( Controller.getInstance().getSelectedChapterDataControl().getBooksList().getBooks()[ GameRources.GetInstance().selectedBookIndex].getBookParagraphsList().getBookParagraphs()[ selectedElement], false); } GUI.skin = defaultSkin; GUILayout.EndArea(); }
public void OnCliked() { Controller.getInstance().getSelectedChapterDataControl().getItemsList().getItems()[ GameRources.GetInstance().selectedItemIndex].getActionsList().addElement(Controller.ACTION_DRAG_TO, ""); }
private void OnItemDescriptionChanged(string val) { fullItemDescriptionLast = val; Controller.getInstance().getSelectedChapterDataControl().getItemsList().getItems()[ GameRources.GetInstance().selectedItemIndex].setDocumentation(fullItemDescription); }
public override void Draw(int aID) { GUILayout.BeginArea(actionTableRect); GUILayout.BeginHorizontal(); GUILayout.Box(TC.get("Element.Action"), GUILayout.Width(windowWidth * 0.39f)); GUILayout.Box(TC.get("ActionsList.NeedsGoTo"), GUILayout.Width(windowWidth * 0.39f)); GUILayout.Box(TC.get("Conditions.Title"), GUILayout.Width(windowWidth * 0.1f)); GUILayout.EndHorizontal(); scrollPosition = GUILayout.BeginScrollView(scrollPosition, GUILayout.ExpandWidth(false)); // Action table for (int i = 0; i < Controller.getInstance().getSelectedChapterDataControl().getItemsList().getItems()[ GameRources.GetInstance().selectedItemIndex].getActionsList().getActions().Count; i++) { if (i == selectedAction) { GUI.skin = selectedAreaSkin; } else { GUI.skin = noBackgroundSkin; } tmpTex = (Controller.getInstance().getSelectedChapterDataControl().getItemsList().getItems()[ GameRources.GetInstance().selectedItemIndex].getActionsList().getActions()[i].getConditions() .getBlocksCount() > 0 ? conditionsTex : noConditionsTex); GUILayout.BeginHorizontal(); if (i == selectedAction) { int t = Controller.getInstance().getSelectedChapterDataControl().getItemsList().getItems()[ GameRources.GetInstance().selectedItemIndex].getActionsList().getActions()[i].getType(); if (t == Controller.ACTION_USE_WITH || t == Controller.ACTION_GIVE_TO || t == Controller.ACTION_DRAG_TO) { selectedTarget = EditorGUILayout.Popup( Controller.getInstance().getSelectedChapterDataControl().getItemsList().getItems()[ GameRources.GetInstance().selectedItemIndex].getActionsList().getActions()[i] .getTypeName(), selectedTarget, joinedNamesList, GUILayout.Width(windowWidth * 0.39f)); if (selectedTarget != selectedTargetLast) { ChangeActionTarget(selectedTarget); } } else { GUILayout.Label( Controller.getInstance().getSelectedChapterDataControl().getItemsList().getItems()[ GameRources.GetInstance().selectedItemIndex].getActionsList().getActions()[i].getTypeName(), GUILayout.Width(windowWidth * 0.39f)); } if (Controller.getInstance().playerMode() == Controller.FILE_ADVENTURE_1STPERSON_PLAYER) { if (GUILayout.Button(TC.get("ActionsList.NotRelevant"), GUILayout.Width(windowWidth * 0.39f))) { OnActionSelectionChange(i); } } else { GUILayout.BeginHorizontal(GUILayout.Width(windowWidth * 0.39f)); Controller.getInstance().getSelectedChapterDataControl().getItemsList().getItems()[ GameRources.GetInstance().selectedItemIndex].getActionsList().getActions()[i].setNeedsGoTo( GUILayout.Toggle( Controller.getInstance().getSelectedChapterDataControl().getItemsList().getItems()[ GameRources.GetInstance().selectedItemIndex].getActionsList().getActions()[i] .getNeedsGoTo(), "")); Controller.getInstance().getSelectedChapterDataControl().getItemsList().getItems()[ GameRources.GetInstance().selectedItemIndex].getActionsList().getActions()[i].setKeepDistance( EditorGUILayout.IntField( Controller.getInstance().getSelectedChapterDataControl().getItemsList().getItems()[ GameRources.GetInstance().selectedItemIndex].getActionsList().getActions()[i] .getKeepDistance())); GUILayout.EndHorizontal(); } if (GUILayout.Button(tmpTex, GUILayout.Width(windowWidth * 0.1f))) { ConditionEditorWindow window = (ConditionEditorWindow)ScriptableObject.CreateInstance(typeof(ConditionEditorWindow)); window.Init(Controller.getInstance().getSelectedChapterDataControl().getItemsList().getItems()[ GameRources.GetInstance().selectedItemIndex].getActionsList().getActions()[i].getConditions()); } } else { if (GUILayout.Button(Controller.getInstance().getSelectedChapterDataControl().getItemsList().getItems()[ GameRources.GetInstance().selectedItemIndex].getActionsList().getActions()[i].getTypeName(), GUILayout.Width(windowWidth * 0.39f))) { OnActionSelectionChange(i); } if (Controller.getInstance().playerMode() == Controller.FILE_ADVENTURE_1STPERSON_PLAYER) { if (GUILayout.Button(TC.get("ActionsList.NotRelevant"), GUILayout.Width(windowWidth * 0.39f))) { OnActionSelectionChange(i); } } else { if ( GUILayout.Button( Controller.getInstance().getSelectedChapterDataControl().getItemsList().getItems()[ GameRources.GetInstance().selectedItemIndex].getActionsList().getActions()[i] .getNeedsGoTo().ToString(), GUILayout.Width(windowWidth * 0.39f))) { OnActionSelectionChange(i); } } if (GUILayout.Button(tmpTex, GUILayout.Width(windowWidth * 0.1f))) { OnActionSelectionChange(i); } } GUILayout.EndHorizontal(); GUI.skin = defaultSkin; } GUILayout.EndScrollView(); GUILayout.EndArea(); /* * Right panel */ GUILayout.BeginArea(rightPanelRect); GUI.skin = noBackgroundSkin; if (GUILayout.Button(addTex, GUILayout.MaxWidth(0.08f * windowWidth))) { addMenu.menu.ShowAsContext(); } if (GUILayout.Button(duplicateTex, GUILayout.MaxWidth(0.08f * windowWidth))) { Controller.getInstance().getSelectedChapterDataControl().getItemsList().getItems()[ GameRources.GetInstance().selectedItemIndex].getActionsList() .duplicateElement(Controller.getInstance().getSelectedChapterDataControl().getItemsList().getItems()[ GameRources.GetInstance().selectedItemIndex].getActionsList().getActions()[selectedAction]); } //if (GUILayout.Button(moveUp, GUILayout.MaxWidth(0.08f * windowWidth))) //{ // Controller.getInstance().getSelectedChapterDataControl().getItemsList().getItems()[ // GameRources.GetInstance().selectedItemIndex].getActionsList().moveElementUp(Controller.getInstance().getSelectedChapterDataControl().getItemsList().getItems()[ // GameRources.GetInstance().selectedItemIndex].getActionsList().getActions()[selectedAction]); //} //if (GUILayout.Button(moveDown, GUILayout.MaxWidth(0.08f * windowWidth))) //{ // Controller.getInstance().getSelectedChapterDataControl().getItemsList().getItems()[ // GameRources.GetInstance().selectedItemIndex].getActionsList().moveElementDown(Controller.getInstance().getSelectedChapterDataControl().getItemsList().getItems()[ // GameRources.GetInstance().selectedItemIndex].getActionsList().getActions()[selectedAction]); //} if (GUILayout.Button(clearTex, GUILayout.MaxWidth(0.08f * windowWidth))) { Controller.getInstance().getSelectedChapterDataControl().getItemsList().getItems()[ GameRources.GetInstance().selectedItemIndex].getActionsList() .deleteElement(Controller.getInstance().getSelectedChapterDataControl().getItemsList().getItems()[ GameRources.GetInstance().selectedItemIndex].getActionsList().getActions()[selectedAction], false); if (selectedAction >= 0) { selectedAction--; } } GUI.skin = defaultSkin; GUILayout.EndArea(); GUILayout.BeginArea(descriptionRect); GUILayout.Label(TC.get("Action.Documentation")); GUILayout.Space(20); documentation = GUILayout.TextArea(documentation); if (!documentation.Equals(documentationLast)) { OnDocumentationChanged(documentation); } GUILayout.EndArea(); GUILayout.BeginArea(effectsRect); if (selectedAction < 0) { GUI.enabled = false; } if (GUILayout.Button(TC.get("Element.Effects"))) { EffectEditorWindow window = (EffectEditorWindow)ScriptableObject.CreateInstance(typeof(EffectEditorWindow)); window.Init(Controller.getInstance().getSelectedChapterDataControl().getItemsList().getItems()[ GameRources.GetInstance().selectedItemIndex].getActionsList().getActions()[selectedAction].getEffects()); } GUI.enabled = true; GUILayout.EndArea(); }
private void OnDragAndDropToogleValueChange(bool val) { dragdropToogleLast = val; Controller.getInstance().getSelectedChapterDataControl().getItemsList().getItems()[ GameRources.GetInstance().selectedItemIndex].setReturnsWhenDragged(val); }
private void OnCharacterDescriptionChanged(string val) { fullCharacterDescriptionLast = val; Controller.getInstance().getSelectedChapterDataControl().getNPCsList().getNPCs()[ GameRources.GetInstance().selectedCharacterIndex].setDocumentation(val); }
private void OnTransitionTimeChange(string val) { transitionTimeLast = val; Controller.getInstance().getSelectedChapterDataControl().getItemsList().getItems()[ GameRources.GetInstance().selectedItemIndex].setResourcesTransitionTime(int.Parse(val)); }
public void OnCliked() { Controller.getInstance().getSelectedChapterDataControl().getScenesList().getScenes()[ GameRources.GetInstance().selectedSceneIndex].getActiveAreasList().getActiveAreas()[ AddItemActionMenu.GetSelectedActiveArea()].getActionsList().addElement(Controller.ACTION_CUSTOM, ""); }
private void ChangeName(string s) { Controller.getInstance().getCharapterList().getSelectedChapterData().getScenes()[GameRources.GetInstance().selectedCutsceneIndex].setName(s); nameOfCutsceneLast = s; }
// Two methods responsible for showing right window content // - concrete item info or base window view public void ShowBaseWindowView() { isConcreteItemVisible = false; GameRources.GetInstance().selectedCutsceneIndex = -1; }
private void ChangeDocumentation(string s) { Controller.getInstance().getCharapterList().getSelectedChapterData().getScenes()[GameRources.GetInstance().selectedCutsceneIndex].setDocumentation(s); descriptionOfCutsceneLast = s; }
private void OnDocumentationChanged(string s) { Controller.getInstance().getCharapterList().getSelectedChapterData().getBooks()[GameRources.GetInstance().selectedBookIndex].setDocumentation(s); documentationLast = s; }
public CutscenesWindowDocumentation(Rect aStartPos, GUIContent aContent, GUIStyle aStyle, params GUILayoutOption[] aOptions) : base(aStartPos, aContent, aStyle, aOptions) { string doc = ""; if (GameRources.GetInstance().selectedCutsceneIndex >= 0) { doc = Controller.getInstance().getCharapterList().getSelectedChapterData().getCutscenes()[ GameRources.GetInstance().selectedCutsceneIndex].getDocumentation(); } string name = ""; if (GameRources.GetInstance().selectedCutsceneIndex >= 0) { name = Controller.getInstance().getCharapterList().getSelectedChapterData().getCutscenes()[GameRources.GetInstance().selectedCutsceneIndex].getName(); } doc = (doc == null ? "" : doc); name = (name == null ? "" : name); descriptionOfCutscene = descriptionOfCutsceneLast = doc; nameOfCutscene = nameOfCutsceneLast = name; windowHeight = aStartPos.height; }
void OnVideosceneCanSkipVideoChanged(bool val) { canSkipVideoLast = val; Controller.getInstance().getSelectedChapterDataControl().getCutscenesList().getCutscenes()[ GameRources.GetInstance().selectedCutsceneIndex].setCanSkip(val); }
void OnGUI() { /** * UPPER MENU */ GUILayout.BeginArea(buttonMenuRect); GUILayout.BeginHorizontal(); if (GUILayout.Button(TC.get("MenuFile.Title"))) { fileMenu.menu.ShowAsContext(); } //if (GUILayout.Button(Language.GetText("GeneralText.Edit"))) //{ // editMenu.menu.ShowAsContext(); //} //if (GUILayout.Button(Language.GetText("ADVENTURE"))) //{ // adventureMenu.menu.ShowAsContext(); //} if (GUILayout.Button(TC.get("MenuChapters.Title"))) { chaptersMenu.menu.ShowAsContext(); } //if (GUILayout.Button(Language.GetText("RUN"))) //{ // runMenu.menu.ShowAsContext(); //} if (GUILayout.Button(TC.get("MenuConfiguration.Title"))) { configurationMenu.menu.ShowAsContext(); } if (GUILayout.Button(TC.get("About"))) { aboutMenu.menu.ShowAsContext(); } GUILayout.EndHorizontal(); GUILayout.EndArea(); /** * LEFT MENU */ GUILayout.BeginArea(leftMenuRect); GUILayout.BeginVertical(); //GUILayout.BeginHorizontal(GUILayout.MaxWidth(25), GUILayout.MaxHeight(25)); //if (GUILayout.Button(undoTexture, GUILayout.MaxWidth(25), GUILayout.MaxHeight(25))) //{ // UndoAction(); //} //GUILayout.Space(5); //if (GUILayout.Button(redoTexture, GUILayout.MaxWidth(25), GUILayout.MaxHeight(25))) //{ // RedoAction(); //} //GUILayout.EndHorizontal(); //GUILayout.Space(25); scrollPosition = GUILayout.BeginScrollView(scrollPosition); // Button event chapter if (GUILayout.Button(TC.get("Element.Name0"))) { chapterWindow = new ChapterWindow(windowRect, new GUIContent(TC.get("Element.Name0")), "Window"); OnWindowTypeChanged(EditorWindowType.Chapter); } // Button event scene GUILayout.BeginHorizontal(); if (GUILayout.Button(leftMenuContentScene)) { OnWindowTypeChanged(EditorWindowType.Scenes); scenesWindow.ShowBaseWindowView(); } //Add button scene if (openedWindow == EditorWindowType.Scenes) { if (GUILayout.Button(addTexture)) { ChapterElementNameInputPopup window = (ChapterElementNameInputPopup) ScriptableObject.CreateInstance(typeof(ChapterElementNameInputPopup)); window.Init(this, "Scene", EditorWindowType.Scenes); } } GUILayout.EndHorizontal(); // Item sublist scene if (openedWindow == EditorWindowType.Scenes) { GUI.skin = leftSubMenuSkin; for (int i = 0; i < Controller.getInstance().getCharapterList().getSelectedChapterData().getScenes().Count; i++) { if (i == GameRources.GetInstance().selectedSceneIndex) { GUI.skin = leftSubMenuConcreteItemSkin; } if ( GUILayout.Button( Controller.getInstance().getCharapterList().getSelectedChapterData().getScenes()[i].getId())) { scenesWindow.ShowItemWindowView(i); } if (i == GameRources.GetInstance().selectedSceneIndex) { GUILayout.BeginHorizontal(); if (GUILayout.Button("Rename")) { Debug.Log("Rename"); } if (GUILayout.Button(duplicateImg)) { Controller.getInstance() .getCharapterList() .getSelectedChapterDataControl() .getScenesList() .duplicateElement( Controller.getInstance() .getCharapterList() .getSelectedChapterDataControl() .getScenesList() .getScenes()[i]); } if (GUILayout.Button(deleteImg)) { Controller.getInstance() .getCharapterList() .getSelectedChapterDataControl() .getScenesList() .deleteElement( Controller.getInstance() .getCharapterList() .getSelectedChapterDataControl() .getScenesList() .getScenes()[i], false); scenesWindow.ShowBaseWindowView(); } GUILayout.EndHorizontal(); GUI.skin = leftSubMenuSkin; } } GUI.skin = defaultGUISkin; } // Button event cutscene GUILayout.BeginHorizontal(); if (GUILayout.Button(leftMenuContentCutscene)) { OnWindowTypeChanged(EditorWindowType.Cutscenes); cutscenesWindow.ShowBaseWindowView(); } //Add button cutscene if (openedWindow == EditorWindowType.Cutscenes) { if (GUILayout.Button(addTexture)) { ChapterElementNewCutsceneInputPopup window = (ChapterElementNewCutsceneInputPopup) ScriptableObject.CreateInstance(typeof(ChapterElementNewCutsceneInputPopup)); window.Init(this, "Cutscene", EditorWindowType.Cutscenes); } } GUILayout.EndHorizontal(); // Item sublist cutscene if (openedWindow == EditorWindowType.Cutscenes) { GUI.skin = leftSubMenuSkin; for (int i = 0; i < Controller.getInstance().getCharapterList().getSelectedChapterData().getCutscenes().Count; i++) { if (i == GameRources.GetInstance().selectedCutsceneIndex) { GUI.skin = leftSubMenuConcreteItemSkin; } if ( GUILayout.Button( Controller.getInstance().getCharapterList().getSelectedChapterData().getCutscenes()[i].getId())) { cutscenesWindow.ShowItemWindowView(i); } if (i == GameRources.GetInstance().selectedCutsceneIndex) { GUILayout.BeginHorizontal(); if (GUILayout.Button("Rename")) { Debug.Log("Rename"); } if (GUILayout.Button(deleteImg)) { Controller.getInstance() .getCharapterList() .getSelectedChapterDataControl() .getCutscenesList() .deleteElement( Controller.getInstance() .getCharapterList() .getSelectedChapterDataControl() .getCutscenesList() .getCutscenes()[i], false); scenesWindow.ShowBaseWindowView(); } GUILayout.EndHorizontal(); GUI.skin = leftSubMenuSkin; } } GUI.skin = defaultGUISkin; } // Button event book GUILayout.BeginHorizontal(); if (GUILayout.Button(leftMenuContentBook)) { OnWindowTypeChanged(EditorWindowType.Books); booksWindow.ShowBaseWindowView(); } //Add button book if (openedWindow == EditorWindowType.Books) { if (GUILayout.Button(addTexture)) { ChapterElementNameInputPopup window = (ChapterElementNameInputPopup) ScriptableObject.CreateInstance(typeof(ChapterElementNameInputPopup)); window.Init(this, "Book", EditorWindowType.Books); } } GUILayout.EndHorizontal(); // Item sublist book if (openedWindow == EditorWindowType.Books) { GUI.skin = leftSubMenuSkin; for (int i = 0; i < Controller.getInstance().getCharapterList().getSelectedChapterData().getBooks().Count; i++) { if (i == GameRources.GetInstance().selectedBookIndex) { GUI.skin = leftSubMenuConcreteItemSkin; } if ( GUILayout.Button( Controller.getInstance().getCharapterList().getSelectedChapterData().getBooks()[i].getId())) { booksWindow.ShowItemWindowView(i); } if (i == GameRources.GetInstance().selectedBookIndex) { GUILayout.BeginHorizontal(); if (GUILayout.Button("Rename")) { Debug.Log("Rename"); } if (GUILayout.Button(duplicateImg)) { Controller.getInstance() .getCharapterList() .getSelectedChapterDataControl() .getBooksList() .duplicateElement( Controller.getInstance() .getCharapterList() .getSelectedChapterDataControl() .getBooksList() .getBooks()[i]); } if (GUILayout.Button(deleteImg)) { Controller.getInstance() .getCharapterList() .getSelectedChapterDataControl() .getBooksList() .deleteElement( Controller.getInstance() .getCharapterList() .getSelectedChapterDataControl() .getBooksList() .getBooks()[i], false); scenesWindow.ShowBaseWindowView(); } GUILayout.EndHorizontal(); GUI.skin = leftSubMenuSkin; } } GUI.skin = defaultGUISkin; } // Button event item GUILayout.BeginHorizontal(); if (GUILayout.Button(leftMenuContentItem)) { OnWindowTypeChanged(EditorWindowType.Items); itemsWindow.ShowBaseWindowView(); } //Add button item if (openedWindow == EditorWindowType.Items) { if (GUILayout.Button(addTexture)) { ChapterElementNameInputPopup window = (ChapterElementNameInputPopup) ScriptableObject.CreateInstance(typeof(ChapterElementNameInputPopup)); window.Init(this, "Item", EditorWindowType.Items); } } GUILayout.EndHorizontal(); // Item sublist item if (openedWindow == EditorWindowType.Items) { GUI.skin = leftSubMenuSkin; for (int i = 0; i < Controller.getInstance().getCharapterList().getSelectedChapterData().getItems().Count; i++) { if (i == GameRources.GetInstance().selectedItemIndex) { GUI.skin = leftSubMenuConcreteItemSkin; } if ( GUILayout.Button( Controller.getInstance().getCharapterList().getSelectedChapterData().getItems()[i].getId())) { itemsWindow.ShowItemWindowView(i); } if (i == GameRources.GetInstance().selectedItemIndex) { GUILayout.BeginHorizontal(); if (GUILayout.Button("Rename")) { Debug.Log("Rename"); } if (GUILayout.Button(duplicateImg)) { Controller.getInstance() .getCharapterList() .getSelectedChapterDataControl() .getItemsList() .duplicateElement( Controller.getInstance() .getCharapterList() .getSelectedChapterDataControl() .getItemsList() .getItems()[i]); } if (GUILayout.Button(deleteImg)) { Controller.getInstance() .getCharapterList() .getSelectedChapterDataControl() .getItemsList() .deleteElement( Controller.getInstance() .getCharapterList() .getSelectedChapterDataControl() .getItemsList() .getItems()[i], false); scenesWindow.ShowBaseWindowView(); } GUILayout.EndHorizontal(); GUI.skin = leftSubMenuSkin; } } GUI.skin = defaultGUISkin; } // Button event item GUILayout.BeginHorizontal(); if (GUILayout.Button(leftMenuContentSetItem)) { OnWindowTypeChanged(EditorWindowType.SetItems); setItemsWindow.ShowBaseWindowView(); } //Add button item if (openedWindow == EditorWindowType.SetItems) { if (GUILayout.Button(addTexture)) { ChapterElementNameInputPopup window = (ChapterElementNameInputPopup) ScriptableObject.CreateInstance(typeof(ChapterElementNameInputPopup)); window.Init(this, "Atrezzo", EditorWindowType.SetItems); } } GUILayout.EndHorizontal(); // Item sublist item if (openedWindow == EditorWindowType.SetItems) { GUI.skin = leftSubMenuSkin; for (int i = 0; i < Controller.getInstance().getCharapterList().getSelectedChapterData().getAtrezzo().Count; i++) { if (i == GameRources.GetInstance().selectedSetItemIndex) { GUI.skin = leftSubMenuConcreteItemSkin; } if ( GUILayout.Button( Controller.getInstance().getCharapterList().getSelectedChapterData().getAtrezzo()[i].getId())) { setItemsWindow.ShowItemWindowView(i); } if (i == GameRources.GetInstance().selectedSetItemIndex) { GUILayout.BeginHorizontal(); if (GUILayout.Button("Rename")) { Debug.Log("Rename"); } if (GUILayout.Button(duplicateImg)) { Controller.getInstance() .getCharapterList() .getSelectedChapterDataControl() .getAtrezzoList() .duplicateElement( Controller.getInstance() .getCharapterList() .getSelectedChapterDataControl() .getAtrezzoList() .getAtrezzoList()[i]); } if (GUILayout.Button(deleteImg)) { Controller.getInstance() .getCharapterList() .getSelectedChapterDataControl() .getAtrezzoList() .deleteElement( Controller.getInstance() .getCharapterList() .getSelectedChapterDataControl() .getAtrezzoList() .getAtrezzoList()[i], false); scenesWindow.ShowBaseWindowView(); } GUILayout.EndHorizontal(); GUI.skin = leftSubMenuSkin; } } GUI.skin = defaultGUISkin; } // Button event player if (GUILayout.Button(leftMenuContentPlayer)) { OnWindowTypeChanged(EditorWindowType.Player); } // Button event NPC GUILayout.BeginHorizontal(); if (GUILayout.Button(leftMenuContentCharacter)) { OnWindowTypeChanged(EditorWindowType.Characters); characterWindow.ShowBaseWindowView(); } //Add button NPC if (openedWindow == EditorWindowType.Characters) { if (GUILayout.Button(addTexture)) { ChapterElementNameInputPopup window = (ChapterElementNameInputPopup) ScriptableObject.CreateInstance(typeof(ChapterElementNameInputPopup)); window.Init(this, "Character", EditorWindowType.Characters); } } GUILayout.EndHorizontal(); // Item sublist NPC if (openedWindow == EditorWindowType.Characters) { GUI.skin = leftSubMenuSkin; for (int i = 0; i < Controller.getInstance().getCharapterList().getSelectedChapterData().getCharacters().Count; i++) { if (i == GameRources.GetInstance().selectedCharacterIndex) { GUI.skin = leftSubMenuConcreteItemSkin; } if ( GUILayout.Button( Controller.getInstance().getCharapterList().getSelectedChapterData().getCharacters()[i].getId())) { characterWindow.ShowItemWindowView(i); } if (i == GameRources.GetInstance().selectedCharacterIndex) { GUILayout.BeginHorizontal(); if (GUILayout.Button("Rename")) { Debug.Log("Rename"); } if (GUILayout.Button(duplicateImg)) { Controller.getInstance() .getCharapterList() .getSelectedChapterDataControl() .getNPCsList() .duplicateElement( Controller.getInstance() .getCharapterList() .getSelectedChapterDataControl() .getNPCsList() .getNPCs()[i]); } if (GUILayout.Button(deleteImg)) { Controller.getInstance() .getCharapterList() .getSelectedChapterDataControl() .getNPCsList() .deleteElement( Controller.getInstance() .getCharapterList() .getSelectedChapterDataControl() .getNPCsList() .getNPCs()[i], false); scenesWindow.ShowBaseWindowView(); } GUILayout.EndHorizontal(); GUI.skin = leftSubMenuSkin; } } GUI.skin = defaultGUISkin; } // Button event Conversation GUILayout.BeginHorizontal(); if (GUILayout.Button(leftMenuContentConversation)) { OnWindowTypeChanged(EditorWindowType.Conversations); } //Add button Conversation if (openedWindow == EditorWindowType.Conversations) { if (GUILayout.Button(addTexture)) { ChapterElementNameInputPopup window = (ChapterElementNameInputPopup) ScriptableObject.CreateInstance(typeof(ChapterElementNameInputPopup)); window.Init(this, "Conversation", EditorWindowType.Conversations); } } GUILayout.EndHorizontal(); // Item sublist book if (openedWindow == EditorWindowType.Conversations) { GUI.skin = leftSubMenuSkin; for (int i = 0; i < Controller.getInstance().getCharapterList().getSelectedChapterData().getConversations().Count; i++) { if (i == GameRources.GetInstance().selectedConversationIndex) { GUI.skin = leftSubMenuConcreteItemSkin; if (GUILayout.Button( Controller.getInstance().getCharapterList().getSelectedChapterData().getConversations()[i] .getId())) { ConversationEditorWindow window = (ConversationEditorWindow) ScriptableObject.CreateInstance(typeof(ConversationEditorWindow)); window.Init( (GraphConversation) Controller.getInstance().getCharapterList().getSelectedChapterData().getConversations()[ i]); } GUILayout.BeginHorizontal(); if (GUILayout.Button(duplicateImg)) { Controller.getInstance() .getCharapterList() .getSelectedChapterDataControl() .getConversationsList() .duplicateElement( Controller.getInstance() .getCharapterList() .getSelectedChapterDataControl() .getConversationsList() .getConversations()[i]); } if (GUILayout.Button(deleteImg)) { Controller.getInstance() .getCharapterList() .getSelectedChapterDataControl() .getConversationsList() .deleteElement( Controller.getInstance() .getCharapterList() .getSelectedChapterDataControl() .getConversationsList() .getConversations()[i], false); } GUILayout.EndHorizontal(); GUI.skin = leftSubMenuSkin; } else { if (GUILayout.Button( Controller.getInstance().getCharapterList().getSelectedChapterData().getConversations()[i] .getId())) { GameRources.GetInstance().selectedConversationIndex = i; } } } GUI.skin = defaultGUISkin; } // Button event player if (GUILayout.Button(leftMenuContentAdvanced)) { OnWindowTypeChanged(EditorWindowType.AdvancedFeatures); } GUILayout.EndScrollView(); GUILayout.EndVertical(); GUILayout.EndArea(); /** * WINDOWS */ BeginWindows(); switch (openedWindow) { case EditorWindowType.Chapter: m_Window1 = chapterWindow; break; case EditorWindowType.Scenes: m_Window1 = scenesWindow; break; case EditorWindowType.Cutscenes: m_Window1 = cutscenesWindow; break; case EditorWindowType.Books: m_Window1 = booksWindow; break; case EditorWindowType.Items: m_Window1 = itemsWindow; break; case EditorWindowType.SetItems: m_Window1 = setItemsWindow; break; case EditorWindowType.Player: m_Window1 = playerWindow; break; case EditorWindowType.Characters: m_Window1 = characterWindow; break; case EditorWindowType.Conversations: m_Window1 = conversationWindow; break; case EditorWindowType.AdvancedFeatures: m_Window1 = advencedFeaturesWindow; break; } if (m_Window1 != null) { m_Window1.OnGUI(); } EndWindows(); }
public override void Draw(int aID) { GUILayout.BeginArea(appearanceTableRect); GUILayout.BeginHorizontal(); GUILayout.Box(TC.get("Scene.LookPanelTitle"), GUILayout.Width(windowWidth * 0.44f)); GUILayout.Box(TC.get("Conditions.Title"), GUILayout.Width(windowWidth * 0.44f)); GUILayout.EndHorizontal(); scrollPosition = GUILayout.BeginScrollView(scrollPosition); // Appearance table for (int i = 0; i < Controller.getInstance().getSelectedChapterDataControl().getScenesList().getScenes()[GameRources.GetInstance().selectedSceneIndex].getActiveAreasList().getActiveAreasList().Count; i++) { GUILayout.BeginHorizontal(); GUILayout.Label(Controller.getInstance().getSelectedChapterDataControl().getScenesList().getScenes()[ GameRources.GetInstance().selectedSceneIndex].getActiveAreasList().getActiveAreasList()[i].getId(), GUILayout.Width(windowWidth * 0.44f)); GUILayout.Label(Controller.getInstance().getSelectedChapterDataControl().getScenesList().getScenes()[GameRources.GetInstance().selectedSceneIndex].getActiveAreasList().getActiveAreasList()[i].getConditions ().size().ToString(), GUILayout.Width(windowWidth * 0.44f)); GUILayout.EndHorizontal(); } GUILayout.EndScrollView(); GUILayout.EndArea(); /* * Right panel */ GUILayout.BeginArea(rightPanelRect); GUI.skin = noBackgroundSkin; if (GUILayout.Button(addTexture, GUILayout.MaxWidth(0.08f * windowWidth))) { Debug.Log("ADD"); } if (GUILayout.Button(duplicateImg, GUILayout.MaxWidth(0.08f * windowWidth))) { Debug.Log("Duplicate"); } if (GUILayout.Button(clearImg, GUILayout.MaxWidth(0.08f * windowWidth))) { Debug.Log("Clear"); } GUI.skin = defaultSkin; GUILayout.EndArea(); GUILayout.Space(30); GUILayout.BeginArea(propertiesTable); // Background chooser GUILayout.Label(TC.get("Background image of the scene")); GUILayout.BeginHorizontal(); if (GUILayout.Button(clearImg, GUILayout.Width(0.1f * windowWidth))) { backgroundPath = ""; } GUILayout.Box(backgroundPath, GUILayout.Width(0.7f * windowWidth)); if (GUILayout.Button(TC.get("Buttons.Select"), GUILayout.Width(0.19f * windowWidth))) { ShowAssetChooser(AssetType.BACKGROUND); } GUILayout.EndHorizontal(); // Foreground chooser GUILayout.Label(TC.get("Resources.DescriptionSceneForeground")); GUILayout.BeginHorizontal(); if (GUILayout.Button(clearImg, GUILayout.Width(0.1f * windowWidth))) { foregroundMaskPath = ""; } GUILayout.Box(foregroundMaskPath, GUILayout.Width(0.7f * windowWidth)); if (GUILayout.Button(TC.get("Buttons.Select"), GUILayout.Width(0.19f * windowWidth))) { ShowAssetChooser(AssetType.FOREGROUND); } GUILayout.EndHorizontal(); // Music chooser GUILayout.Label(TC.get("Resources.DescriptionSceneMusic")); GUILayout.BeginHorizontal(); if (GUILayout.Button(clearImg, GUILayout.Width(0.1f * windowWidth))) { musicPath = ""; } GUILayout.Box(musicPath, GUILayout.Width(0.7f * windowWidth)); if (GUILayout.Button(TC.get("Buttons.Select"), GUILayout.Width(0.19f * windowWidth))) { ShowAssetChooser(AssetType.MUSIC); } GUILayout.EndHorizontal(); GUILayout.EndArea(); if (backgroundPath != "") { GUI.DrawTexture(previewRect, backgroundPreview, ScaleMode.ScaleToFit); } }
public CutscenesWindowEndConfiguration(Rect aStartPos, GUIContent aContent, GUIStyle aStyle, params GUILayoutOption[] aOptions) : base(aStartPos, aContent, aStyle, aOptions) { possibleOptions = new string[] { TC.get("Cutscene.ReturnToLastScene"), TC.get("Cutscene.ChapterEnd"), TC.get("Cutscene.GoToNextScene") }; transitionTypes = new string[] { TC.get("NextScene.NoTransition"), TC.get("NextScene.TopToBottom"), TC.get("NextScene.BottomToTop"), TC.get("NextScene.LeftToRight"), TC.get("NextScene.RightToLeft"), TC.get("NextScene.FadeIn") }; scenesNextNames = Controller.getInstance().getSelectedChapterDataControl().getScenesList().getScenesIDs(); cutscenesNextNames = Controller.getInstance().getSelectedChapterDataControl().getCutscenesList().getCutscenesIDs(); // Both scenes and cutscenes are necessary for next scene popup joinedNextScenesList = new string[scenesNextNames.Length + cutscenesNextNames.Length]; scenesNextNames.CopyTo(joinedNextScenesList, 0); cutscenesNextNames.CopyTo(joinedNextScenesList, scenesNextNames.Length); windowWidth = aStartPos.width; windowHeight = aStartPos.height; selectorRect = new Rect(0f, 0.2f * windowHeight, 0.9f * windowWidth, 0.2f * windowHeight); goesToNewSceneRect = new Rect(0.2f * windowWidth, 0.35f * windowHeight, 0.6f * windowWidth, 0.35f * windowHeight); selectedOption = selectedOptionLast = 0; selectedSceneNext = selectedSceneNextLast = 0; timeInt = 0; if (GameRources.GetInstance().selectedCutsceneIndex >= 0) { selectedOption = selectedOptionLast = Controller.getInstance().getSelectedChapterDataControl().getCutscenesList().getCutscenes()[ GameRources.GetInstance().selectedCutsceneIndex].getNext(); timeInt = Controller.getInstance().getSelectedChapterDataControl().getCutscenesList().getCutscenes()[ GameRources.GetInstance().selectedCutsceneIndex].getTransitionTime(); selectedTransitionType = selectedTransitionTypeLast = Controller.getInstance().getSelectedChapterDataControl().getCutscenesList().getCutscenes()[ GameRources.GetInstance().selectedCutsceneIndex].getTransitionType(); string nextSceneID = Controller.getInstance().getSelectedChapterDataControl().getCutscenesList().getCutscenes()[ GameRources.GetInstance().selectedCutsceneIndex].getNextSceneId(); selectedSceneNext = selectedSceneNextLast = Controller.getInstance() .getSelectedChapterDataControl() .getScenesList() .getSceneIndexByID(nextSceneID); // if next scene is not a scene, but a cutscene... if (selectedSceneNext == -1) { selectedSceneNext = selectedSceneNextLast = Controller.getInstance() .getSelectedChapterDataControl() .getCutscenesList() .getCutsceneIndexByID(nextSceneID) + scenesNextNames.Length; } } timeString = timeStringLast = timeInt.ToString(); }