public void CreateTooltip(string tooltipText, Transform tooltipParent, params Card[] displayCards) { StopAllTooltips(); activeTooltip = Instantiate(tooltipPrefab); activeTooltip.DisplayValuesAndVisualCards(tooltipText, tooltipParent, displayCards); }
public void CreateTooltip(string tooltipText, Transform tooltipParent) { StopAllTooltips(); activeTooltip=Instantiate(tooltipPrefab); activeTooltip.DisplayText(tooltipText, tooltipParent); }
public void test_if_tooltips_properties_are_read_correctly_NO_NAMES_CHECKED(Size resolution, string filename, TooltipData data) { Environment.CurrentDirectory = path; var bmp = Bitmap.FromFile(filename) as Bitmap; try { var tt = new Tooltip(bmp); var results = new TooltipData(tt); Trace.TraceInformation("Tooltip scanned in {0}ms", results.TimeTaken); var fn = string.Format("{0}x{1}_{2}", resolution.Width, resolution.Height, Path.GetFileName(filename)); tt.Processed.Save(fn, ImageFormat.Png); Assert.AreEqual(data.Type, results.Type); Assert.AreEqual(data.Quality, results.Quality); Assert.AreEqual(data.Meta, results.Meta); Assert.AreEqual(data.DPS, results.DPS); File.Delete(fn); } finally { bmp.Dispose(); } }
private void Awake() { _instance = this; _label = GetComponentInChildren<UILabel>(); Hide(); }
/// <summary> /// On mouse out, hide the tooltip (which in turn, gets destroyed) /// and set the current tooltip to `null` /// </summary> /// <param name="eventData">The `PointerEventData` of the event</param> public void OnPointerExit(PointerEventData eventData) { if (tooltip == null) { return; } // TODO: this is gross tooltip.Hide(); tooltip = null; }
void Start() { if (GameObject.FindGameObjectWithTag("Tooltip") != null) { tooltip = GameObject.FindGameObjectWithTag("Tooltip").GetComponent<Tooltip>(); tooltipGameObject = GameObject.FindGameObjectWithTag("Tooltip"); tooltipRectTransform = tooltipGameObject.GetComponent<RectTransform>() as RectTransform; } canvasRectTransform = GameObject.FindGameObjectWithTag("Canvas").GetComponent<RectTransform>() as RectTransform; }
/* * Retrieve the player id */ void Start() { gameObject.layer = LayerMask.NameToLayer("HiddenThings"); gameObject.transform.Translate(0, 0, 9); // set material to stencil masked gameObject.GetComponent<SpriteRenderer>().material = (Material)Resources.Load("Stencil_01_Diffuse Sprite", typeof(Material)); _player_id = GameData.MyPlayer.PlayerID; _world_item_manager = GameObject.FindGameObjectWithTag("GameManager").GetComponent<WorldItemManager>(); _tooltip = GameObject.Find("Inventory").GetComponent<Tooltip>(); }
void Start() { item = GetComponent<ItemOnObject>().item; if (GameObject.FindGameObjectWithTag("Tooltip") != null) tooltip = GameObject.FindGameObjectWithTag("Tooltip").GetComponent<Tooltip>(); if (GameObject.FindGameObjectWithTag("EquipmentSystem") != null) eS = GameObject.FindGameObjectWithTag("Player").GetComponent<PlayerInventory>().characterSystem.GetComponent<EquipmentSystem>(); if (GameObject.FindGameObjectWithTag("MainInventory") != null) mainInventory = GameObject.FindGameObjectWithTag("MainInventory"); }
private void Awake() { if (_instance == null) { _instance = this; } else { Destroy(gameObject); } }
void Start() { UnityEngine.GameObject canvas = UnityEngine.GameObject.FindGameObjectWithTag("Canvas"); if (canvas.transform.Find("Tooltip - Inventory(Clone)") != null) { tooltip = canvas.transform.Find("Tooltip - Inventory(Clone)").GetComponent<Tooltip>(); tooltipGameObject = canvas.transform.Find("Tooltip - Inventory(Clone)").gameObject; tooltipRectTransform = tooltipGameObject.GetComponent<RectTransform>() as RectTransform; } canvasRectTransform = GameObject.FindGameObjectWithTag("Canvas").GetComponent<RectTransform>() as RectTransform; }
public void hide( Tooltip tooltip ) { _shownTooltip = null; stopShowTask(); if( tooltip.getContainer().hasParent() ) { _shownTooltips.Remove( tooltip ); hideAction( tooltip ); stopResetTask(); startResetTask(); } }
public void enter( Tooltip tooltip ) { _shownTooltip = tooltip; stopShowTask(); if( enabled || tooltip.getAlways() ) { if( _time == 0 || tooltip.getInstant() ) startShowTask( 0 ); else startShowTask( _time ); } }
//private UIPanel panel; void Awake() { mInstance = this; mTrans = transform; mWidgets = GetComponentsInChildren<UIWidget>(); mPos = mTrans.localPosition; mSize = mTrans.localScale; if (uiCamera == null) uiCamera = NGUITools.FindCameraForLayer(gameObject.layer); //panel = GetComponent<UIPanel>(); SetAlpha(0f); gameObject.SetActive(false); }
public void Generate(BudgetDTO[] budget, Int32 money) { Chart = new ChartType() { Type = "areaspline" }; Title = new Title() { Text = "Budget report" }; Subtitle = new Title() { Text = "Current session" }; XAxis = new XAxis() { Categories = budget.Select(x => x.Name).ToArray() }; YAxis = new YAxis() { Title = new Title() { Text = "Budget" } }; Tooltip = new Tooltip() { Shared = true, ValueSuffix = " money" }; Series = new ChartSeries[] { new ChartSeries() { Name = "Current", Data = budget.Select(x => (Int32)(x.Value)).ToArray() } }; }
/// <summary> /// When moused over, and if an item is _not_ being dragged, /// this will use the `TooltipFactory` to instantiate a new /// `Tooltip` at the location around the associated `RectTransform` /// </summary> /// <param name="eventData">The `PointerEventData` of the event</param> public void OnPointerEnter(PointerEventData eventData) { if (tooltipPrefab == null || rectTransform == null) { return; } // don't show tooltip if an item is being dragged if (Draggable.DraggedItem != null) { return; } tooltip = TooltipFactory.Create(tooltipPrefab, text, rectTransform); }
// Use this for initialization void Start() { UnityEngine.GameObject canvas = UnityEngine.GameObject.FindGameObjectWithTag("Canvas"); if (canvas.transform.Find("Tooltip - Inventory(Clone)") != null) tooltip = canvas.transform.Find("Tooltip - Inventory(Clone)").GetComponent<Tooltip>(); eS = this.transform.GetComponent<PlayerInventory>().characterSystem.GetComponent<EquipmentSystem>(); equipInventory = this.transform.GetComponent<PlayerInventory>().characterSystem.GetComponent<Inventory>(); itemInventory = this.transform.GetComponent<PlayerInventory>().inventory.GetComponent<Inventory>(); KBEngine.Event.registerOut("dropItem_re", this, "dropItem_re"); KBEngine.Event.registerOut("pickUp_re", this, "pickUp_re"); KBEngine.Event.registerOut("equipItemRequest_re", this, "equipItemRequest_re"); }
public void Init(Transform slotTransform, List<RectTransform> slotRects, Weapon weapon, Tooltip tooltip) { this.slotTransform = slotTransform; this.slotRects = slotRects; this.weapon = weapon; this.tooltip = tooltip; tileRectTransform = transform as RectTransform; canvasRectTransform = GetComponentInParent<Canvas>().transform as RectTransform; rectTransform = GetComponent<RectTransform>(); Vector3[] corners = new Vector3[4]; tileRectTransform.GetWorldCorners(corners); // RectTransform doesn't give a way to get width/height in world units, so must hack it. rectWidth = corners[2].x - corners[0].x; rectHeight = corners[2].y - corners[0].y; }
void Awake() { self = this; totalLength = fadeInLength + stayLength + fadeOutLength; fadeInStepColor = new Color(0,0,0, (shownColor.a-hiddenColor.a)/fadeInLength); fadeOutStepColor = new Color(0,0,0, (shownColor.a-hiddenColor.a)/fadeOutLength); textFadeInStepColor = new Color(0,0,0, (textShownColor.a-textHiddenColor.a)/fadeInLength); textFadeOutStepColor = new Color(0,0,0, (textShownColor.a-textHiddenColor.a)/fadeOutLength); image = GetComponent<Image>(); if(Application.isMobilePlatform){ msg = "Tap another finger to move atoms back and forward"; } else{ msg = "Scroll mouse wheel to move atoms back and forward"; } text.text = msg; }
// Called when the game state has been initiated protected override void onInit() { c= new Panel(); l= new Label("You have such EXQUISITE taste. Hmm, good?probs\tOK!"); p= new ProgressBar(); b= new Button(); s= new GUISet(); t= new Tooltip(); x= new TextBox(); c.bEnabled= false; c.size= new Size2(200, 200); l.size= new Size2(100, 30); p.location= new Point2(400, 10); p.size= new Size2(200, 30); p.progress= 1f; p.tooltip= t; b.location= new Point2(200, 100); b.size= new Size2(100, 32); b.border.setBorderSize(1f); b.border.setBorderStyle(BorderStyle.SOLID); b.text= "DERPSKI"; t.size= new Size2(100, 100); GUIColorPacket bg= t.bgColors; bg.normal= new Color(255, 0, 0); t.bgColors= bg; t.bgColors.setNormal(new Color(255, 0, 0)); //p.bHorizontal= false; p.text= "100/100"; p.bDisplayText= true; x.location= new Point2(40, 40); x.size= new Size2(100, 24); p.includeEvent("onProgressChanged", (GUIEvent)(delegate(GUIControl ctrl) { p.text= (p.progress*100f).ToString("N0")+"/100"; })); s.addControl(x); game.gui.addGUISet("splash_001", s); game.gui.open("splash_001"); game.window.viewport.clearColor= new Color("#000"); }
void OnEnable() { tooltip = target as Tooltip; tooltip.setVariables(); tooltipWidth = serializedObject.FindProperty("tooltipWidth"); tooltipHeight = serializedObject.FindProperty("tooltipHeight"); showTooltipIcon = serializedObject.FindProperty("showTooltipIcon"); showTooltipName = serializedObject.FindProperty("showTooltipName"); showTooltipDesc = serializedObject.FindProperty("showTooltipDesc"); tooltipIconPosX = serializedObject.FindProperty("tooltipIconPosX"); tooltipIconPosY = serializedObject.FindProperty("tooltipIconPosY"); tooltipNamePosX = serializedObject.FindProperty("tooltipNamePosX"); tooltipNamePosY = serializedObject.FindProperty("tooltipNamePosY"); tooltipDescPosX = serializedObject.FindProperty("tooltipDescPosX"); tooltipDescPosY = serializedObject.FindProperty("tooltipDescPosY"); tooltipDescSizeX = serializedObject.FindProperty("tooltipDescSizeX"); tooltipDescSizeY = serializedObject.FindProperty("tooltipDescSizeY"); tooltipIconSize = serializedObject.FindProperty("tooltipIconSize"); }
public void Init(Ingredient ingred) { if (!tooltip) tooltip = GetComponent<Tooltip>(); ingredient = ingred; if (ingredient) { image = ingredient.icon; iconImage.sprite = image; costText.text = "$" + ingredient.cost; GetComponent<Tooltip>().SetTooltipText(ingredient.ingredientName, ingredient.flavorText); } else { iconImage.sprite = GUIManager.instance.emptySprite; } costText.gameObject.SetActive(ingredient); if (tooltip) { tooltip.SetTipActive(ingredient); } }
public override void SetStaticDefaults() { DisplayName.SetDefault("Reverse Arrow"); Tooltip.SetDefault("Flies backwards into your bow!"); }
public override void SetStaticDefaults() { DisplayName.SetDefault("Tin Clicker"); Tooltip.SetDefault("Click on an enemy within range and sight to damage them"); }
public override void SetStaticDefaults() { DisplayName.SetDefault("Cosmorock Cluster Banner"); Tooltip.SetDefault(""); }
public override void SetStaticDefaults() { DisplayName.SetDefault("Granite Shield"); Tooltip.SetDefault("Increased invinicility frames duration\n'Made of real rock'"); }
public override void SetStaticDefaults() { DisplayName.SetDefault("Aquamarine Ring"); Tooltip.SetDefault("+5% Magic Damage" + "\n+40 Mana"); }
public override void SetStaticDefaults() { DisplayName.SetDefault("Stone of Potency"); Tooltip.SetDefault("Increases health regeneration by 1\nBoosts healing potion effectiveness by 20%\nIncreases potion duration by 35%"); }
public override void SetStaticDefaults() { DisplayName.SetDefault("Jade Fan"); Tooltip.SetDefault("Shoots out 5 spikes"); }
public override void SafeSetStaticDefaults() { DisplayName.SetDefault("Shadow Weaver"); Tooltip.SetDefault("\nHitting an enemy will grant you a shadow orb" + "\nIf you have 3 shadow orbs, your next hit will empower you with dark energy for 30 seconds"); }
public override void SetStaticDefaults() { DisplayName.SetDefault("Gelon Slice"); Tooltip.SetDefault("Increases your max number of minions\n'Sweet 'n' slimy'"); }
public override void SetStaticDefaults() { DisplayName.SetDefault("Ultra Heavy Bouncer"); Tooltip.SetDefault("Uses bullets, shoots a double splitting ball that inflicts frostburn.\nInspired by Ratchet and Clank: Going Commando."); }
public override void SetStaticDefaults() { DisplayName.SetDefault("Scattergun"); Tooltip.SetDefault("Converts regular bullets into neon pellets"); SpiritGlowmask.AddGlowMask(item.type, "SpiritMod/Items/Weapon/Gun/Scattergun_Glow"); }
/// <summary> /// Called when tooltip is hidden. Default implementation sets actions to animate hiding and to remove the Element from the stage /// when the actions are complete. /// </summary> /// <returns>The action.</returns> /// <param name="tooltip">Tooltip.</param> protected void hideAction( Tooltip tooltip ) { var container = tooltip.getContainer(); if( animations ) { PropertyTweens.floatPropertyTo( container, "scaleX", 0.2f, 0.2f ).setEaseType( EaseType.QuintOut ).start(); PropertyTweens.floatPropertyTo( container, "scaleY", 0.2f, 0.2f ).setEaseType( EaseType.QuintOut ) .setCompletionHandler( t => container.remove() ) .start(); } else { container.remove(); } }
public override void SetStaticDefaults() { DisplayName.SetDefault("Ancient Dune Worm Mask"); Tooltip.SetDefault("A bit dusty"); }
public override void SetStaticDefaults() { DisplayName.SetDefault("Primal Blade"); Tooltip.SetDefault("Could be sharper"); }
public override void SetStaticDefaults() { DisplayName.SetDefault("Placeable Roxcalibur"); Tooltip .SetDefault("'You can rock!'"); }
public override void SetStaticDefaults() { Tooltip.SetDefault("The standard pickaxe given to Terrarians."); }
public override void SetStaticDefaults() { DisplayName.SetDefault("Tropical Candle"); Tooltip.SetDefault(""); }
public override void SetStaticDefaults() { DisplayName.SetDefault("Blightstone Dragon Staff"); Tooltip.SetDefault("Creates a blightstone dragon to fight for you"); }
public override void SetStaticDefaults() { DisplayName.SetDefault("Demonic Idol"); Tooltip.SetDefault("Idol of the Underworld's most famous demon"); }
public override void SetStaticDefaults() { DisplayName.SetDefault("Galaxy Fury"); Tooltip.SetDefault("Converts Wooden Arrows into Galaxy Arrows.\nHas a 1/5 chance to shoot out a Galaxy Blast"); }
public override void SetStaticDefaults() { DisplayName.SetDefault("Hardmode Core of Expertise"); Tooltip.SetDefault("*You are filled with determination"); }
public override void SetStaticDefaults() { Tooltip.SetDefault("Hitting enemies with ki attacks inflicts bleeding."); DisplayName.SetDefault("Ruby Ki Infuser"); }
public IBootstrapFile Tooltip(Tooltip tooltip) { this._model.tooltip = tooltip; return this; }
public override void SetStaticDefaults() { DisplayName.SetDefault("Deerling's Pokeball"); //Tooltip.SetDefault(""); Tooltip.SetDefault("Spring Forme"); }
public IBootstrapListBox Tooltip(Tooltip tooltip) { this._model.tooltip = tooltip; return this; }
public override void SetStaticDefaults() { DisplayName.SetDefault("Hydra Trishot"); Tooltip.SetDefault(""); }
void Start() { if (inputManagerDatabase == null) inputManagerDatabase = (InputManager)Resources.Load("InputManager"); player = GameObject.FindGameObjectWithTag("Player"); inv = inventory.GetComponent<Inventory>(); ItemDataBaseList inventoryItemList = (ItemDataBaseList)Resources.Load("ItemDatabase"); int creatingItemsForChest = 1; int randomItemAmount = Random.Range(1, itemAmount); while (creatingItemsForChest < randomItemAmount) { int randomItemNumber = Random.Range(1, inventoryItemList.itemList.Count - 1); int raffle = Random.Range(1, 100); if (raffle <= inventoryItemList.itemList[randomItemNumber].rarity) { int randomValue = Random.Range(1, inventoryItemList.itemList[randomItemNumber].getCopy().maxStack); Item item = inventoryItemList.itemList[randomItemNumber].getCopy(); item.itemValue = randomValue; storageItems.Add(item); creatingItemsForChest++; } } if (GameObject.FindGameObjectWithTag("Timer") != null) { timerImage = GameObject.FindGameObjectWithTag("Timer").GetComponent<Image>(); timer = GameObject.FindGameObjectWithTag("Timer"); timer.SetActive(false); } if (GameObject.FindGameObjectWithTag("Tooltip") != null) tooltip = GameObject.FindGameObjectWithTag("Tooltip").GetComponent<Tooltip>(); }
/// <summary> /// Called when tooltip is shown. Default implementation sets actions to animate showing. /// </summary> /// <returns>The action.</returns> /// <param name="tooltip">Tooltip.</param> protected void showAction( Tooltip tooltip ) { var container = tooltip.getContainer(); if( animations ) { var actionTime = _time > 0 ? 0.3f : 0.15f; container.setTransform( true ); container.setScale( 0.5f ); PropertyTweens.floatPropertyTo( container, "scaleX", 1, actionTime ).setEaseType( EaseType.QuintIn ).start(); PropertyTweens.floatPropertyTo( container, "scaleY", 1, actionTime ).setEaseType( EaseType.QuintIn ).start(); } else { container.setScale( 1 ); } }
public override void SetStaticDefaults() { DisplayName.SetDefault("Hailstone"); Tooltip.SetDefault("An underground ore made out ice and hail."); }
public void hideAll() { stopResetTask(); stopShowTask(); _time = initialTime; _shownTooltip = null; foreach( var tooltip in _shownTooltips ) hide( tooltip ); _shownTooltips.Clear(); }
public override void SetStaticDefaults() { DisplayName.SetDefault("Ruin Key"); Tooltip.SetDefault("Opens Ruin Chest once"); }
void Start() { Instance = this; active = false; my_transform = GetComponent<RectTransform>(); }
public override void SetStaticDefaults() { Tooltip.SetDefault("45% increased movement speed"); }
void Awake() { instance = this; }
public override void SetStaticDefaults() { DisplayName.SetDefault("Treasure Bag"); Tooltip.SetDefault("{$CommonItemTooltip.RightClickToOpen}"); DisplayName.AddTranslation(GameCulture.Chinese, "宝藏袋"); }
/*--------------------------------------------------------------------------------------- -- FUNCTION: Start -- DATE: 17/02/2016 -- REVISIONS: -- DESIGNER: Joseph Tam-Huang -- PROGRAMMER: Joseph Tam-Huang -- INTERFACE: void Start() -- RETURNS: void -- NOTES: -- Retrieves the Inventory script, the Tooltip script and the ItemMenu script. ----------------------------------------------------------------------------------------*/ void Start() { _inventory = GameObject.Find("Inventory").GetComponent<Inventory>(); _tooltip = _inventory.GetComponent<Tooltip>(); _item_menu = _inventory.GetComponent<ItemMenu>(); }
public override void SetStaticDefaults() { DisplayName.SetDefault("Eternal Sword"); Tooltip.SetDefault("Shoots out apparitions of blades"); }
public override void SetStaticDefaults() { DisplayName.SetDefault("Cryoshot Bullet"); Tooltip.SetDefault("Has a chance to inflict a devastating damage over time debuff. \nStriking an enemy grants you a defense and regen-boosting buff."); }
public override void SetStaticDefaults() { DisplayName.SetDefault("Water Vial"); Tooltip.SetDefault("\n[c/FF0000:Test Item]"); }