Scrollbar Number Of Steps#
UI / Scroll / Scrollbar / Scrollbar Number Of Steps
Description#
Compares the Number Of Steps property of Scrollbar component to another value
Parameters#
| Name | Description |
|---|---|
| Scrollbar | |
| Compare | |
| Value |
Code#
// <auto-generated>
// This script was automatically generated using the Visual Script Transpiler.
// Do not modify. Changes to this file will be lost when updating the package.
// </auto-generated>
using System;
using UnityEngine;
using VisualScript.Icons;
using UnityEngine.UI;
namespace VisualScript.Runtime
{
[Title("Scrollbar Number Of Steps")]
[Category("UI/Scroll/Scrollbar/Number Of Steps")]
[Description("Compares the Number Of Steps property of Scrollbar component to another value")]
[Image(typeof(IconScrollBar), ColorTheme.Type.TextLight)]
[Keywords("UI, User, Interface")]
[Parameter("Scrollbar")]
[Parameter("Compare")]
[Parameter("Value")]
[Serializable]
public class GenConditionInteger_Scrollbar_CheckNumberOfSteps : Condition
{
[SerializeField] private GetGameObject m_Scrollbar = new GetGameObject(
new GenTypeGameObject_Scrollbar()
);
[SerializeField] private CompareNumber m_Compare = new CompareNumber();
[SerializeField] private GetInteger m_Value = new GetInteger();
protected override string GetTitle(GameObject source)
{
string member = TextUtils.ThemeAsKeyword("Number Of Steps");
return $"{this.m_Scrollbar} {member} {this.m_Compare} {this.m_Value}";
}
protected override bool Run(Args args)
{
Scrollbar component = this.m_Scrollbar.Get<Scrollbar>(args);
if (component == null) return false;
return this.m_Compare.Compare(component.numberOfSteps, (int) this.m_Value.Get(args));
}
}
}