public MenuItem(Texture2D texture2D, Rectangle itemRect, Color buttonColor, Color textColor, Color mouseOverColor, string fontName, bool isQuestLogButton) { myAssetName = texture2D.Name; myTexture = texture2D; myRect = itemRect; myMouseState = Mouse.GetState(); myButtonColor = buttonColor; myTextColor = textColor; myMouseOverColor = mouseOverColor; myPrevColor = buttonColor; myIsClickable = true; myIsCustomButton = false; myContentManager = null; myIsQuestLogButton = isQuestLogButton; FontManager fm = FontManager.getFontManager(myContentManager); myFont = fm.getFont(fontName); }
public MenuItem(ContentManager cont, string buttonText, Rectangle buttonRect, Color buttonColor, Color textColor, Color mouseOverColor, string fontName, bool isQuestLogButton) { myAssetName = buttonText; myTexture = cont.Load <Texture2D>(@"GUITiles\Button"); myRect = buttonRect; myMouseState = Mouse.GetState(); myButtonColor = buttonColor; myTextColor = textColor; myMouseOverColor = mouseOverColor; myPrevColor = buttonColor; myIsClickable = true; myIsCustomButton = true; myContentManager = cont; myIsQuestLogButton = isQuestLogButton; FontManager fm = FontManager.getFontManager(myContentManager); myFont = fm.getFont(fontName); }
public MenuItem(ContentManager cont, String textureName, Rectangle rectangle, Color buttonColor, Color textColor, Color mouseOverColor, string fontName) { myAssetName = textureName; myTexture = cont.Load <Texture2D>(textureName); myRect = rectangle; myMouseState = Mouse.GetState(); myButtonColor = buttonColor; myTextColor = textColor; myMouseOverColor = mouseOverColor; myPrevColor = buttonColor; myIsClickable = true; myIsCustomButton = false; myIsQuestLogButton = false; myContentManager = cont; FontManager fm = FontManager.getFontManager(myContentManager); myFont = fm.getFont(fontName); }
public void Draw(SpriteBatch spriteBatch) { if (!myPlayerGUI.IsHidden) { myPlayerGUI.Draw(spriteBatch); spriteBatch.Begin(); //Reputation Display spriteBatch.DrawString(myFontManager.getFont("money"), myRep.ToString(), new Vector2(100, 34), Color.Red); //Money Display spriteBatch.DrawString(myFontManager.getFont("money"), myMoney.ToString(), new Vector2(100, 120), Color.Yellow); spriteBatch.End(); } if (!myShopMenu.IsHidden) { myShopMenu.draw(spriteBatch); } foreach (FloatingText floatText in myFloatingTextList) { if (floatText != null && floatText.IsAlive) { floatText.Draw(spriteBatch); } } foreach (InformationText infoText in myInformationTextList) { if (infoText != null && infoText.IsAlive) { infoText.Draw(spriteBatch); } } if (!myInventoryMenu.IsHidden) { myInventoryMenu.Draw(spriteBatch); } if (!myQuestLogMenu.IsHidden) { myQuestLogMenu.Draw(spriteBatch); } if (myConvoMenu != null) { myConvoMenu.Draw(spriteBatch); } if (myCurrentMenu.Name != myPlayerGUI.Name) { myCurrentMenu.Draw(spriteBatch); } }