你的浏览器禁用了JavaScript, 请开启后刷新浏览器获得更好的体验!
输入关键字进行搜索
搜索:
没有找到相关结果
谷主
赞同来自:
namespace FairyEditor.Dialog { public class InputDialog : DialogBase { Action<string> _callback; public InputDialog() { this.contentPane = UIPackage.CreateObject("Builder", "InputDialog").asCom; this.modal = true; this.frame.text = App.GetString(84); contentPane.GetChild("ok").onClick.Add(ActionEventHandler); contentPane.GetChild("cancel").onClick.Add(closeEventHandler); } public void Open(string prompt, string content = null, Action<string> callback = null) { Show(); this.contentPane.GetChild("prompt").text = prompt; this.contentPane.GetChild("input").text = content; _callback = callback; this.Center(true); } override public void ActionHandler() { this.Hide(); Action<string> f = _callback; _callback = null; if (f != null) f(this.contentPane.GetChild("input").text); } } }
要回复问题请先登录或注册
1 个回复
谷主
赞同来自: