コード例 #1
0
        protected override void OnEnable()
        {
            base.OnEnable();

            carousel = target as UICarousel;

            m_ElementPrefab = serializedObject.FindProperty("elementPrefab");
            m_ScrollMask    = serializedObject.FindProperty("scrollMask");
        }
コード例 #2
0
        private void ReloadLayout()
        {
            //clear and load layout if window just opened or game version changed
            Children.Clear();
            if (!LoadXml(Paths.GetLayoutFor("overlay")))
            {
                Main.ForceQuit(this);
            }

            progress                 = new UITextBlock("minecraft", 24);
            progress.Margin          = new Margin(12, 0, 8, 0);
            progress.HorizontalAlign = HorizontalAlign.Left;
            progress.VerticalAlign   = VerticalAlign.Top;
            progress.ResizeRecursive(Rectangle);
            AddControl(progress);

            //find named controls
            advancements = GetControlByName("advancements") as UICarousel;
            criteria     = GetControlByName("criteria") as UICarousel;
            counts       = GetControlByName("counts") as UIFlowPanel;
        }
コード例 #3
0
ファイル: UICarouselVisual.cs プロジェクト: HaKDMoDz/Zazumo
 public UICarouselVisual(UICarousel actor, SpriteBatch spriteBatch, IResourceDictionary resourceDictionary)
     : base(actor, spriteBatch, resourceDictionary)
 {
     this._actor = actor;
     this._spriteBatch = spriteBatch;
 }