コード例 #1
0
ファイル: PagePanel.cs プロジェクト: weimingtom/Sakura
        public PagePanel()
        {
            this.panelContainer      = new ContainerWidget();
            this.panelContainer.Clip = false;
            base.AddChildLast(this.panelContainer);
            this.sprtContainer      = new ContainerWidget();
            this.sprtContainer.Clip = false;
            base.AddChildLast(this.sprtContainer);
            this.panelList           = new List <Panel>();
            this.sprtList            = new List <UISprite>();
            this.pageCount           = 0;
            this.pageIndex           = -1;
            base.Clip                = true;
            base.HookChildTouchEvent = true;
            this.state               = PagePanel.AnimationState.None;
            this.activeImage         = new ImageAsset(SystemImageAsset.PagePanelActive);
            this.normalImage         = new ImageAsset(SystemImageAsset.PagePanelNormal);
            DragGestureDetector dragGestureDetector = new DragGestureDetector();

            dragGestureDetector.DragDetected += new EventHandler <DragEventArgs>(this.DragEventHandler);
            base.AddGestureDetector(dragGestureDetector);
            FlickGestureDetector flickGestureDetector = new FlickGestureDetector();

            flickGestureDetector.Direction      = FlickDirection.Horizontal;
            flickGestureDetector.FlickDetected += new EventHandler <FlickEventArgs>(this.FlickEventHandler);
            base.AddGestureDetector(flickGestureDetector);
        }
コード例 #2
0
        public LiveListPanel()
        {
            this.sprt = new UISprite(1);
            base.RootUIElement.AddChildLast(this.sprt);
            this.itemContainerPanel = new ContainerWidget();
            base.AddChildLast(this.itemContainerPanel);
            this.scrollBar = new ScrollBar(ScrollBarOrientation.Vertical);
            base.AddChildLast(this.scrollBar);
            this.BackgroundColor   = default(UIColor);
            this.ItemCount         = 0;
            this.ItemVerticalGap   = 32f;
            this.ItemHeight        = 95f;
            this.usingItemDataList = new List <LiveListPanel.ListItemData>();
            this.cacheItemDataList = new List <LiveListPanel.ListItemData>();
            this.Width             = 320f;
            this.Height            = 480f;
            base.Clip = true;
            base.HookChildTouchEvent = true;
            DragGestureDetector dragGestureDetector = new DragGestureDetector();

            dragGestureDetector.DragDetected += new EventHandler <DragEventArgs>(this.DragEventHandler);
            base.AddGestureDetector(dragGestureDetector);
            FlickGestureDetector flickGestureDetector = new FlickGestureDetector();

            flickGestureDetector.FlickDetected += new EventHandler <FlickEventArgs>(this.FlickEventHandler);
            base.AddGestureDetector(flickGestureDetector);
            this.elapsedTimes = new float[60];
        }
コード例 #3
0
 public ListPanelItem()
 {
     this.listItemContainer             = new ContainerWidget();
     this.listItemContainer.Y           = 0f;
     this.listItemContainer.PriorityHit = true;
     base.AddChildLast(this.listItemContainer);
     this.index          = -1;
     this.SectionIndex   = -1;
     this.IndexInSection = -1;
     this.Width          = 200f;
     this.Height         = 60f;
     this.PriorityHit    = true;
 }
コード例 #4
0
 public Layer()
 {
     this.timeLineForChildren = new UIAnimationPlayer.TimeLine();
     this.timeLineForChildren.TimeLineRepeated += new EventHandler <EventArgs>(this.OnTimeLineRepeated);
     this.timeLineForChildren.TimeLineStopped  += new EventHandler <EventArgs>(this.OnTimeLineStoped);
     this.childLayers             = new List <UIAnimationPlayer.Layer>();
     this.motions                 = new List <Effect>();
     this.startedMotions          = new List <Effect>();
     this.motionStartTimes        = new Dictionary <Effect, float>();
     this.transformRoot           = new ContainerWidget();
     this.initialTransform3Dtroot = this.transformRoot.Transform3D;
     this.initialTransform3Droot  = this.Transform3D;
     this.AddChildLast(this.transformRoot);
     this.Repeating = true;
 }