Пример #1
0
 private void Select(LoadFileTab loadFileTab, LoadFileTab previous)
 {
     selectedTab = loadFileTab;
     if (selectedTab != null)
     {
         LoadFileTab.SetScroll(selectedTab.screenPosition.Y - bgPosition.Height / 3);
     }
     if (previous != null)
     {
         previous.unSelectTimer();
     }
 }
Пример #2
0
        internal LoadGameScreen(String loadLoc, StartScreen sc = null)
        {
            func    = null;
            this.sc = sc;
            if (!bInitialize)
            {
                Initialize();
            }

            loadLocation = loadLoc;
            LoadFileTab.SetScroll(0f);
            GenerateTabs();
        }
Пример #3
0
        internal LoadGameScreen(String loadLoc, ExecuteFunction f)
        {
            func    = f;
            this.sc = null;
            if (!bInitialize)
            {
                Initialize();
            }

            loadLocation = loadLoc;
            LoadFileTab.SetScroll(0f);
            saveDatas.Add(new PlayerSaveData());
            saveDatas.Last().timeIndex = long.MaxValue - 1;
            GenerateTabs();
        }
Пример #4
0
        internal void GenerateRenders(SpriteBatch sb)
        {
            for (int i = 0; i < lfTabs.Count; i++)
            {
                lfTabs[i].GenerateRender(sb);
            }

            sb.End();
            sb.GraphicsDevice.SetRenderTarget(render);
            sb.GraphicsDevice.Clear(Color.TransparentBlack);
            sb.Begin(SpriteSortMode.Deferred, null, SamplerState.PointClamp, null, null, null, LoadFileTab.GetMatrix());

            for (int i = 0; i < lfTabs.Count; i++)
            {
                if (selectedTab == null)
                {
                    sb.Draw(lfTabs[i].getRender(), lfTabs[i].screenPosition, Color.White);
                }
                else
                {
                    if (selectedTab == lfTabs[i])
                    {
                        sb.Draw(lfTabs[i].getRender(), lfTabs[i].screenPosition, Color.White);
                    }
                    else
                    {
                        if (lfTabs[i].getTimer() == null)
                        {
                            sb.Draw(lfTabs[i].getRender(), lfTabs[i].screenPosition, Color.White * .5f);
                        }
                        else
                        {
                            sb.Draw(lfTabs[i].getRender(), lfTabs[i].screenPosition, Color.White * (((1.0f - lfTabs[i].getTimer().percentageDone()) * .5f) + 0.5f));
                        }
                    }
                }
            }


            sb.End();
            sb.GraphicsDevice.SetRenderTarget(CompleteRender);
            sb.GraphicsDevice.Clear(Color.TransparentBlack);
            sb.Begin(SpriteSortMode.Deferred, null, SamplerState.PointClamp);

            bigBG.Draw(sb, Color.White);
            //sb.Draw(Game1.WhiteTex, new Rectangle((int)renderDrawPos.X, (int)renderDrawPos.Y, render.Width, render.Height), Color.Yellow);
            sb.Draw(render, renderDrawPos, Color.White);

            sb.End();
        }