public UIChatDialog()
: base(UIDialogStyle.Standard | UIDialogStyle.OK | UIDialogStyle.Close, true)
{
//todo: this dialog is resizable. The elements use offests from each side to size and position themselves.
//right now we're just using positions.
History = new List<VMChatEvent>();
this.RenderScript("chatdialog.uis");
this.SetSize(400, 255);
this.Caption = "Property Chat (?) - ???";
ChatEntryBackground = new UIImage(GetTexture((ulong)0x7A400000001)).With9Slice(13, 13, 13, 13);
ChatEntryBackground.Position = new Vector2(25, 211);
ChatEntryBackground.SetSize(323, 26);
AddAt(5, ChatEntryBackground);
ChatHistoryBackground = new UIImage(GetTexture((ulong)0x7A400000001)).With9Slice(13, 13, 13, 13);
ChatHistoryBackground.Position = new Vector2(19, 39);
ChatHistoryBackground.SetSize(341, 166);
AddAt(5, ChatHistoryBackground);
ChatHistorySlider.AttachButtons(ChatHistoryScrollUpButton, ChatHistoryScrollDownButton, 1);
ChatHistoryText.AttachSlider(ChatHistorySlider);
ChatEntryTextEdit.OnEnterPress += SendMessageEnter;
ChatHistoryText.Position = new Vector2(29, 47);
var histStyle = ChatHistoryText.TextStyle.Clone();
histStyle.Size = 8;
ChatHistoryText.Size = new Vector2(322, 150);
ChatHistoryText.MaxLines = 10;
ChatHistoryText.TextStyle = histStyle;
ChatEntryTextEdit.OnChange += ChatEntryTextEdit_OnChange;
ChatEntryTextEdit.Position = new Vector2(38, 216);
ChatEntryTextEdit.Size = new Vector2(295, 17);
OKButton.Disabled = true;
OKButton.OnButtonClick += SendMessage;
CloseButton.OnButtonClick += CloseButton_OnButtonClick;
}