コード例 #1
0
ファイル: Page.cs プロジェクト: kakjelsb/Gryphonheart
        /// <summary>
        /// Prepares the page with a given profile.
        /// </summary>
        /// <param name="profile">The profile to prepare with.</param>
        /// <param name="handler">The menu handler.</param>
        public override void Prepare(IElementProfile profile, IMenuHandler handler)
        {
            base.Prepare(profile, handler);
            var pageProfile = (PageProfile)profile;

            this.Name = pageProfile.name;
        }
コード例 #2
0
ファイル: BaseObject.cs プロジェクト: kakjelsb/Gryphonheart
        public override void Prepare(IElementProfile profile, IMenuHandler handler)
        {
            base.Prepare(profile, handler);
            var objProfile = (IObjectProfile)profile;

            this.id        = objProfile.label;
            this.alignment = objProfile.align;
        }
コード例 #3
0
ファイル: WindowedMenu.cs プロジェクト: kakjelsb/Gryphonheart
        public override void Prepare(IElementProfile profile, IMenuHandler handler)
        {
            base.Prepare(profile, handler);
            var menuProfile = (MenuProfile)profile;

            this.window.SetTitle(menuProfile.title);
            this.window.SetIcon(menuProfile.icon);
        }
コード例 #4
0
        public override void Prepare(IElementProfile profile, IMenuHandler handler)
        {
            base.Prepare(profile, handler);
            var textProfile = (IObjectProfileWithText)profile;

            this.textLabel.Label.SetText(textProfile.text);
            this.textLabel.Tooltip = textProfile.tooltip;
        }
コード例 #5
0
ファイル: DummyObject.cs プロジェクト: kakjelsb/Gryphonheart
        public override void Prepare(IElementProfile profile, IMenuHandler handler)
        {
            base.Prepare(profile, handler);
            var dummyProfile = (DummyProfile)profile;

            this.Frame.SetWidth(dummyProfile.width ?? 10);
            this.Frame.SetHeight(dummyProfile.height ?? 10);
            this.value = null;
        }
コード例 #6
0
        public virtual void Prepare(IElementProfile profile, IMenuHandler handler)
        {
            if (this.prepared)
            {
                throw new MenuException("Element is already prepared.");
            }

            this.prepared = true;
            this.handler  = handler;
            this.Frame.Show();
        }
コード例 #7
0
        /// <summary>
        /// Prepares the object with a given profile.
        /// </summary>
        /// <param name="profile">The profile to prepare with.</param>
        /// <param name="handler">The menu handler.</param>
        public override void Prepare(IElementProfile profile, IMenuHandler handler)
        {
            base.Prepare(null, handler);
            var lineProfile = (LineProfile)profile;

            this.leftBlock   = GenerateAndPrepareBlock(lineProfile, ObjectAlign.l, handler);
            this.centerBlock = GenerateAndPrepareBlock(lineProfile, ObjectAlign.c, handler);
            this.rightBlock  = GenerateAndPrepareBlock(lineProfile, ObjectAlign.r, handler);
            this.Content     = new List <IAlignedBlock>();
            this.Content.AddRange(new[] { this.leftBlock, this.centerBlock, this.rightBlock }.Where(b => b != null));
        }
コード例 #8
0
ファイル: PanelObject.cs プロジェクト: kakjelsb/Gryphonheart
        public override void Prepare(IElementProfile profile, IMenuHandler handler)
        {
            base.Prepare(profile, handler);
            var panelProfile     = (PanelProfile)profile;
            var innerPageProfile = new PageProfile();

            panelProfile.ForEach(innerPageProfile.Add);
            this.innerPage = (IPage)handler.CreateRegion(innerPageProfile);
            this.innerPage.Prepare(innerPageProfile, handler);
            this.name = panelProfile.name;
        }
コード例 #9
0
        public override void Prepare(IElementProfile profile, IMenuHandler handler)
        {
            base.Prepare(profile, handler);
            var menuProfile = (MenuProfile)profile;

            this.HandleOnShow(menuProfile);
            this.HandleOnHide(menuProfile);

            this.Inserts    = new Inserts();
            this.menuWidth  = menuProfile.width;
            this.menuHeight = menuProfile.height;

            this.Frame["Name"] = menuProfile.name;
        }
コード例 #10
0
        public override void Prepare(IElementProfile profile, IMenuHandler handler)
        {
            base.Prepare(profile, handler);
            this.Content = new List <T>();
            this.layout  = handler.Layout;

            var containerProfile = profile as IContainerProfile <TProfile>;

            if (containerProfile == null)
            {
                return;
            }

            containerProfile.ToList().ForEach(p =>
            {
                var regionProfile = (IMenuRegionProfile)p;
                var region        = (T)handler.CreateRegion(regionProfile);
                this.Content.Add(region);
                region.Prepare(regionProfile, handler);
            });
        }
コード例 #11
0
ファイル: TabMenu.cs プロジェクト: kakjelsb/Gryphonheart
 public override void Prepare(IElementProfile profile, IMenuHandler handler)
 {
     base.Prepare(profile, handler);
     this.DisplayTab(0);
 }
コード例 #12
0
 public override void Prepare(IElementProfile profile, IMenuHandler handler)
 {
     base.Prepare(profile, handler);
     this.Inner = (IMenuObject)handler.CreateRegion((IObjectProfile)profile, true);
     this.Inner.Prepare(profile, handler);
 }
コード例 #13
0
 public override void Prepare(IElementProfile profile, IMenuHandler handler)
 {
     base.Prepare(profile, handler);
     this.ApplyProfile((CustomDropDownProfile)profile);
 }
コード例 #14
0
 public override void Prepare(IElementProfile profile, IMenuHandler handler)
 {
     base.Prepare(profile, handler);
     this.SetUpFromProfile((EditFieldProfile)profile);
     // this.SetUpTabbableObject(new TabableEditBox(this.frame.Text));
 }
コード例 #15
0
 public override void Prepare(IElementProfile profile, IMenuHandler handler)
 {
     base.Prepare(profile, handler);
     this.profile = (ButtonWithDropDownProfile)profile;
     this.button.SetScript(ButtonHandler.OnClick, this.OnClick);
 }
コード例 #16
0
ファイル: TextObject.cs プロジェクト: kakjelsb/Gryphonheart
 public override void Prepare(IElementProfile profile, IMenuHandler handler)
 {
     base.Prepare(profile, handler);
     this.SetUpFromProfile((TextProfile)profile);
 }
コード例 #17
0
ファイル: ButtonObject.cs プロジェクト: kakjelsb/Gryphonheart
 public override void Prepare(IElementProfile profile, IMenuHandler handler)
 {
     base.Prepare(profile, handler);
     this.SetupFrame((ButtonProfile)profile);
 }