< Summary

Class:QuickBarSlot
Assembly:BuildModeHUD
File(s):/tmp/workspace/unity-renderer/unity-renderer/Assets/DCLPlugins/BuilderInWorld/HUD/BuildModeHUD/Scripts/Common/QuickBarSlot.cs
Covered lines:11
Uncovered lines:0
Coverable lines:11
Total lines:30
Line coverage:100% (11 of 11)
Covered branches:0
Total branches:0

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
SetTexture(...)0%110100%
SetEmpty()0%110100%
EnableDragMode()0%110100%
SetActive(...)0%110100%

File(s)

/tmp/workspace/unity-renderer/unity-renderer/Assets/DCLPlugins/BuilderInWorld/HUD/BuildModeHUD/Scripts/Common/QuickBarSlot.cs

#LineLine coverage
 1using TMPro;
 2using UnityEngine;
 3using UnityEngine.UI;
 4
 5public class QuickBarSlot : MonoBehaviour
 6{
 7    [SerializeField] internal RawImage image;
 8    [SerializeField] internal TMP_Text text;
 9    [SerializeField] internal CanvasGroup canvasGroup;
 10
 311    public bool isEmpty => !image.enabled;
 312    public Transform slotTransform => transform;
 13
 14    public void SetTexture(Texture texture)
 15    {
 416        image.texture = texture;
 417        image.enabled = true;
 418    }
 19
 6420    public void SetEmpty() { image.enabled = false; }
 21
 22    public void EnableDragMode()
 23    {
 3024        text.enabled = false;
 3025        canvasGroup.blocksRaycasts = false;
 3026        canvasGroup.alpha = 0.6f;
 3027    }
 28
 6629    public void SetActive(bool isActive) { gameObject.SetActive(isActive); }
 30}