예제 #1
0
        public TextureRefBox(Base parent, FSTextureReference Texture)
            : base(parent)
        {
            this.Texture = Texture;
            this.SetSize(160, 75);

            TextureName = new Label(this);
            TextureName.AutoSizeToContents = true;
            TextureName.SetPosition(10, 0);

            Defined = new LabeledCheckBox(this);
            Defined.Text = "Defined";
            Defined.SetPosition(10, 20);
            Defined.CheckChanged += new GwenEventHandler<EventArgs>(Defined_CheckChanged);

            panel = new GLImpTexturePanel(this);
            panel.SetSize(50, 50);
            panel.SetPosition(85, 0);
            panel.Clicked += delegate(Base sender, ClickedEventArgs args) {
                OpenTextureWindow otw = new OpenTextureWindow(SetTexture);
                otw.Show();
            };

            RefreshAll();
        }
예제 #2
0
        internal override void Read(NetIncomingMessage Message)
        {
            base.Read(Message);
            Liquid = Message.ReadBoolean();
            Transparent = Message.ReadBoolean();

            int TexCount = Message.ReadInt32();
            Texture.Clear();
            for (int i = 0; i < TexCount; i++) {
                FSTextureReference tex = new FSTextureReference();
                tex.Read(Message);
                Texture.Add(tex);
            }
        }