Exemplo n.º 1
0
        internal void Draw(SpriteBatch sb)
        {
            sb.End();
            sb.GraphicsDevice.SetRenderTarget(render);
            sb.GraphicsDevice.Clear(Color.TransparentBlack);
            sb.Begin(SpriteSortMode.Deferred, null, SamplerState.PointClamp);

            float opacityMod = 0.8f;

            if (bCursorFocusRight)
            {
                bgPanelLeft.Draw(sb, Color.White);
                if (bBuildUp)
                {
                    bgPanelRight.Draw(sb, Color.White * ((selectionTimer.percentageDone() + opacityMod) * opacityMod));
                }
                else
                {
                    bgPanelRight.Draw(sb, Color.White * ((1.0f + opacityMod - selectionTimer.percentageDone()) * opacityMod));
                }
            }
            else
            {
                bgPanelRight.Draw(sb, Color.White);
                if (bBuildUp)
                {
                    bgPanelLeft.Draw(sb, Color.White * ((selectionTimer.percentageDone() + opacityMod) * opacityMod));
                }
                else
                {
                    bgPanelLeft.Draw(sb, Color.White * ((1.0f + opacityMod - selectionTimer.percentageDone()) * opacityMod));
                }
            }


            TextUtility.Draw(sb, rightPanelTitle.getText() + " (" + bc.CCC.abiEquipList.abilities.Count + @"/" + bc.CCC.abiEquipList.amount + ")", TitleFont, rightPanelTitlePosition, TextUtility.OutLining.Left, Color.White, 1f, true, default(Matrix), Color.Silver, false);
            // sb.Draw(Game1.WhiteTex, rightPanelAbilityLineup, Color.Red);

            sb.Draw(AbilitySelectTab.GetRenderRight(), new Rectangle(0, 0, 1366, 768), Color.White);


            TextUtility.Draw(sb, leftPanelTitle.getText(), TitleFont, leftPanelTitlePosition, TextUtility.OutLining.Left, Color.White, 1f, true, default(Matrix), Color.Silver, false);

            sb.Draw(AbilitySelectTab.GetRenderLeft(), new Rectangle(0, 0, 1366, 768), Color.White);

            if (selectedAbility != null && selectedAbility.asd != null)
            {
                selectedAbility.asd.Draw(sb);
            }

            sb.End();
            sb.GraphicsDevice.SetRenderTarget(null);
        }
Exemplo n.º 2
0
        public void Draw(SpriteBatch sb, Color c, float opacityText = 1f)
        {
            base.Draw(sb, c);
            if (text != null)
            {
                if (!bSelected && !bWasSelected)
                {
                    TextUtility.Draw(sb, text.getText() + TextAddition, sf, Position(), ol, tc * opacityText, 1f, bUpScaling, default(Matrix), lc * opacityText, false);
                }

                if (bSelected && !bWasSelected)
                {
                    float otherOpacity = (float)(stepsTaken / (float)steps);
                    if (otherOpacity != 0)
                    {
                        TextUtility.Draw(sb, text.getText() + TextAddition, sf, Position(), ol, sc * opacityText * (otherOpacity), 1f, bUpScaling, default(Matrix), lc * opacityText * (otherOpacity), false);
                    }
                    if (otherOpacity != 1.0f)
                    {
                        TextUtility.Draw(sb, text.getText() + TextAddition, sf, Position(), ol, tc * opacityText * (1.0f - otherOpacity), 1f, bUpScaling, default(Matrix), lc * opacityText * (1.0f - otherOpacity), false);
                    }
                }

                if (!bSelected && bWasSelected)
                {
                    float otherOpacity = (float)(stepsTaken / (float)steps);
                    if (otherOpacity != 0f)
                    {
                        TextUtility.Draw(sb, text.getText() + TextAddition, sf, Position(), ol, tc * opacityText * (otherOpacity), 1f, bUpScaling, default(Matrix), lc * opacityText * (otherOpacity), false);
                    }
                    if (otherOpacity != 1.0f)
                    {
                        TextUtility.Draw(sb, text.getText() + TextAddition, sf, Position(), ol, sc * opacityText * (1.0f - otherOpacity), 1f, bUpScaling, default(Matrix), lc * opacityText * (1.0f - otherOpacity), false);
                    }
                }
            }
        }
Exemplo n.º 3
0
        internal void GenerateRender(SpriteBatch sb)
        {
            sb.End();
            sb.GraphicsDevice.SetRenderTarget(render);
            sb.GraphicsDevice.Clear(Color.TransparentBlack);
            sb.Begin(SpriteSortMode.Deferred, null, SamplerState.PointClamp);

            panel.Draw(sb, Color.White);
            TextUtility.Draw(sb, expectedDMGText.getText() + potencyText, font, titleBox, TextUtility.OutLining.Left, Color.White, 1f, true, default(Matrix), Color.Silver, false);
            if (!parent.abilityDescription.Equals("", StringComparison.OrdinalIgnoreCase))
            {
                TextUtility.DrawComplex(sb, parent.abilityDescription, font, descriptionBox, TextUtility.OutLining.Center, Color.LightGray, 1f, true, default(Matrix), Color.Silver);
            }


            sb.End();
        }
Exemplo n.º 4
0
 public void Draw(SpriteBatch sb)
 {
     TextUtility.Draw(sb, gt.getText(), sf, position, TextUtility.OutLining.Center, tc, 1f, true, default(Matrix), Color.LightBlue, false);
 }