예제 #1
0
        void InitialChat()
        {
            option = new OptionGroup();
            option.AddEvent(view.left.userEvent);
            option.AddEvent(view.right.userEvent);
            option.AddEvent(view.center.userEvent);
            option.SelectChanged = SelectChanged;
            option.Selecet       = view.right.userEvent;

            //input = view.input.userEvent as TextInput;

            view.input.OnSubmit = OnSubmit;
            container           = view.chatbox.composite as UIContainer;
            //other = new UILinker<ChatItem, ChatData>(container,view.other);
            other = new UILinker <ChatItem, ChatData>(container, view.other);
            other.LayoutCallback = GetContentSize;
            other.ItemUpdate     = ItemUpdate;
            self = new UILinker <ChatItem, ChatData>(container, view.self);
            self.LayoutCallback = GetContentSize;
            self.ItemUpdate     = ItemUpdate;
            tip = new UILinker <TipItem, TipData>(container, view.tip);
            //tip.ItemUpdate = TipItemUpdate;
            view.send.userEvent.Click = (o, e) => { OnSubmit(view.input); };
            view.ItemText.activeSelf  = false;
            var size = view.ItemText.SizeDelta;

            view.ItemText.GetGenerationSettings(ref size, ref settings);
        }
예제 #2
0
파일: ChatPage.cs 프로젝트: pkwzsqsdly/HGUI
        void InitialChat()
        {
            option = new OptionGroup();
            option.AddEvent(view.left.userEvent);
            option.AddEvent(view.right.userEvent);
            option.AddEvent(view.center.userEvent);
            option.SelectChanged = SelectChanged;
            option.Selecet       = view.right.userEvent;

            //input = view.input.userEvent as TextInput;

            view.input.OnSubmit = OnSubmit;
            container           = view.chatbox.composite as UIContainer;
            other = new UILinker <ChatItem, ChatData>(container, "other");
            //other.CalculItemHigh = GetContentSize;
            other.ItemUpdate = ItemUpdate;
            self             = new UILinker <ChatItem, ChatData>(container, "self");
            //self.CalculItemHigh = GetContentSize;
            self.ItemUpdate = ItemUpdate;
            tip             = new UILinker <TipItem, TipData>(container, "tip");
            //tip.ItemUpdate = TipItemUpdate;
            view.send.userEvent.Click = (o, e) => { OnSubmit(view.input); };
        }