Exemple #1
0
        public UISkillTab(string name, SkillTree skillTypes)
        {
            this.name       = name;
            this.skillTypes = skillTypes;

            this.SetPadding(10);

            this.skillInfos = new List <UISkillInfo>();
            this.bars       = new List <UIElement>();
            this.tooltip    = new UISkillTooltip(VapeRPG.GetSkill("Excitement"));
        }
Exemple #2
0
        private void UISkillInfo_OnMouseOver(UIMouseEvent evt, UIElement listeningElement)
        {
            UISkillInfo usi = listeningElement as UISkillInfo;

            this.tooltip = new UISkillTooltip(usi.skill);
            this.tooltip.Left.Set(usi.Left.Pixels + usi.Width.Pixels + 10, 0);
            this.tooltip.Top.Set(usi.Top.Pixels + usi.Height.Pixels + 10, 0);

            this.Append(this.tooltip);

            CalculatedStyle dimensions = this.tooltip.GetDimensions();
            Point           point1     = new Point((int)dimensions.X, (int)dimensions.Y);
            int             width      = (int)Math.Ceiling(dimensions.Width);
            int             height     = (int)Math.Ceiling(dimensions.Height);

            if (point1.Y + height > Main.screenHeight)
            {
                this.tooltip.Top.Set(usi.Top.Pixels - height - 10, 0);
            }
        }