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); }
public override void Draw(SpriteBatch sb) { base.Draw(sb); buttonPanel.Draw(sb, Color.White); if (!ButtonText.Equals("")) { TextUtility.Draw(sb, ButtonText, font, buttonPanel.Position(), TextUtility.OutLining.Center, Color.Gold, 1f, false, default(Matrix), Color.Silver, false); } }
public override KeyValuePair <RenderTarget2D, Rectangle> DrawReturnRender(SpriteBatch sb) { sb.End(); sb.GraphicsDevice.SetRenderTarget(scrollRender); sb.GraphicsDevice.Clear(Color.TransparentBlack); sb.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.PointClamp, null, null, null, scrollMatrix); float opacity = 0.6f; for (int i = 0; i < items.Length; i++) { if (i != selectIndex) { itemPanels[i].Draw(sb, Color.LightYellow * opacity); } else { itemPanels[i].Draw(sb, Color.LightYellow); } } for (int i = 0; i < items.Length; i++) { if (i != selectIndex) { TextUtility.Draw(sb, items[i], font, itemPositions[i], TextUtility.OutLining.Center, Color.Silver * opacity, 1f, false, scrollMatrix, Color.Gray * opacity, false); } else { TextUtility.Draw(sb, items[i], font, itemPositions[i], TextUtility.OutLining.Center, Color.Silver, 1f, false, scrollMatrix, Color.Gray, false); } } sb.End(); sb.GraphicsDevice.SetRenderTarget(completeRender); sb.GraphicsDevice.Clear(Color.TransparentBlack); sb.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.PointClamp, null, null, null, null); bg.Draw(sb, Color.Gray); sb.Draw(scrollRender, renderDrawPos, Color.White); if (bNeedsScrollbarActive) { wheel.Draw(sb); } else { wheel.DrawNotActive(sb); } sb.End(); return(new KeyValuePair <RenderTarget2D, Rectangle>(completeRender, completeRenderPos)); }
public void Draw(SpriteBatch sb, Matrix m) { sb.End(); sb.Begin(SpriteSortMode.Deferred, null, SamplerState.PointClamp, null, null, null, m); textBGPanel.Draw(sb, Color.White); if (bIsSelected) { Rectangle selected = new Rectangle(); int os = 4; if (selectIndex == 0) { selected = new Rectangle(prompt1Panel.Position().X - os, prompt1Panel.Position().Y - os, prompt1Panel.Position().Width + os * 2, prompt1Panel.Position().Height + os * 2); } else if (selectIndex == 1) { selected = new Rectangle(prompt2Panel.Position().X - os, prompt2Panel.Position().Y - os, prompt2Panel.Position().Width + os * 2, prompt2Panel.Position().Height + os * 2); } else if (selectIndex == 2) { selected = new Rectangle(prompt3Panel.Position().X - os, prompt3Panel.Position().Y - os, prompt3Panel.Position().Width + os * 2, prompt3Panel.Position().Height + os * 2); } sb.Draw(Game1.WhiteTex, selected, Color.Orange * .75f); } prompt1Panel.Draw(sb, Color.White); prompt2Panel.Draw(sb, Color.White); prompt3Panel.Draw(sb, Color.White); TextUtility.Draw(sb, keyAction.actionIndentifierString, font, textBGPanel.Position(), TextUtility.OutLining.Center, Color.Gold, 1f, false, m, Color.Silver, false); if (keyAction.whatKeysIsActionAssignedTo[0].assignedActionKey != default(Microsoft.Xna.Framework.Input.Keys)) { String keyName = keyAction.whatKeysIsActionAssignedTo[0].assignedActionKey.ToString(); TextUtility.Draw(sb, keyName, font, prompt1Panel.Position(), TextUtility.OutLining.Center, Color.Gold, 1f, false, m, Color.Silver, false); } if (keyAction.whatKeysIsActionAssignedTo[1].assignedActionKey != default(Microsoft.Xna.Framework.Input.Keys)) { String keyName = keyAction.whatKeysIsActionAssignedTo[1].assignedActionKey.ToString(); TextUtility.Draw(sb, keyName, font, prompt2Panel.Position(), TextUtility.OutLining.Center, Color.Gold, 1f, false, m, Color.Silver, false); } if (keyAction.whatKeysIsActionAssignedTo[2].assignedGamePadButton != default(Microsoft.Xna.Framework.Input.Buttons)) { String keyName = keyAction.whatKeysIsActionAssignedTo[2].assignedGamePadButton.ToString(); TextUtility.Draw(sb, keyName, font, prompt3Panel.Position(), TextUtility.OutLining.Center, Color.Gold, 1f, false, m, Color.Silver, false); } }
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(); }
internal void Draw(SpriteBatch sb) { GenerateRender(sb); sb.End(); sb.GraphicsDevice.SetRenderTarget(render); sb.GraphicsDevice.Clear(Color.TransparentBlack); sb.Begin(SpriteSortMode.Deferred, null, SamplerState.PointClamp); leftTexPanel.Draw(sb, Color.White); sb.Draw(talentGrid.getRender(), leftPanelRenderLoc, leftPanelRenderLoc, Color.White); sb.End(); }
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(); }
internal void DrawNode(SpriteBatch sb, Color c = default(Color)) { if (pos == default(Rectangle)) { if (bInitialize) { Initialize(); } pos = new Rectangle(new Point(nodePos.X * nodeSize + nodePos.X * nodeSpace, nodePos.Y * nodeSize + nodePos.Y * nodeSpace), new Point(nodeSize)); tp = source.positionCopy(pos); } Color dc = Color.White; if (c != default(Color)) { dc = c; } tp.Draw(sb, dc); }
internal void GenerateRender(SpriteBatch sb) { sb.End(); sb.GraphicsDevice.SetRenderTarget(render); sb.GraphicsDevice.Clear(Color.TransparentBlack); sb.Begin(SpriteSortMode.Deferred, null, SamplerState.PointClamp); sb.Draw(Game1.WhiteTex, panel.Position(), Color.White); panel.Draw(sb, Color.White); for (int i = 0; i < portraitFrames.Length; i++) { portraitFrames[i].Draw(sb); } if (bIsFirst && !psd.databaseLoc.Equals("")) { // sb.Draw(Game1.WhiteTex,titleTextBox,Color.Yellow); TextUtility.Draw(sb, latestText.getText(), font, titleTextBox, TextUtility.OutLining.Center, Color.White, 1f, true, default(Matrix), Color.Silver, false); } TextUtility.Draw(sb, dateTimeString, font, dateTimeBox, TextUtility.OutLining.Center, Color.White, 1f, true, default(Matrix), Color.Silver, false); sb.End(); }