Esempio n. 1
0
        public UIPropertyLog()
            : base(UIDialogStyle.Standard | 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 Log";

            ChatHistoryBackground          = new UIImage(GetTexture((ulong)0x7A400000001)).With9Slice(13, 13, 13, 13);
            ChatHistoryBackground.Position = new Vector2(19, 39);
            ChatHistoryBackground.SetSize(341, 166 + 30);
            AddAt(3, ChatHistoryBackground);

            ChatHistorySlider.AttachButtons(ChatHistoryScrollUpButton, ChatHistoryScrollDownButton, 1);
            ChatHistorySlider.SetSize(ChatHistorySlider.Size.X, 138 + 30);
            ChatHistoryScrollDownButton.Position += new Vector2(0, 30);
            ChatHistoryText.AttachSlider(ChatHistorySlider);

            ChatHistoryText.Position = new Vector2(29, 47);
            var histStyle = ChatHistoryText.TextStyle.Clone();

            histStyle.Size            = 8;
            ChatHistoryText.Size      = new Vector2(322, 150 + 30);
            ChatHistoryText.MaxLines  = 13;
            ChatHistoryText.TextStyle = histStyle;

            Remove(ChatEntryTextEdit);
            CloseButton.OnButtonClick += CloseButton_OnButtonClick;
        }
Esempio n. 2
0
        public UIChatDialog(UILotControl owner)
            : base(UIDialogStyle.Standard | UIDialogStyle.OK | UIDialogStyle.Close, false)
        {
            //todo: this dialog is resizable. The elements use offests from each side to size and position themselves.
            //right now we're just using positions.

            CloseButton.Tooltip = GameFacade.Strings.GetString("f113", "43");
            Owner   = owner;
            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);

            ChatHistoryText.Position      = new Vector2(29, 47);
            ChatHistoryText.BBCodeEnabled = true;
            var histStyle = ChatHistoryText.TextStyle.Clone();

            histStyle.Size            = chatSize;
            ChatHistoryText.Size      = new Vector2(ChatHistoryBackground.Size.X - 19, ChatHistoryBackground.Size.Y - 16);
            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;

            var emojis = new UIEmojiSuggestions(ChatEntryTextEdit);

            DynamicOverlay.Add(emojis);
            emojis.Parent = this;
            ChatEntryTextEdit.OnEnterPress += SendMessageEnter;

            Background.ListenForMouse(new UIMouseEvent(DragMouseEvents));

            Categories          = new UIChatCategoryList(this);
            Categories.Position = new Vector2(31, 29);
            Add(Categories);
            ChangeSizeTo(new Vector2(GlobalSettings.Default.ChatSizeX, GlobalSettings.Default.ChatSizeY));
        }
Esempio n. 3
0
        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;
        }