< Summary

Class:SmartItemIntegerParameter
Assembly:BuilderInWorldEntityInformation
File(s):/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/DCL/Controllers/BuilderMode/EntityInformation/SmartItems/Parameters/SmartItemIntegerParameter.cs
Covered lines:0
Uncovered lines:7
Coverable lines:7
Total lines:25
Line coverage:0% (0 of 7)
Covered branches:0
Total branches:0

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
Start()0%2100%
SetInfo()0%2100%
OnValueChange(...)0%2100%

File(s)

/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/DCL/Controllers/BuilderMode/EntityInformation/SmartItems/Parameters/SmartItemIntegerParameter.cs

#LineLine coverage
 1using DCL.Components;
 2using System;
 3using System.Collections;
 4using System.Collections.Generic;
 5using TMPro;
 6using UnityEngine;
 7
 8public class SmartItemIntegerParameter : SmartItemUIParameterAdapter
 9{
 10    public TMP_InputField textParameterInputField;
 11
 012    private void Start() { textParameterInputField.onEndEdit.AddListener(OnValueChange); }
 13
 14    public override void SetInfo()
 15    {
 016        base.SetInfo();
 17
 018        textParameterInputField.gameObject.SetActive(true);
 19
 020        textParameterInputField.contentType = TMP_InputField.ContentType.IntegerNumber;
 021        textParameterInputField.text = GetParameterValue().ToString();
 022    }
 23
 024    public void OnValueChange(string text) { SetParameterValue(Convert.ToInt32(text)); }
 25}