Ejemplo n.º 1
0
 public override void Initial(ModelElement mod)
 {
     var fill = mod.Find("FillImage");
     if (fill != null)
     {
         fill.Instantiate();
         FillImage = fill.Context;
         image = FillImage.GetComponent<Image>();
     }
     var nob = mod.Find("Nob");
     if (nob != null)
     {
         nob.Instantiate();
         Nob = nob.Context;
     }
     model = mod.Context;
     callBack = EventCallBack.RegEvent<EventCallBack>(model);
     callBack.Drag = callBack.DragEnd = Draging;
     callBack.PointerDown = PointDown;
     callBack.AutoColor = false;
     var fake = mod.GetExtand();
     if(fake!=null)
     {
         unsafe
         {
             info = *(SliderInfo*)fake.ip;
         }
     }
 }
Ejemplo n.º 2
0
        public override void Initial(FakeStruct mod, UIElement script)
        {
            base.Initial(mod, script);
            var trans = script.transform;

            callBack             = Enity.RegEvent <UserEvent>();
            callBack.Drag        = callBack.DragEnd = Draging;
            callBack.PointerDown = PointDown;
            callBack.AutoColor   = false;
            var tmp = trans.Find("FillImage");

            if (tmp != null)
            {
                FillImage = tmp.GetComponent <HImage>();
            }
            tmp = trans.Find("Nob");
            Nob = tmp.GetComponent <HImage>();
            unsafe
            {
                var ex = mod.buffer.GetData(((TransfromData *)mod.ip)->ex) as FakeStruct;
                if (ex != null)
                {
                    info = *(SliderInfo *)ex.ip;
                }
            }
        }
Ejemplo n.º 3
0
        public override void Initial(ModelElement mod)
        {
            Model                = mod;
            callBack             = EventCallBack.RegEvent <EventCallBack>(Model);
            callBack.Drag        = callBack.DragEnd = Draging;
            callBack.PointerDown = PointDown;
            callBack.AutoColor   = false;
            var child = mod.child;

            FillImage = mod.Find("FillImage");
            if (FillImage != null)
            {
                image = FillImage.GetComponent <ImageElement>();
            }
            Nob = mod.Find("Nob");
            var fake = mod.GetExtand() as FakeStruct;

            if (fake != null)
            {
                unsafe
                {
                    info = *(SliderInfo *)fake.ip;
                }
            }
        }
Ejemplo n.º 4
0
        public override void Initial(FakeStruct mod, UIElement script, Initializer initializer)
        {
            base.Initial(mod, script, initializer);
            var trans = script.transform;

            callBack             = Enity.RegEvent <UserEvent>();
            callBack.Drag        = Draging;
            callBack.DragEnd     = DragEnd;
            callBack.PointerDown = PointDown;
            callBack.AutoColor   = false;
            var tmp = trans.Find("FillImage");

            if (tmp != null)
            {
                FillImage = tmp.GetComponent <HImage>();
            }
            tmp = trans.Find("Nob");
            Nob = tmp.GetComponent <HImage>();
            unsafe
            {
                var ex = UITransfromLoader.GetCompositeData(mod);
                if (ex != null)
                {
                    info = *(SliderInfo *)ex.ip;
                }
            }
        }
Ejemplo n.º 5
0
 public override void Initial(FakeStruct mod, UIElement script, UIInitializer initializer)
 {
     base.Initial(mod, script, initializer);
     callBack             = Enity.RegEvent <UserEvent>();
     callBack.Drag        = Draging;
     callBack.DragEnd     = DragEnd;
     callBack.PointerDown = PointDown;
     callBack.AutoColor   = false;
     FillImage            = script.Find("FillImage") as HImage;
     Nob = script.Find("Nob") as HImage;
     unsafe
     {
         var ex = UIElementLoader.GetCompositeData(mod);
         if (ex != null)
         {
             info = *(SliderInfo *)ex.ip;
         }
     }
 }