diff --git a/Ooui/Button.cs b/Ooui/Button.cs index e11da52..8ba4bf1 100644 --- a/Ooui/Button.cs +++ b/Ooui/Button.cs @@ -22,6 +22,12 @@ namespace Ooui { Text = text; } + + public Button (string text, TargetEventHandler clickHandler) + : this (text) + { + Click += clickHandler; + } } [JsonConverter (typeof (StringEnumConverter))] diff --git a/Ooui/Div.cs b/Ooui/Div.cs index f9098c4..6e2cacf 100644 --- a/Ooui/Div.cs +++ b/Ooui/Div.cs @@ -12,7 +12,15 @@ namespace Ooui { } - public Div (params Element[] children) + public Div (params Node[] children) + : this () + { + foreach (var c in children) { + AppendChild (c); + } + } + + public Div (IEnumerable children) : this () { foreach (var c in children) { diff --git a/Ooui/ListItem.cs b/Ooui/ListItem.cs index 09d72bd..4d4329d 100644 --- a/Ooui/ListItem.cs +++ b/Ooui/ListItem.cs @@ -8,5 +8,11 @@ namespace Ooui : base ("li") { } + + public ListItem (string text) + : this () + { + Text = text; + } } }