public static void Options(Rect fullArea, Rect leftArea, Rect mainArea) { GUI.Box(fullArea, "", "backgroundBox"); GUILayout.BeginArea(fullArea); optionsScrollPos = GUILayout.BeginScrollView(optionsScrollPos); RPGMakerGUI.Title("Stat Options"); RPGMakerGUI.SubTitle("Exp Options"); RPGMakerGUI.Toggle("Allow Exp To Overflow", ref ASVT.AllowExpToOverflow); RPGMakerGUI.SubTitle("Stat Options"); ASVT.RegenInterval = RPGMakerGUI.FloatField("RegenInterval:", ASVT.RegenInterval); RPGMakerGUI.SubTitle("Titles"); ASVT.AttributeNameTitle = RPGMakerGUI.TextField("Attribute Title:", ASVT.AttributeNameTitle); ASVT.StatisticNameTitle = RPGMakerGUI.TextField("Statistic Title:", ASVT.StatisticNameTitle); ASVT.VitalNameTitle = RPGMakerGUI.TextField("Vital Title:", ASVT.VitalNameTitle); ASVT.TraitNameTitle = RPGMakerGUI.TextField("Trait Title:", ASVT.TraitNameTitle); RPGMakerGUI.SubTitle("Movement"); ASVT.JumpHeight = RPGMakerGUI.FloatField("Player Jump Height:", ASVT.JumpHeight); ASVT.BaseMovementSpeed = RPGMakerGUI.FloatField("Base Player Movement Speed:", ASVT.BaseMovementSpeed); ASVT.BaseNpcMovementSpeed = RPGMakerGUI.FloatField("Base NPC Movement Speed:", ASVT.BaseNpcMovementSpeed); if (RPGMakerGUI.Toggle("Use Stat as Movement Multiplier?", ref ASVT.UseStatForMovementSpeed)) { RPGMakerGUI.PopupID <Rm_StatisticDefintion>("Statistic:", ref ASVT.StatForMovementID, 1); RPGMakerGUI.Help("Move Speed = BaseMoveSpeed * Stat:", 1); } GUILayout.EndScrollView(); GUILayout.EndArea(); }
public static void Options(Rect fullArea, Rect leftArea, Rect mainArea) { GUI.Box(fullArea, "", "backgroundBox"); GUILayout.BeginArea(fullArea); RPGMakerGUI.Title("Game Options"); RPGMakerGUI.SubTitle("General"); Customise.GameHasAchievements = RPGMakerGUI.Toggle("Enable Achievements?", Customise.GameHasAchievements, GUILayout.Width(300)); Customise.AchievementUnlockedSound.Audio = RPGMakerGUI.AudioClipSelector("Achievement Unlocked Sound:", Customise.AchievementUnlockedSound.Audio, ref Customise.AchievementUnlockedSound.AudioPath); Customise.LoadingScreen.Image = RPGMakerGUI.ImageSelector("Loading Screen:", Customise.LoadingScreen.Image, ref Customise.LoadingScreen.ImagePath); RPGMakerGUI.SubTitle("Enable Popups"); RPGMakerGUI.Toggle("Exp Gained", ref Customise.EnableExpGainedPopup); RPGMakerGUI.Toggle("Level Reached", ref Customise.EnableLevelReachedPopup); RPGMakerGUI.Toggle("Skill Exp Gained", ref Customise.EnableSkillExpGainedPopup); RPGMakerGUI.SubTitle("Tooltip"); RPGMakerGUI.Toggle("Follow Mouse Position", ref Customise.TooltipFollowsCursor); GUILayout.EndArea(); }
void OnGUI() { try { GUI.skin = Resources.Load("RPGMakerAssets/EditorSkinRPGMaker") as GUISkin; GUILayout.BeginHorizontal(); GUILayout.BeginVertical(); foreach (var element in GUIElements) { if (element.Type == GUIType.Textfield) { element.StringValue = GUILayout.TextField(element.StringValue, element.LayoutOptions); } if (element.Type == GUIType.EditorTextfield) { element.StringValue = EditorGUILayout.TextField(element.EditorGUILabel, element.StringValue); } if (element.Type == GUIType.BeginHorizontal) { GUILayout.BeginHorizontal(); } if (element.Type == GUIType.EndHorizontal) { GUILayout.EndHorizontal(); } if (element.Type == GUIType.BeginVertical) { GUILayout.BeginVertical(); } if (element.Type == GUIType.EndVertical) { GUILayout.EndVertical(); } } GUILayout.EndVertical(); GUILayout.BeginVertical(GUILayout.MaxWidth(180)); var rect = RPGMakerGUI.ListArea(GUIElements, ref selectedGUIelement, Rm_ListAreaType.Vitals, true, true); var evt = Event.current; if (evt.type == EventType.MouseDown) { var mousePos = evt.mousePosition; if (rect.Contains(mousePos)) { var menu = new GenericMenu(); foreach (var typeOf in addableElements) { menu.AddItem(new GUIContent(typeOf.ToString()), false, AddGUIElement(), typeOf); } menu.ShowAsContext(); evt.Use(); } } if (selectedGUIelement != null) { RPGMakerGUI.SubTitle("GUI Element Settings"); if (selectedGUIelement.Type == GUIType.Textfield) { selectedGUIelement.MaxWidth = RPGMakerGUI.IntField("Max Width", selectedGUIelement.MaxWidth); } if (selectedGUIelement.Type == GUIType.EditorTextfield) { selectedGUIelement.EditorGUILabel = RPGMakerGUI.TextField("Prefix Label:", selectedGUIelement.EditorGUILabel); } if (GUILayout.Button("Save(tesT)")) { var b = GeneralMethods.CopyObject(selectedGUIelement); } } GUILayout.FlexibleSpace(); GUILayout.EndVertical(); GUILayout.EndHorizontal(); } catch (Exception e) { Debug.Log(e.StackTrace); } }
public static void VendorShops(Rect fullArea, Rect leftArea, Rect mainArea) { leftAreaB = new Rect(leftArea.xMax + 5, leftArea.y, leftArea.width, leftArea.height); mainAreaAlt = new Rect(leftAreaB.xMax + 5, leftArea.y, mainArea.width - (leftAreaB.width + 5), leftArea.height); GUI.Box(leftArea, "", "backgroundBox"); GUI.Box(leftAreaB, "", "backgroundBox"); GUI.Box(mainAreaAlt, "", "backgroundBox"); var list = Rm_RPGHandler.Instance.Repositories.Vendor.AllVendors; GUILayout.BeginArea(PadRect(leftArea, 0, 0)); RPGMakerGUI.ListArea(list, ref selectedVendorShop, Rm_ListAreaType.VendorShops, false, true); GUILayout.EndArea(); GUILayout.BeginArea(leftAreaB); if (selectedVendorShop != null) { RPGMakerGUI.ListArea(selectedVendorShop.VendorShopItems, ref selectedVendorShopItem, Rm_ListAreaType.VendorShopItem, false, false, Rme_ListButtonsToShow.AllExceptHelp, true); } GUILayout.EndArea(); GUILayout.BeginArea(mainAreaAlt); RPGMakerGUI.Title("Vendor Shops"); if (selectedVendorShop != null) { selectedVendorShop.Name = RPGMakerGUI.TextField("Name: ", selectedVendorShop.Name); if (selectedVendorShopItem != null) { //todo: replace with PopupID RPGMakerGUI.SubTitle("Selected Vendor Shop Item"); var allItems = Rm_RPGHandler.Instance.Repositories.Items.AllItems; if (string.IsNullOrEmpty(selectedVendorShopItem.ItemID)) { selecteVendorItem = 0; } else { var stillExists = allItems.FirstOrDefault(a => a.ID == selectedVendorShopItem.ItemID); selecteVendorItem = stillExists != null?allItems.IndexOf(stillExists) : 0; } selecteVendorItem = EditorGUILayout.Popup("Item:", selecteVendorItem, allItems.Select((q, indexOf) => indexOf + ". " + q.Name). ToArray()); if (allItems.Count > 0) { selectedVendorShopItem.ItemID = allItems[selecteVendorItem].ID; var stackable = allItems[selecteVendorItem] as IStackable; if (stackable != null) { selectedVendorShopItem.InfiniteStock = RPGMakerGUI.Toggle("Infinite Stock?", selectedVendorShopItem. InfiniteStock); if (!selectedVendorShopItem.InfiniteStock) { selectedVendorShopItem.QuantityRemaining = RPGMakerGUI.IntField("Quantity:", selectedVendorShopItem. QuantityRemaining); } } } else { RPGMakerGUI.Label("No Items Found."); } } } else { EditorGUILayout.HelpBox("Add or select a new field to customise Vendor Shops.", MessageType.Info); } GUILayout.EndArea(); }
public static void GlobalPlaylist(Rect fullArea, Rect leftArea, Rect mainArea) { GUI.Box(fullArea, "", "backgroundBox"); GUILayout.BeginArea(fullArea); playlistScrollPos = GUILayout.BeginScrollView(playlistScrollPos); RPGMakerGUI.Title("Global Music Playlist"); RPGMakerGUI.SubTitle("Audio Options"); Audio.PlayThroughSceneSwitch = RPGMakerGUI.Toggle("Persist Through Scenes?", Audio.PlayThroughSceneSwitch, GUILayout.Width(300)); Audio.LoadAllAudioOnLoad = RPGMakerGUI.Toggle("Load All Audio On Load?", Audio.LoadAllAudioOnLoad, GUILayout.Width(300)); Audio.FadeOutMusic = RPGMakerGUI.Toggle("Fade Out Tracks?", Audio.FadeOutMusic, GUILayout.Width(300)); Audio.FadeOutTime = RPGMakerGUI.FloatField("Fade Out Time:", Audio.FadeOutTime, 1, GUILayout.Width(300)); Audio.FadeInMusic = RPGMakerGUI.Toggle("Fade In Tracks?", Audio.FadeInMusic, GUILayout.Width(300)); Audio.FadeInTime = RPGMakerGUI.FloatField("Fade In Time:", Audio.FadeInTime, 1, GUILayout.Width(300)); RPGMakerGUI.Toggle("Shuffle Playlist?", ref Audio.ShufflePlaylist, GUILayout.Width(300)); var result = RPGMakerGUI.FoldoutToolBar(ref showPlaylist, "Global Playlist", new[] { "+ Music" }); if (showPlaylist) { if (result == 0) { Audio.GlobalPlaylist.Add(new AudioContainer()); } GUILayout.Space(5); for (int index = 0; index < Audio.GlobalPlaylist.Count; index++) { var music = Audio.GlobalPlaylist[index]; GUILayout.BeginHorizontal(GUILayout.Height(30)); GUILayout.Space(5); music.Audio = RPGMakerGUI.AudioClipSelector("Music File:", music.Audio, ref music.AudioPath); if (GUILayout.Button(RPGMakerGUI.DelIcon, "genericButton", GUILayout.Width(25), GUILayout.Height(25))) { Audio.GlobalPlaylist.Remove(music); index--; } GUILayout.Space(5); GUILayout.EndHorizontal(); GUILayout.Space(5); } if (Audio.GlobalPlaylist.Count == 0) { EditorGUILayout.HelpBox("Click +Music to add bg music to be played when scene music is not found.", MessageType.Info); } RPGMakerGUI.EndFoldout(); } if (RPGMakerGUI.Toggle("Unique scene music?", ref Audio.PlayUniqueMusicForScenes)) { var battleResult = RPGMakerGUI.FoldoutToolBar(ref showScenePlaylists, "Scene Playlists", new[] { "+ Scene" }); if (showScenePlaylists) { if (battleResult == 0) { Audio.ScenePlaylists.Add(new SceneMusic()); } GUILayout.Space(5); for (int index = 0; index < Audio.ScenePlaylists.Count; index++) { var sceneMusic = Audio.ScenePlaylists[index]; GUILayout.BeginHorizontal(GUILayout.Height(30)); GUILayout.Space(5); sceneMusic.Music.Audio = RPGMakerGUI.AudioClipSelector("Music File:", sceneMusic.Music.Audio, ref sceneMusic.Music.AudioPath); sceneMusic.SceneName = RPGMakerGUI.SceneSelector("Scene:", ref sceneMusic.SceneName); if (GUILayout.Button(RPGMakerGUI.DelIcon, "genericButton", GUILayout.Width(25), GUILayout.Height(25))) { Audio.ScenePlaylists.Remove(sceneMusic); index--; } GUILayout.Space(5); GUILayout.EndHorizontal(); GUILayout.Space(5); } if (Audio.ScenePlaylists.Count == 0) { EditorGUILayout.HelpBox("Click +Music to add music to be played during battles.", MessageType.Info); } RPGMakerGUI.EndFoldout(); } } if (RPGMakerGUI.Toggle("Unique battle music?", ref Audio.PlayUniqueMusicForBattles)) { var battleResult = RPGMakerGUI.FoldoutToolBar(ref showBattlePlaylist, "Battle Playlist", new[] { "+ Music" }); if (showBattlePlaylist) { if (battleResult == 0) { Audio.BattlePlaylist.Add(new AudioContainer()); } GUILayout.Space(5); for (int index = 0; index < Audio.BattlePlaylist.Count; index++) { var music = Audio.BattlePlaylist[index]; GUILayout.BeginHorizontal(GUILayout.Height(30)); GUILayout.Space(5); music.Audio = RPGMakerGUI.AudioClipSelector("Music File:", music.Audio, ref music.AudioPath); if (GUILayout.Button(RPGMakerGUI.DelIcon, "genericButton", GUILayout.Width(25), GUILayout.Height(25))) { Audio.BattlePlaylist.Remove(music); index--; } GUILayout.Space(5); GUILayout.EndHorizontal(); GUILayout.Space(5); } if (Audio.BattlePlaylist.Count == 0) { EditorGUILayout.HelpBox("Click +Music to add music to be played during battles.", MessageType.Info); } RPGMakerGUI.EndFoldout(); } } if (RPGMakerGUI.Toggle("Unique music on Player Death?", ref Audio.PlayUniqueMusicForDeath)) { Audio.DeathMusic.Audio = RPGMakerGUI.AudioClipSelector("- Music File:", Audio.DeathMusic.Audio, ref Audio.DeathMusic.AudioPath); } GUILayout.EndScrollView(); GUILayout.EndArea(); }
public static void WorldMap(Rect fullArea, Rect leftArea, Rect mainArea) { leftAreaB = new Rect(leftArea.xMax + 5, leftArea.y, leftArea.width, leftArea.height); mainAreaAlt = new Rect(leftAreaB.xMax + 5, leftArea.y, mainArea.width - (leftAreaB.width + 5), leftArea.height); GUI.Box(leftArea, "", "backgroundBox"); GUI.Box(leftAreaB, "", "backgroundBox"); GUI.Box(mainAreaAlt, "", "backgroundBox"); GUILayout.BeginArea(PadRect(leftArea, 0, 0)); RPGMakerGUI.ListArea(worldAreaList, ref selectedWorldArea, Rm_ListAreaType.WorldAreas, false, false); GUILayout.EndArea(); GUILayout.BeginArea(leftAreaB); if (selectedWorldArea != null) { var rect = RPGMakerGUI.ListArea(selectedWorldArea.Locations, ref selectedWorldAreaLocation, Rm_ListAreaType.Location, false, false, Rme_ListButtonsToShow.AllExceptHelp, true, selectedWorldArea.ID); } GUILayout.EndArea(); GUILayout.BeginArea(mainAreaAlt); worldAreaScrollPos = GUILayout.BeginScrollView(worldAreaScrollPos); RPGMakerGUI.Title("World Areas (Not Finished)"); if (selectedWorldArea != null) { selectedWorldArea.Name = RPGMakerGUI.TextField("Name: ", selectedWorldArea.Name); selectedWorldArea.ImageContainer.Image = RPGMakerGUI.ImageSelector("Image:", selectedWorldArea.ImageContainer.Image, ref selectedWorldArea.ImageContainer.ImagePath); if (GUILayout.Button("Open Interaction Node Tree", "genericButton", GUILayout.MaxHeight(30))) { var trees = Rm_RPGHandler.Instance.Nodes.WorldMapNodeBank.NodeTrees; var existingTree = trees.FirstOrDefault(t => t.ID == selectedWorldArea.ID); if (existingTree == null) { existingTree = NodeWindow.GetNewTree(NodeTreeType.WorldMap); existingTree.ID = selectedWorldArea.ID; Debug.Log(existingTree.ID + ":::" + existingTree.Name); existingTree.Name = selectedWorldArea.Name; trees.Add(existingTree); } WorldMapNodeWindow.ShowWindow(selectedWorldArea.ID); } } if (selectedWorldArea != null) { RPGMakerGUI.SubTitle("Location Info:"); if (selectedWorldAreaLocation != null) { var loc = selectedWorldAreaLocation; loc.Name = RPGMakerGUI.TextField("Name:", loc.Name); loc.ImageContainer.Image = RPGMakerGUI.ImageSelector("Name:", loc.ImageContainer.Image, ref loc.ImageContainer.ImagePath); loc.Description = RPGMakerGUI.TextField("Description:", loc.Description); RPGMakerGUI.SceneSelector("Scene:", ref loc.SceneName); if (RPGMakerGUI.Toggle("Use Custom Spawn Location?", ref loc.UseCustomLocation)) { loc.CustomSpawnLocation = EditorGUILayout.Vector3Field("Location:", loc.CustomSpawnLocation); } } else { EditorGUILayout.HelpBox("Select a location in the world area to begin editing it.", MessageType.Info); } } else { EditorGUILayout.HelpBox("Add or select a new field to customise world areas.", MessageType.Info); } GUILayout.EndScrollView(); GUILayout.EndArea(); }
private static void QuestDetails(Quest quest, bool inQuestChain) { if (RPGMakerGUI.Foldout(ref showSelectedQuestDetails, "Selected Quest - Main Details")) { GUILayout.BeginHorizontal(); GUILayout.BeginVertical(GUILayout.MaxWidth(85)); quest.Image.Image = RPGMakerGUI.ImageSelector("", quest.Image.Image, ref quest.Image.ImagePath); GUILayout.EndVertical(); GUILayout.BeginVertical(GUILayout.ExpandWidth(true)); quest.Name = RPGMakerGUI.TextField("Name: ", quest.Name); quest.Description = RPGMakerGUI.TextArea("Description:", quest.Description); quest.ConditionMode = (QuestConditionMode)RPGMakerGUI.EnumPopup("Condition Mode:", quest.ConditionMode); if (GUILayout.Button("Open Dialog/Event On Accept", "genericButton", GUILayout.MaxHeight(30))) { var trees = Rm_RPGHandler.Instance.Nodes.DialogNodeBank.NodeTrees; var existingTree = trees.FirstOrDefault(t => t.ID == quest.DialogNodeTreeID); if (existingTree == null) { existingTree = NodeWindow.GetNewTree(NodeTreeType.Dialog); existingTree.ID = quest.ID; existingTree.Name = quest.Name; trees.Add(existingTree); } DialogNodeWindow.ShowWindow(quest.ID); quest.DialogNodeTreeID = existingTree.ID; } if (GUILayout.Button("Open Dialog/Event On Complete", "genericButton", GUILayout.MaxHeight(30))) { var trees = Rm_RPGHandler.Instance.Nodes.DialogNodeBank.NodeTrees; var existingTree = trees.FirstOrDefault(t => t.ID == quest.CompletedDialogNodeTreeID); if (existingTree == null) { existingTree = NodeWindow.GetNewTree(NodeTreeType.Dialog); existingTree.ID = "complete_" + quest.ID; existingTree.Name = "Completed " + quest.Name; trees.Add(existingTree); } DialogNodeWindow.ShowWindow(existingTree.ID); quest.CompletedDialogNodeTreeID = existingTree.ID; } GUILayout.Space(5); RPGMakerGUI.Toggle("Player Keeps Quest Items?", ref quest.PlayerKeepsQuestItems); RPGMakerGUI.Toggle("Is Repeatable?", ref quest.Repeatable); RPGMakerGUI.Toggle("Can Abandon?", ref quest.CanAbandon); if (RPGMakerGUI.Toggle("Has Time Limit?", ref quest.HasTimeLimit)) { quest.TimeLimit = RPGMakerGUI.FloatField("- Time Limit:", quest.TimeLimit); } if (RPGMakerGUI.Toggle("Run Event On Accept?", ref quest.RunEventOnAccept)) { RPGMakerGUI.PopupID <NodeChain>("- Event:", ref quest.EventOnAcceptID); } if (RPGMakerGUI.Toggle("Run Event On Completion?", ref quest.RunEventOnComplete)) { RPGMakerGUI.PopupID <NodeChain>("- Event:", ref quest.EventOnCompletionId); } if (RPGMakerGUI.Toggle("Run Event On Cancel?", ref quest.RunEventOnCancel)) { RPGMakerGUI.PopupID <NodeChain>("- Event:", ref quest.EventOnCancelId); } GUILayout.Space(5); GUILayout.EndVertical(); GUILayout.EndHorizontal(); RPGMakerGUI.EndFoldout(); } if (RPGMakerGUI.Foldout(ref showSelectedQuestReq, "Requirements")) { List <Quest> availableReqQuests = new List <Quest>(); if (inQuestChain) { availableReqQuests = Rm_RPGHandler.Instance.Repositories.Quests.AllQuests.Where(q => selectedQuestChain.QuestsInChain.FirstOrDefault(qu => qu.ID == q.ID) == null).ToList(); } else { availableReqQuests = Rm_RPGHandler.Instance.Repositories.Quests.AllQuests; } RPGMakerGUI.FoldoutList(ref showReqAcceptedQuests, "Required Completed Quests", quest.Requirements.QuestCompletedIDs, availableReqQuests, "+Quest", "", "Click +Quest to add a requirement for a completed quest."); RPGMakerGUI.FoldoutList(ref showCustomVarReqSetters, "Custom Var Requirements", quest.Requirements.CustomRequirements, Rm_RPGHandler.Instance.DefinedVariables.Vars, "+VariableReq", "", "Click +VariableReq to add a varaible requirement", "VariableID", "Name", "ID", "Name", false, "Value"); RPGMakerGUI.SubTitle("More Requirements"); if (RPGMakerGUI.Toggle("Require Player Level:", ref quest.Requirements.RequireLevel)) { quest.Requirements.LevelRequired = RPGMakerGUI.IntField("- Required Level:", quest.Requirements.LevelRequired); } if (RPGMakerGUI.Toggle("Require Player Class:", ref quest.Requirements.RequireClass)) { RPGMakerGUI.PopupID <Rm_ClassNameDefinition>("- Class ID:", ref quest.Requirements.RequiredClassID); } RPGMakerGUI.Toggle("Require Reputation Above Amount :", ref quest.Requirements.ReqRepAboveValue); if (quest.Requirements.ReqRepAboveValue) { quest.Requirements.ReqRepBelowValue = false; } RPGMakerGUI.Toggle("Require Reputation Below Amount :", ref quest.Requirements.ReqRepBelowValue); if (quest.Requirements.ReqRepBelowValue) { quest.Requirements.ReqRepAboveValue = false; } if (quest.Requirements.ReqRepAboveValue || quest.Requirements.ReqRepBelowValue) { RPGMakerGUI.PopupID <ReputationDefinition>("- Reputation Faction:", ref quest.Requirements.ReputationFactionID); var prefix = quest.Requirements.ReqRepAboveValue ? "Above " : "Below "; quest.Requirements.ReputationValue = RPGMakerGUI.IntField("- " + prefix + "Amount:", quest.Requirements.ReputationValue); } if (RPGMakerGUI.Toggle("Require Trait Level?", ref quest.Requirements.RequireTraitLevel)) { RPGMakerGUI.PopupID <Rm_TraitDefintion>("- Trait:", ref quest.Requirements.RequiredTraitID); quest.Requirements.TraitLevel = RPGMakerGUI.IntField("- Level:", quest.Requirements.TraitLevel); } if (RPGMakerGUI.Toggle("Require Learnt Skill?", ref quest.Requirements.RequireLearntSkill)) { RPGMakerGUI.PopupID <Skill>("- Skill:", ref quest.Requirements.LearntSkillID); } RPGMakerGUI.EndFoldout(); } var result = RPGMakerGUI.FoldoutToolBar(ref showSelectedQuestMainConditions, "Quest Conditions", "+Condition", false, false); if (showSelectedQuestMainConditions) { if (quest.Conditions.Count == 0) { EditorGUILayout.HelpBox("Click +Condition to add a new quest condition.", MessageType.Info); } for (int index = 0; index < quest.Conditions.Count; index++) { GUILayout.BeginVertical("foldoutBox"); GUILayout.BeginHorizontal(); GUILayout.FlexibleSpace(); if (index > 0 && GUILayout.Button("Move Up", "genericButton")) { GUI.FocusControl(""); var curCondition = quest.Conditions[index]; var prevCondition = quest.Conditions[index - 1]; quest.Conditions[index - 1] = curCondition; quest.Conditions[index] = prevCondition; return; } if (index < quest.Conditions.Count - 1 && GUILayout.Button("Move Down", "genericButton")) { GUI.FocusControl(""); var curCondition = quest.Conditions[index]; var nextCondition = quest.Conditions[index + 1]; quest.Conditions[index + 1] = curCondition; quest.Conditions[index] = nextCondition; return; } GUILayout.EndHorizontal(); quest.Conditions[index] = ShowConditionInfo(quest.Conditions[index]); GUILayout.BeginHorizontal(); GUILayout.FlexibleSpace(); if (GUILayout.Button("Delete", "genericButton", GUILayout.Height(25), GUILayout.Width(100))) { GUI.FocusControl(""); quest.Conditions.RemoveAt(index); index--; } GUILayout.FlexibleSpace(); GUILayout.EndHorizontal(); GUILayout.EndVertical(); } if (result == 0) { quest.Conditions.Add(new KillCondition()); } RPGMakerGUI.EndFoldout(); } if (RPGMakerGUI.Foldout(ref showFinalCondition, "Final Condition")) { if (RPGMakerGUI.Toggle("Enable Final Condition?", ref quest.HasFinalCondition)) { quest.FinalCondition = ShowConditionInfo(quest.FinalCondition); } RPGMakerGUI.EndFoldout(); } if (RPGMakerGUI.Foldout(ref showBonusCondition, "Bonus Condition")) { if (RPGMakerGUI.Toggle("Enable Bonus Condition?", ref quest.HasBonusCondition)) { quest.BonusCondition = ShowConditionInfo(quest.BonusCondition); if (RPGMakerGUI.Toggle("- Has Time Limit", ref quest.BonusHasTimeLimit)) { quest.BonusTimeLimit = RPGMakerGUI.FloatField(" - Time Limit:", quest.BonusTimeLimit); } } RPGMakerGUI.EndFoldout(); } if (RPGMakerGUI.Foldout(ref showQuestRewards, "Rewards")) { ShowQuestRewardInfo(ref showQuestMainRewards, "Item Rewards", quest.Rewards); RPGMakerGUI.EndFoldout(); } if (quest.HasBonusCondition) { if (RPGMakerGUI.Foldout(ref showBonusRewards, "Bonus Rewards")) { ShowQuestRewardInfo(ref showQuestBonusRewards, "Bonus Condition Reward", quest.BonusRewards); RPGMakerGUI.EndFoldout(); } } RPGMakerGUI.FoldoutList(ref showCustomVarSetters, "Set Custom Vars on Completion", quest.SetCustomVariablesOnCompletion, Rm_RPGHandler.Instance.DefinedVariables.Vars, "+VariableSetter", "", "Click +VariableSetter to add a varaible setter", "VariableID", "Name", "ID", "Name"); }