Esempio n. 1
0
        internal void DrawRender(SpriteBatch sb)
        {
            var temp = GameMenuHandler.selectedCharacterContext.abilityLineupInfo.getSelectedAbility();

            if (selectionTimer != null)
            {
                if (bBuildup)
                {
                    sb.Draw(Game1.WhiteTex, drawPositionOnscreen, Color.DarkGray * selectionTimer.percentageDone() * .4f);
                }
                else if (!bBuildup)
                {
                    sb.Draw(Game1.WhiteTex, drawPositionOnscreen, Color.DarkGray * (1.0f - selectionTimer.percentageDone()) * .4f);
                }
            }

            if (temp != null)
            {
                if (temp == this)
                {
                    sb.Draw(getRender(), drawPositionOnscreen, Color.White);
                }
                else
                {
                    sb.Draw(getRender(), drawPositionOnscreen, Color.White * .5f);
                }
            }
            else
            {
                sb.Draw(getRender(), drawPositionOnscreen, Color.White);
            }
        }
 static internal bool timerEnd()
 {
     if (texTimer.percentageDone() >= 1.0f)
     {
         return(true);
     }
     return(false);
 }
Esempio n. 3
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);
        }
Esempio n. 4
0
 internal bool StopSelectionTimerWhen()
 {
     if (unselectTimer.percentageDone() == 1.0f)
     {
         return(true);
     }
     return(false);
 }
 internal bool standardTimer()
 {
     if (timer.percentageDone() >= 1.0f)
     {
         return(true);
     }
     return(false);
 }
Esempio n. 6
0
        public void Draw(SpriteBatch sb, RenderTarget2D target = null)
        {
            if (OptionsMenu.bIsRunning)
            {
                sb.End();
                sb.GraphicsDevice.SetRenderTarget(r2d);
                sb.GraphicsDevice.Clear(Color.TransparentBlack);
                sb.Begin(SpriteSortMode.Deferred, null, SamplerState.PointClamp);
                bg.Draw(sb, new Rectangle(0, 0, 1366, 768));
                sb.End();
                OptionsMenu.Draw(sb, r2d);
                return;
            }
            #region Generate Renders
            switch (currentScreen)
            {
            case Screens.start:
                break;

            case Screens.load:
                if (lgs != null)
                {
                    lgs.GenerateRenders(sb);
                }
                break;

            default:
                break;
            }
            #endregion
            sb.End();
            sb.GraphicsDevice.SetRenderTarget(r2d);
            sb.GraphicsDevice.Clear(Color.TransparentBlack);
            sb.Begin(SpriteSortMode.Deferred, null, SamplerState.PointClamp);

            switch (currentScreen)
            {
            case Screens.start:
                #region
                switch (currentStartScreen)
                {
                case StartScreens.main:
                    DrawMain(sb);
                    break;

                case StartScreens.load:
                    break;

                case StartScreens.loading:
                    DrawLoadScreen(sb, target);
                    break;

                default:
                    break;
                }
                #endregion
                break;

            case Screens.load:
                #region
                if (lgs != null)
                {
                    bg.Draw(sb, new Rectangle(0, 0, 1366, 768));

                    if (loadGameDataTimer != null)
                    {
                        sb.Draw(lgs.getRender(), new Rectangle(0, 0, 1366, 768), Color.White * (loadGameDataTimer.percentageDone()));
                    }
                    else
                    {
                        sb.Draw(lgs.getRender(), new Rectangle(0, 0, 1366, 768), Color.White);
                    }
                }
                #endregion
                break;

            default:
                break;
            }


            sb.End();
            sb.GraphicsDevice.SetRenderTarget(target);
        }
Esempio n. 7
0
 internal void Draw(SpriteBatch sb)
 {
     sb.Draw(render, drawOnScreen, Color.White * startUpTimer.percentageDone());
 }