private void SetButton(Button b, HelpMenuItem it) { b.onClick.RemoveAllListeners(); b.onClick.AddListener(() => { ShowItem(it); }); }
void SetClickHandler(MyButton b, HelpMenuItem item) { b.onClick.RemoveAllListeners(); b.onClick.AddListener(() => { PopUp.ShowItem(item); }); }
private void SetMainWindowToolTips() { //Menu Item HelpMenuItem.AddToolTip("Click to see more information about the app"); CheckAllSettingsMenuItem.AddToolTip("Click here to see all the User Settings"); AutoMoveMenuItem.AddToolTip("Click here to change the Auto Move setting"); ChangeModGameDirectoryMenu.AddToolTip("Click here to change the directory for the Auto Move Function"); MoveFileMenuItem.AddToolTip("Click here to move all mod files from the current selected mod directly to the User Set \"Auto Move\" Directory"); SaveFileMenuItem.AddToolTip("Click here to save all generated XML into the appropriate files in the output location"); LoadFileMenuItem.AddToolTip("Click to load an xml file or multiple xml files\nThis would typically be a game xml file such as recipes.xml"); LoadModDirectoryMenuItem.AddToolTip("Click here to load a mod directory\nThis would typically be the main mod folder with the mod name not the Config directory within"); ValidateXmlMenuItem.AddToolTip("Click here to validate all xml files for the selected tag/mod\nAny xml violations will be displayed"); CreateEditModInfoMenuItem.AddToolTip("Click here to create a new mod or edit the Mod Info for an existing mod"); ChangeLogTimeStampMenuItem.AddToolTip("Click here to change the Timestamp setting"); OpenLocalizationMenuItem.AddToolTip("Click here to open the localization window to manage Localization for your mods"); NormalThemeMenuItem.AddToolTip("Click here to change the background color to the normal theme"); MediumThemeMenuItem.AddToolTip("Click here to change the background color to the medium theme"); DarkThemeMenuItem.AddToolTip("Click here to change the background color to the dark theme"); //LoadGameModDirectoryMenuItem.AddToolTip("Click here to load the 7 days to die \"Mods\" directory, to load all mods"); //Buttons SaveXmlViewButton.AddToolTip("Click here to save all generated XML into the appropriate files in the output location"); Stage_AllViewButton.AddToolTip("Click here to move all mod files from the current selected mod directly to the User Set \"Auto Move\" Directory"); OpenModFileDirectEditViewButton.AddToolTip("Click to open a window to make direct edits to the selected mod file from the combo box to the left"); AddObjectViewButton.AddToolTip("Click to add a new object creation view using the game file from above\nWARNING: This could take awhile"); AddNewTreeViewButton.AddToolTip("Click to add a new searchable tree view using the game file from above" + "\nWith this tree you can perform any xpath command on any in game object" + " \nWARNING: This could take awhile"); ClearAllObjectsViewButton.AddToolTip("Click to remove all objects from the view above"); ClearTreesViewButton.AddToolTip("Click to remove all trees from the view above"); LoadedModFilesButton.AddToolTip("Click to add a search tree for the mod file selected above"); OpenGameFileDirectEditViewButton.AddToolTip("Click to open a window to make direct edits to the selected game file from the combo box to the left"); DeleteModFileDirectEditViewButton.AddToolTip("Click to delete the file from the combo box to the left for the current mod"); DeleteModButton.AddToolTip("Click to get more information on deleting the mod.\n" + "Does NOT delete the mod folder!"); ReloadModOutputFolderButton.AddToolTip("Click here to reload the mods output folder. This is necessary to do after deleting mods while the app is running."); OpenModsOutputFolderButton.AddToolTip("Click here to open the application's mod output folder in explorer."); //Combo Boxes LoadedModFilesSearchViewComboBox.AddToolTip("Mod file used to generate a search tree when clicking the button below"); LoadedModsSearchViewComboBox.AddToolTip("Select a mod here to generate search trees for its files"); LoadedModsCenterViewComboBox.AddToolTip("Using this combo box you can switch between loaded/created mods"); CurrentModFilesCenterViewComboBox.AddToolTip("Select a file here to make direct edits\nThese are the currently selected mod's files"); SearchTreeLoadedFilesComboBox.AddToolTip("The selected file here is used to create a search tree below\nAdd files to the list by loading an xml file from the game folder"); NewObjectViewLoadedFilesComboBox.AddToolTip("The selected file here is used to create the new object view below\nAdd files to the list by loading an xml file from the game folder"); CurrentGameFilesCenterViewComboBox.AddToolTip("Select a file here to make direct edits\nThese are the game files"); //Check Box IncludeChildrenInOnHoverCheckBox.AddToolTip("Keeping this checked will include the children\nin the on hover messages for new search trees"); IncludeCommentsCheckBox.AddToolTip("Keeping this checked will include comments in newly generated search trees"); IncludeAllModsInBoxesCheckBox.AddToolTip("Keeping this checked will use common attributes from all mods\nLeaving this unchecked will use the common attributes from only the selected mod file"); IgnoreAllAttributesCheckBox.AddToolTip("Keeping this checked will flag the \"copy\" function to Hide Unused Attributes for all children automatically."); }
public void ShowItem(HelpMenuItem item) { gameObject.SetActive(true); HelpScroll.normalizedPosition = new Vector2(0, 1); Title.text = "Help: " + item.DisplayName; Text.text = item.Description; Pool.Reset(); foreach (var seeAlso in item.SeeAlso) { var go = Pool.GetObject(); go.GetComponentInChildren <TextMeshProUGUI>().text = seeAlso.DisplayName; SetButton(go.GetComponent <Button>(), seeAlso); } }