58 lines
1005 B
C#
58 lines
1005 B
C#
|
|
using System;
|
|
using UVC.UI.Commands;
|
|
|
|
public class ContentSelectButton
|
|
{
|
|
private string title;
|
|
public string Title
|
|
{
|
|
get => title;
|
|
set
|
|
{
|
|
title = value;
|
|
}
|
|
}
|
|
protected string iconSpritePath;
|
|
|
|
public string IconSpritePath
|
|
{
|
|
get => iconSpritePath;
|
|
set
|
|
{
|
|
if (iconSpritePath != value)
|
|
{
|
|
iconSpritePath = value;
|
|
}
|
|
}
|
|
}
|
|
|
|
protected string backGroundSpritePath;
|
|
|
|
|
|
public string BackGroundSpritePath
|
|
{
|
|
get => backGroundSpritePath;
|
|
set
|
|
{
|
|
if (backGroundSpritePath != value)
|
|
{
|
|
backGroundSpritePath = value;
|
|
}
|
|
}
|
|
}
|
|
|
|
public ICommand ClickCommand { get; set; }
|
|
|
|
public Action OnClick;
|
|
public void ExCuteClick()
|
|
{
|
|
if (ClickCommand != null)
|
|
{
|
|
ClickCommand.Execute();
|
|
}
|
|
|
|
OnClick?.Invoke();
|
|
}
|
|
}
|