예제 #1
0
        public StrafeChatBox()
        {
            Current = this;

            StyleSheet.Load("/ui/StrafeChatBox.scss");

            Canvas = Add.Panel("chat_canvas");

            Input = Add.TextEntry("");
            Input.AddEvent("onsubmit", () => Submit());
            Input.AddEvent("onblur", () => Close());
            Input.AcceptsFocus      = true;
            Input.AllowEmojiReplace = true;

            Sandbox.Hooks.Chat.OnOpenChat += Open;
        }
예제 #2
0
        public ChatPanel()
        {
            Current = this;

            StyleSheet.Load("/UI/Game/ChatPanel.scss");

            Canvas = Add.Panel("chat_canvas");

            Input = Add.TextEntry("");
            Input.AddEvent("onsubmit", () => Submit());
            Input.AddEvent("onblur", () => Blur());
            Input.AcceptsFocus      = true;
            Input.AllowEmojiReplace = true;

            Chat.OnOpenChat += Open;
        }