public static void Show(DndExample_InventoryItem item, Vector2 Position) { SetPosition(Position); _sprite.SpriteName = item.Icon; _sprite.IsVisible = true; _sprite.BringToFront(); _label.Text = (item.Count > 1) ? item.Count.ToString() : ""; }
/// <summary> /// Displays the drag cursor, which will follow the mouse until hidden /// </summary> /// <param name="sprite">The sprite to display in the drag cursor</param> /// <param name="position">The initial position of the drag cursor</param> /// <param name="offset">The mouse offset within the dragged object</param> public static void Show(dfSprite sprite, Vector2 position, Vector2 offset) { _cursorOffset = offset; setPosition(position); _sprite.Size = sprite.Size; _sprite.Atlas = sprite.Atlas; _sprite.SpriteName = sprite.SpriteName; _sprite.IsVisible = true; _sprite.BringToFront(); }