private void setRegularTooltip(TooltipController defaultTooltips, QuickFilterControl control, string name, string description, bool isKeyword) { if (isKeyword) { description += "\r\n\r\n" + "Search bar lets you search by keywords too. It provides much more keyword values.\r\n" + "Use intellisense to see available values:\r\n" + "- type keywords:\r\n" + "- hit Ctrl + Space\r\n" + "- begin typing keyword"; } if (control.EnableCostBehavior) { description += "\r\n\r\n" + "Left-clicking these buttons may lead to some buttons different from the one you clicked " + "become checked or unchecked automatically.\r\n\r\n" + "Right-click the button to avoid auto checking / unchecking other buttons."; } defaultTooltips.SetTooltip(this, name, description, control); }
// Start is called before the first frame update void Awake() { if (Instance == null) { Instance = this; } }
public void Update() { timeDelta += Time.deltaTime; if (timeDelta >= 1) { timeDelta = 0; UndoCounter(); } if (Input.GetMouseButton(1)) { currentAction = null; TooltipController.SetText(""); constructionController.CloseMenu(); editController.CloseMenu(); } if (Input.GetKeyDown("space")) RotateStructure(90); if (currentAction != null) { UpdateTooltip(); } }
void ResetAction() { if (inputUsed) { return; } if (Input.GetKeyDown("escape") || uiPressed == 5) { if (playerState == States.UnitSelected) { selectedUnit.GetComponent <UnitController>().Deselect(); selectedUnit = null; TooltipController.ManualUpdate(); abilityUI.SetActive(false); playerState = States.NothingSelected; } else if (playerState == States.ActionSelected) { resetActionTarget(); endTurnUI.SetActive(true); playerState = States.UnitSelected; } else if (playerState == States.TargetSelected) { abilityUI.SetActive(true); confirmUI.SetActive(false); playerState = States.ActionSelected; } inputUsed = true; } }
void EndTurn() { if (uiPressed == 6) { if (playerState == States.UnitSelected) { selectedUnit.GetComponent <UnitController>().Deselect(); abilityUI.SetActive(false); selectedUnit = null; } TooltipController.ManualUpdate(); abilityUI.SetActive(false); confirmUI.SetActive(false); endTurnUI.SetActive(false); playerState = States.EnemyTurn; foreach (GameObject unit in UnitController.playerUnits) { if (!unit.GetComponent <CapsuleCollider>().bounds.Intersects(warpPad.transform.GetChild(0).GetChild(0).GetComponent <BoxCollider>().bounds)) { StartCoroutine("EnemyTurn"); return; } } StartCoroutine("NextLevel"); } }
public override void OnBeginDrag(PointerEventData eventData) { if (eventData.button == dragButton && slot.current != null) { if (transform.parent.gameObject.name != "Temporary Collection 1 UI") { slot.collection.SwapOrMerge(slot.collectionIndex, TempCollection.tempCollections[0], 0, slot.collection.GetAmount(slot.collectionIndex)); TempCollection.staticTempCollecion1UI.GetComponentInChildren <ImprovedDrag>().OnBeginDrag(eventData); GetComponentInParent <DynamicLayoutGroup>()?.ForceRebuildNow(); return; } var dragClone = GetDragObject(eventData, GetComponentInParent <Canvas>()?.rootCanvas); dragClone.GetComponent <Image>().enabled = false; dragClone.sizeDelta = dragClone.sizeDelta * new Vector2(slot.current.layoutShape.convexX, slot.current.layoutShape.convexY); DragAndDropUtility.BeginDrag(new DragAndDropUtility.Model(GetComponent <RectTransform>(), dragClone, slot.current), eventData); if (consumeEvent) { eventData.Use(); } if (handlePointerClick) { activeCoroutine = StartCoroutine(ManualDragLoop()); } WorkshopController.workshopController.UpdateBorders((UnityEquippableItemInstance)TempCollection.tempCollections[0][0]); TooltipController.ManualUpdate(); } }
private void loadTooltips(object sender, EventArgs e) { TooltipController.SubscribeToEvents(); TooltipController.StartThread(); QuickFilterTooltipController.SubscribeToEvents(); QuickFilterTooltipController.StartThread(); }
public static TooltipController Instance() { if (!tooltipController) { tooltipController = FindObjectOfType <TooltipController>(); } return(tooltipController); }
public void OnPointerExit(PointerEventData eventData) { if (mouseOver) { TooltipController.Instance().disableTooltip(); mouseOver = false; } }
public void OnPointerEnter(PointerEventData eventData) { if (!mouseOver) { TooltipController.Instance().setTooltip(tooltipTitle, tooltipContent, buffCategories); mouseOver = true; } }
public void StopAction() { currentAction = null; TooltipController.SetText(""); constructionController.CloseMenu(); editController.CloseMenu(); }
private void Update() { if (Input.GetKeyDown(KeyCode.Escape) && bOpenToolTip) { TooltipController.unloadToolTip(); GameManager.Pause = false; Destroy(gameObject); } }
public static TooltipController GetInstance() { if (_instance == null) { _instance = GameObject.Find("UI Canvas").GetComponent <TooltipController>(); } return(_instance); }
private void Awake() { if (Instance == null) { Instance = this; } else if (Instance != this) { Destroy(gameObject); } }
void IPointerExitHandler.OnPointerExit(PointerEventData eventData) { StopAllCoroutines(); var current = EventSystem.current as MPEventSystem; if (!current /*|| !tooltipIsAvailable*/) { return; } TooltipController.RemoveTooltip(current, this); }
// Start is called before the first frame update private void Awake() { if (Instance == null) { Instance = this; } else { Destroy(this); } }
private void Awake() { if (_instance != null && _instance != this) { Destroy(this.gameObject); } else { _instance = this; } }
private void setupTooltips(TooltipController controller) { controller.SetTooltip(_tooltipOwner, "Deck name", "Type deck name.\r\n" + "press Enter to apply\r\n" + "press Esc to cancel", _textboxRename, _panelRename); controller.SetTooltip(_tooltipOwner, () => _searchSubsystem.SearchResult?.ParseErrorMessage != null ? "Syntax error" : "Search bar for decks", () => _searchSubsystem.SearchResult?.ParseErrorMessage ?? "Filter decks, example queries:\r\n" + // ReSharper disable once StringLiteralTypo "\tname: affin*\r\n" + "\tmana: \\{w\\} AND \\{u\\}\r\n\r\n" + "Ctrl+SPACE to get intellisense\r\n" + "Enter to apply\r\n" + "Ctrl+Backspace to delete one word\r\n\r\n" + "F1 to learn search bar query syntax\r\n" + "Middle mouse click to clear", _searchBar, _searchBar.Input); controller.SetTooltip(_tooltipOwner, "Deck list sort order", "Sort buttons are located over textual fields of decks.\r\n" + "Click sort button to sort by field or change sort direction.\r\n" + "Shift + Click to add field to sort priorities,\r\n" + "Ctrl + Click to remove field from sort priorities.\r\n\r\n" + "When all explicit sort criteria are equal, decks are ordered " + "by relevance to search result, then by order they were created.\r\n\r\n" + "NOTE: currently opened deck is is always first in the list", _labelSortStatus); string filterMode(FilterByDeckMode mode) => _menuFilterByDeckMode.MenuValues[(int)mode]; controller.SetTooltip(_tooltipOwner, "Filter by deck mode", "Controls how search result of cards is affected by decks.\r\n\r\n" + $"- {filterMode(FilterByDeckMode.Ignored)}\r\n" + " decks do not affect search result of cards\r\n" + $"- {filterMode(FilterByDeckMode.CurrentDeck)}\r\n" + " show cards present in currently opened deck\r\n" + $"- {filterMode(FilterByDeckMode.FilteredSavedDecks)}\r\n" + " show cards present in any saved deck from list below matching search criteria for " + "saved decks on the left", _menuFilterByDeckMode); controller.SetCustomTooltip(_layoutViewTooltip); }
// Start is called before the first frame update void Start() { tooltip = FindObjectOfType <TooltipController>(); hovering = false; parentCanvas = tooltip.transform.parent.GetComponent <Canvas>(); attachedShip = GetComponent <ShipStats>(); if (attachedShip != null) { tooltipText = GetComponent <ShipStats>().GenerateTooltip(); } }
private IEnumerator PlayCurrentLevelScript() { if (currentLevel == 1) { yield return(new WaitWhile(() => isPlayerReady == false)); PlayerSpawner.SpawnPlayer(); yield return(new WaitForSeconds(4f)); TooltipController.PlayTooltipAnimation(Tooltip.Eagle, false); PauseManager.FreezeDynamicObjects(); EnemySpawnerController.SetSpawnFrequency(.8f); EnemySpawnerController.SetSpawnStartTime(0f); //Freeze as soon as spawned has been called on the 3rd enemy yield return(new WaitWhile(() => EnemySpawnerController.GetNumberEnemiesSpawned() != 3)); PauseManager.FreezeDynamicObjects(); onSpawnSfx = false; //Show crosshairs once all three enemies are spawned and on scene yield return(new WaitWhile(() => enemyTankParentObject.transform.childCount != 3)); TooltipController.PlayTooltipAnimation(Tooltip.FirstWave, false); EnemySpawnerController.SetSpawnFrequency(4f); EnemySpawnerController.SetSpawnStartTime(1f); yield return(new WaitWhile(() => EnemySpawnerController.GetNumberEnemiesSpawned() != 4)); TooltipController.PlayTooltipAnimation(Tooltip.Ammo, true); yield return(new WaitForSeconds(.5f)); TooltipController.PlayTooltipAnimation(Tooltip.HealthBar, true); yield return(new WaitForSeconds(.5f)); TooltipController.PlayTooltipAnimation(Tooltip.Lives, true); //Show tooltip on first enemy that has power up yield return(new WaitWhile(() => EnemySpawnerController.GetNumberEnemiesSpawned() != 7)); TooltipController.PlayTooltipAnimation(Tooltip.FirstPU, false); PauseManager.FreezeDynamicObjects(); } else if (currentLevel == 2) { onSpawnSfx = false; yield return(new WaitWhile(() => isPlayerReady == false)); PlayerSpawner.SpawnPlayer(); } }
private void Awake() { GameObject toolTipOverlay = (GameObject)Instantiate(Resources.Load("ToolTipOverlay")); _tooltipControl = toolTipOverlay.GetComponent <TooltipController>(); SetDialogueIDs(); SetDialogueText(); if (!Toolbox.Instance.TooltipCompletionPersist) { Toolbox.Instance.ResetTooltips(); } }
private void OnTriggerEnter2D(Collider2D collision) { if (collision.CompareTag("Knuckles")) { //Nos ha golpeado el jugador: Rompemos y mostramos el powerup bOpenToolTip = TooltipController.LoadToolTip(ToolTipLoaded); AudioSource.PlayClipAtPoint(_sfxBreak, transform.position); ani.SetTrigger("Explode"); collision.GetComponent <Knuckles>().GetPowerUp(_powerUp); GameManager.Pause = true; } }
public void SetDragged(bool value) { Dragging = value; _backgroundImage.raycastTarget = !value; _image.raycastTarget = !value; if (value) { _grabAction(); } else { _releaseAction(); } TooltipController.GetInstance().HideTooltip(); }
public void ReportClipboardOperation( Deck deck, bool isPasted, bool isCollection, bool isAppended = false, bool isFromSearchResult = false) { if (deck == null) { return; } var zones = new[] { Zone.Main, Zone.Side, Zone.Maybe, Zone.SampleHand }; var cardsCount = zones.SelectMany(_ => deck.GetZone(_).CountList).Sum(); var uniqueCardsCount = zones.SelectMany(_ => deck.GetZone(_).Order).ToHashSet().Count; string target = isFromSearchResult ? "Search result" : isCollection ? "Collection" : "Deck"; string count = uniqueCardsCount == cardsCount ? $"{cardsCount}" : $"{cardsCount} ({uniqueCardsCount} distinct)"; string message; if (isAppended) { message = $"Added {count} cards from clipboard to {target}"; } else if (isPasted) { message = $"Replaced {target} by {count} cards from clipboard"; } else { message = $"Copied to clipboard {count} cards from {target}"; } string title = $"{(isPasted ? "Paste" : "Copy")} result"; TooltipController.ShowOneOffTooltip(_dropdownPaste, title, message); }
void UpdateTooltip() { float cost = 0; if (currentAction.Do == "paint") { TooltipController.SetText(currentAction.What); return; } else if (modeController.currentMode == Mode.Construct && currentAction.Do == "place") cost = GetConstructCost(actionLocations, currentAction); else if (modeController.currentMode == Mode.Construct && currentAction.Do == "demolish") cost = GetDemolishCost(actionLocations, currentAction); TooltipController.SetText(MoneyController.symbol + "" + cost); TooltipController.SetColor(moneyController.Money >= cost ? Color.white : Color.red); }
public void AddItem(Item item, Action OnGrab, Action OnRelease, Action <Item> onDrop) { //TODO: If equippable AND if slot is currently empty, equip straight away. Otherwise, add in bag Vector2 position; bool foundPosition = _uiBackpack.FindAvailablePosition(item._uiDimensions.x, item._uiDimensions.y, out position); if (foundPosition) { UIItem uiItem = Instantiate <UIItem>(_uiItemPrefab, transform); uiItem.Initialize(item, transform.localScale, OnGrab, OnRelease, () => { onDrop(item); TooltipController.GetInstance().HideTooltip(); }); uiItem.SetDragged(false); _uiBackpack.AddItem(uiItem, position); } else { throw new InventoryController.InventoryFullException("Inventory is full."); } }
public void SetUp() { tooltipController = new TooltipController(); tooltipController.Initialize(Substitute.For <ITooltipView>()); }
void Awake() { tooltipController = GameManager.instance.TooltipController; }
private void setupTooltips(TooltipController defaultTooltips, TooltipController quickFilterTooltips) { defaultTooltips.SetTooltip(this, "Deck zones", "Drag the card here to change deck area before dropping it.\r\n" + "Right/middle mouse click a card to add/remove it.\r\n" + "Ctrl+Click or Ctrl+drag-n-drop a card to change its quantity by 4.", _tabHeadersDeck); defaultTooltips.SetTooltip(this, null, "Sets count", _labelStatusSets); defaultTooltips.SetTooltip(this, "Collection cards count", "Use Alt+right/middle mouse click to add/remove card to collection.\r\n" + "Use Ctrl+Alt+right/middle mouse click to add/remove 4 copies.", _labelStatusCollection); defaultTooltips.SetTooltip(this, "Buttons filter mode", "Button filters are round checkable buttons grouped by 2 rows.\r\n" + "There are 3 possible modes: and, or, ignored.\r\n" + "To select between modes use Filter manager - the bottom " + "buttons group in right panel.", _labelStatusFilterButtons); defaultTooltips.SetTooltip(this, "Search bar mode", "Search bar is a wide text input in top panel.\r\n" + "There are 3 possible modes: and, or, ignored.\r\n" + "To select between modes use Filter manager - the bottom " + "buttons group in right panel.", _labelStatusSearch); defaultTooltips.SetTooltip(this, "Filter by Collection mode", "When filtering by Collection, Search result only shows\r\n" + "cards present in your Collection.\r\n\r\n" + "Filtering by Collection can be enabled or disabled using Filter manager - " + "the bottom buttons group in right panel.\r\n" + "There are 3 possible modes: and, or, ignored.\r\n", _labelStatusFilterCollection); defaultTooltips.SetTooltip(this, "Filter by Deck mode", "When filtering by Deck, Search result only shows\r\n" + "cards present in your current Deck.\r\n\r\n" + "Alternatively you can search cards present in any of your decks shown in `deck list` " + "tab. To do this\r\n" + "- open `deck list` tab (it's next to `main deck` / `sideboard` / `sample hand` tabs)\r\n" + "- if necessary narrow down the list of visible saved decks by using search bar " + "in `deck list` tab\r\n" + "- change selected value in `filter by deck` menu located in top right " + "of `deck list` panel.\r\n\r\n" + "Filtering by Deck can be enabled or disabled using Filter manager - " + "the bottom buttons group in right panel.\r\n" + "There are 3 possible modes: and, or, ignored.\r\n", _labelStatusFilterDeck); defaultTooltips.SetTooltip(this, null, "Filter by Legality status", _labelStatusFilterLegality); defaultTooltips.SetTooltip(this, "Search result Sort order", "Sort buttons are located over textual fields in Search result.\r\n" + "Click sort button to sort by field or change sort direction.\r\n" + "Shift + Click to add field to sort priorities,\r\n" + "Ctrl + Click to remove field from sort priorities.\r\n\r\n" + "When all explicit sort criteria are equal, cards are ordered " + "by relevance to search result, then by order in AllSets-x.json file.", _labelStatusSort); setFilterButtonTooltips(defaultTooltips, quickFilterTooltips); defaultTooltips.SetTooltip(this, "Visibility of Prohibiting buttons", "Use Prohibiting buttons to PROHIBIT checked values in a card\r\n" + "I guess you will not often need it so by default those buttons are hidden.", _buttonShowProhibit); defaultTooltips.SetTooltip(this, "Mana Ability filter LEFT row mode", "- mode: PROHIBIT UNCHECKED values\r\n" + "+ mode: REQUIRE ANY checked value", _buttonExcludeManaAbility); defaultTooltips.SetTooltip(this, "Mana Cost filter LEFT row mode", "- mode: PROHIBIT UNCHECKED values\r\n" + "+ mode: REQUIRE ANY checked value", _buttonExcludeManaCost); defaultTooltips.SetTooltip(this, () => { if (!_searchSubsystem.IsApplied) { return("Search bar: receiving user input"); } string errorMessage = _searchSubsystem.SearchResult?.ParseErrorMessage; if (errorMessage != null) { return("Search bar: Syntax error"); } return("Search bar"); }, () => { if (!_searchSubsystem.IsApplied) { return((_uiConfigRepository.Config.AutoApplySearchBar ? "Press ENTER or wait 1 second to apply" : "Press ENTER to apply") + "\r\n\r\n" + "Auto-apply after 1 second can be turned on / off\r\n" + "from Advanced Settings menu in window title"); } string errorMessage = _searchSubsystem.SearchResult?.ParseErrorMessage; if (errorMessage != null) { return(errorMessage); } return ("Narrows down the list of cards below based on a query you type. Example query:\r\n" + "TextEn: \"counter target spell\"\r\n\r\n" + "Ctrl+SPACE to get intellisense\r\n" + "Enter to apply\r\n" + "Ctrl+Backspace to delete one word\r\n" + "F1 to learn search bar query syntax\r\n\r\n" + "Ctrl+F to focus search bar\r\n" + "Middle mouse click to clear"); }, _searchBar, _searchBar.Input); defaultTooltips.SetTooltip(this, "Search query examples", "Opens menu with search query examples.\r\n" + "Same menu is opened by pressing F1.", _popupSearchExamples); defaultTooltips.SetTooltip(this, "Filter by Legality", "Select format\r\n\r\n" + "Middle mouse click to reset filter by legality", _dropdownLegality, _panelIconLegality); defaultTooltips.SetTooltip(this, "Filter by Legality", "Show cards LEGAL in selected format\r\n\r\n" + "Middle mouse click to reset filter by legality", _buttonLegalityAllowLegal); defaultTooltips.SetTooltip(this, "Filter by Legality", "Show cards RESTRICTED in selected format\r\n\r\n" + "Middle mouse click to reset filter by legality", _buttonLegalityAllowRestricted); defaultTooltips.SetTooltip(this, "Filter by Legality", "Show cards BANNED in selected format\r\n\r\n" + "Middle mouse click to reset filter by legality", _buttonLegalityAllowBanned); defaultTooltips.SetTooltip(this, "Filter by Legality", "Show cards which will SOON BECOME LEGAL in selected format", _buttonLegalityAllowFuture); defaultTooltips.SetTooltip(this, "Show duplicates", "Card duplicates have the same name and by rules\r\n" + "they are considered to be the same card.\r\n\r\n" + "Some cards are released in multiple Sets. Also in most Sets\r\n" + "Basic lands are released in multiple variants.", _buttonShowDuplicates); defaultTooltips.SetTooltip(this, null, "Deck panel visibility", _buttonHideDeck); const string hideScrollText = "Click to toggle scrollbar visibility"; defaultTooltips.SetTooltip(this, null, hideScrollText, _buttonShowScrollCards); defaultTooltips.SetTooltip(this, null, hideScrollText, _buttonShowScrollDeck); defaultTooltips.SetTooltip(this, null, "Deck panel scroll position", _labelStatusScrollDeck); defaultTooltips.SetTooltip(this, null, "Search result scroll position", _labelStatusScrollCards); defaultTooltips.SetTooltip(this, "Partial cards visibility", "Depending on window size displayed cards may lack some horizontal or vertical " + "space at window borders.\r\n\r\n" + "Enable partial cards to display more cards.\r\n" + "Disable partial cards to completely display card image and text whenever possible.", _buttonShowPartialCards); defaultTooltips.SetTooltip(this, null, "Card text visibility", _buttonShowText); defaultTooltips.SetTooltip(this, "Reset all filters", "Resets all search / filter controls to their default state " + "in order to begin new search from scratch.", _buttonResetFilters); defaultTooltips.SetTooltip(this, _countInputSubsystem.GetTooltipTitle, _countInputSubsystem.GetTooltipText, _countInputSubsystem.InputControl); defaultTooltips.SetCustomTooltip(_tooltipViewCards); defaultTooltips.SetCustomTooltip(_tooltipViewDeck); }
private void setFilterButtonTooltips(TooltipController defaultTooltips, TooltipController quickFilterTooltips) { setRegularTooltip(defaultTooltips, _filterAbility, "Filter by keyword abilities", "Use Middle mouse click to RESET.\r\n\r\n" + "Use TOP row to REQUIRE ALL checked keywords in a card.\r\n" + "Use BOTTOM row to REQUIRE ANY checked keyword in a card.\r\n\r\n" + "Keyword examples: Flying, First Strike, Haste, ...", true); quickFilterTooltips.SetCustomTooltip(new QuickFilterTooltip(_filterAbility, this) { PreferHorizontalShift = true }); setRegularTooltip(defaultTooltips, _filterCastKeyword, "Filter by CAST RELATED keyword abilities", "Use Middle mouse click to RESET.\r\n\r\n" + "Use TOP row to REQUIRE ALL checked keywords in a card.\r\n" + "Use BOTTOM row to REQUIRE ANY checked keyword in a card.\r\n\r\n" + "Keyword examples: Cascade, Flashback, Madness, ...", true); quickFilterTooltips.SetCustomTooltip(new QuickFilterTooltip(_filterCastKeyword, this) { PreferHorizontalShift = true }); setRegularTooltip(defaultTooltips, _filterType, "Filter by spell Type", "Use Middle mouse click to RESET.\r\n\r\n" + "Use BOTTOM row to PROHIBIT any UNCHECKED types in a card.\r\n" + "Use TOP row to REQUIRE ALL checked types in a card.\r\n\r\n" + "Example: to see all artifacts check artifact in TOP row.\r\n\r\n" + "N/A means any Type different from values in this filter.", false); quickFilterTooltips.SetCustomTooltip(new QuickFilterTooltip(_filterType, this)); setRegularTooltip(defaultTooltips, _filterManager, "Filter Manager", "Use Middle mouse click to RESET.\r\n\r\n" + "Filter manager selects between AND / OR mode or DISABLES the following filter sources:\r\n" + " * Filter buttons\r\n" + " * Search bar\r\n" + " * Legality filter\r\n" + " * Filter to cards present in your collection\r\n" + " * Filter to cards present in your deck\r\n\r\n" + "Use TOP row set AND mode.\r\n" + "Use BOTTOM row set OR mode.\r\n" + "Uncheck the source in both rows to set DISABLED mode.", false); quickFilterTooltips.SetCustomTooltip(new QuickFilterTooltip(_filterManager, this)); setRegularTooltip(defaultTooltips, _filterRarity, "Filter by Rarity", "Use Middle mouse click to RESET.\r\n\r\n" + "Use LEFT row to PROHIBIT any UNCHECKED value.\r\n" + "The card cannot have more than 1 Rarity value so there is no\r\n" + "point in using the RIGHT row.\r\n\r\n" + "N/A means any Rarity different from values in this filter.", false); quickFilterTooltips.SetCustomTooltip(new QuickFilterTooltip(_filterRarity, this)); setRegularTooltip(defaultTooltips, _filterManaAbility, "Filter by Mana symbol in card Text", "Use Middle mouse click to RESET.\r\n\r\n" + "Use RIGHT row to REQUIRE ALL checked values to be present in one card.\r\n" + "Use mode selector above to switch the way LEFT row acts:\r\n" + " - mode: PROHIBIT UNCHECKED values\r\n" + " + mode: REQUIRE ANY checked value\r\n\r\n" + "N/A means the card has NONE of the symbols from this filter.", false); quickFilterTooltips.SetCustomTooltip(new QuickFilterTooltip(_filterManaAbility, this)); setRegularTooltip(defaultTooltips, _filterManaCost, "Filter by Mana Cost", "Use Middle mouse click to RESET.\r\n\r\n" + "Use RIGHT row to REQUIRE ALL checked values to be present in one card.\r\n" + "Use mode selector above to switch the way LEFT row acts:\r\n" + " - mode: PROHIBIT UNCHECKED values\r\n" + " + mode: REQUIRE ANY checked value\r\n\r\n" + "N/A means the card has NONE of the symbols from this filter.", false); quickFilterTooltips.SetCustomTooltip(new QuickFilterTooltip(_filterManaCost, this)); setRegularTooltip(defaultTooltips, _filterGeneratedMana, "Filter by Generated Mana", "Use Middle mouse click to RESET.\r\n\r\n" + "Use RIGHT row to REQUIRE ALL checked values to be present in one card.\r\n" + "Use LEFT row to REQUIRE ANY checked value", false); quickFilterTooltips.SetCustomTooltip(new QuickFilterTooltip(_filterGeneratedMana, this)); setRegularTooltip(defaultTooltips, _filterCmc, "Filter by Converted Mana Cost", "Use Middle mouse click to RESET.\r\n\r\n" + "Use LEFT row to REQUIRE ANY checked value\r\n" + "The card cannot have more than 1 Converted Mana Cost value\r\n" + "so there is NO point in using the RIGHT row.", false); setRegularTooltip(defaultTooltips, _filterLayout, "Filter by Layout", "Use Middle mouse click to RESET.\r\n\r\n" + "Use LEFT row to REQUIRE ANY checked value\r\n" + "The card cannot have more than 1 Layout value\r\n" + "so there is NO point in using the RIGHT row.", false); quickFilterTooltips.SetCustomTooltip(new QuickFilterTooltip(_filterLayout, this)); setRegularTooltip(defaultTooltips, _filterCardType, "Filter by Card Type", "Use Middle mouse click to RESET.\r\n\r\n" + "Use LEFT row to REQUIRE ANY checked value\r\n" + "The card cannot have more than 1 Card Type value\r\n" + "so there is NO point in using the RIGHT row.", false); quickFilterTooltips.SetCustomTooltip(new QuickFilterTooltip(_filterCardType, this)); }
private void setupTooltips() { TooltipController.SetTooltip(this, "Undo: Ctrl+Z, Alt+Left", "Click to undo your last action", _buttonUndo); TooltipController.SetTooltip(this, "Redo: Ctrl+Y, Alt+Right", "Click to repeat the action cancelled with undo", _buttonRedo); TooltipController.SetTooltip(this, "Deck statistics", "Opens a Pivot report window. Use it to view \r\n" + "mana curve, price breakdown, or create \r\n" + "a custom report by moving field captions between\r\n" + "Row, Column and Summary areas of grid.", _buttonStat); TooltipController.SetTooltip(this, "Print deck: Ctrl+P", "The print buttons doesn't actually print, instead\r\n" + "it creates images of cards by groups of 8\r\n" + "that can be printed on A4 paper.", _buttonPrint); TooltipController.SetTooltip(this, "Clear deck", "Use it to start creating a new deck from scratch", _buttonClear); TooltipController.SetTooltip(this, "Enable / disable tooltips", "Tooltips are helpful but also annoying.\r\n" + "Uncheck this button to disable tooltips.\r\n" + "\r\n" + "Tooltips on card text have selectable text. " + "They can be used to select a part of a long text not fitting into the field area.\r\n" + "\r\n" + "Hold Alt key to temporarily disable / enable tooltips.\r\n" + "\r\n" + "When selecting text in a small field disabling tooltip by holding Alt key helps avoid distraction from tooltips.\r\n" + "\r\n" + "Temporarily enabling tooltip by holding Alt key helps to see one particular tooltip for a very large " + "text field, e.g. some long Rulings, without enabling tooltips in general.", _buttonTooltips); TooltipController.SetTooltip(this, "Show / hide filter panels", "filter panels are located on top and right edges of the window.", _buttonFilterPanels); TooltipController.SetTooltip(this, "Update", "Shows a window where you can\r\n" + " * Check for a new version of Mtgdb.Gui\r\n" + " * Download the most recent cards database from Mtgjson.com\r\n" + " * Download card images\r\n" + " * Download artworks", _buttonDownload); TooltipController.SetTooltip(this, "Advanced settings", "Opens configuration file.\r\n" + "Use it to tell the program where to find your custom card images or tweak some other settings.\r\n" + "\r\n" + "Configuration file is opened by whatever application you have associated with *.xml files. " + "If it's Internet Explorer, you need to assign *.xml extension to a text editor instead, " + "because Internet Explorer only displays the file without allowing to edit." + "I recommend using an editor with XML syntax highlighting e.g. Notepad++.\r\n" + "\r\n" + "To apply your changes save the modified configuration file and restart the program.", _buttonConfig ); TooltipController.SetTooltip(this, "Open new window", "You can drag-n-drop Cards and Tabs between windows.", _buttonOpenWindow); var tabHeadersTooltip = new TabHeadersTooltip(_tabs, this); tabHeadersTooltip.SubscribeToEvents(); TooltipController.SetCustomTooltip(tabHeadersTooltip); Load += loadTooltips; Closing += closeTooltips; }