Frame/Assets/Scripts/UI/MVVM/ViewModel/GlobalTipsUIViewModel.cs

21 lines
755 B
C#

using System;
using uMVVM.Sources.Infrastructure;
namespace Game.MVVM.Model
{
public class GlobalTipsUIViewModel : ViewModelBase
{
public readonly BindableProperty<string> TipsContent = new BindableProperty<string>();
public readonly BindableProperty<string> TipsSure = new BindableProperty<string>();
public readonly BindableProperty<string> TipsClose = new BindableProperty<string>();
public Action OnClickSure;
public Action OnClickClose;
public void SetTips(string content, string btnSure = "确定", string btnClose = "关闭")
{
this.TipsContent.Value = content;
this.TipsSure.Value = btnSure;
this.TipsClose.Value = btnClose;
}
}
}