public Inputbox(GraphicsDevice device, int xPositionInPercent, int yPositionInPercent, int widthInPercent, int heightInPercent, Texture2D texture, string text, SpriteFont font, Color textColor) { mGraphicsDevice = device; mRelativePosition.X = xPositionInPercent; mRelativePosition.Y = yPositionInPercent; mRelativePosition.Width = widthInPercent; mRelativePosition.Height = heightInPercent; mTextList = new List <string>(); mTextSizeList = new List <Vector2>(); mFont = font; mTextColor = textColor; Text = text; mTexture = texture; mIsVisible = true; mCursorPos = text.Length; mDebugTexture2D = Menu.CreateTexture2D(mGraphicsDevice, 200, 100, pixel => Color.Aqua); FontType = FontManager.FontType.Default; mWindowWidth = mGraphicsDevice.Viewport.Width; mWindowHeight = mGraphicsDevice.Viewport.Height; }
public CheckedButton(GraphicsDevice device, int xPositionInPercent, int yPositionInPercent, int widthInPercent, int heightInPercent, Texture2D texture, Texture2D textureChecked, string text, SpriteFont font, Color textColor, bool isChecked) { mGraphicsDevice = device; mRelativePosition.X = xPositionInPercent; mRelativePosition.Y = yPositionInPercent; mRelativePosition.Width = widthInPercent; mRelativePosition.Height = heightInPercent; mTexture = texture; mTextureChecked = textureChecked; mFont = font; mTextColor = textColor; mText = text; mIsVisible = true; mEvents = new List <Event>(); mChecked = isChecked; FontType = FontManager.FontType.Default; mWindowWidth = mGraphicsDevice.Viewport.Width; mWindowHeight = mGraphicsDevice.Viewport.Height; }
public Button(GraphicsDevice device, int xPositionInPercent, int yPositionInPercent, int widthInPercent, int heightInPercent, Texture2D texture, string text, SpriteFont font, Color textColor) { mGraphicsDevice = device; mRelativePosition.X = xPositionInPercent; mRelativePosition.Y = yPositionInPercent; mRelativePosition.Width = widthInPercent; mRelativePosition.Height = heightInPercent; mTextList = new List <string>(); mTextSizeList = new List <Vector2>(); mTexture = texture; mFont = font; mTextColor = textColor; Text = text; mAutoBreak = false; mIsVisible = true; mEvents = new List <Event>(); FontType = FontManager.FontType.Default; mWindowWidth = mGraphicsDevice.Viewport.Width; mWindowHeight = mGraphicsDevice.Viewport.Height; }
protected SpriteFont GetFont(FontManager.FontType font) { return((SpriteFont)Utils.GetGameType("SoG.FontManager").GetMethod("GetFont")?.Invoke(null, new object[] { (int)font })); }