Esempio n. 1
0
        public TextBox(Rectangle Position, string BgTexName, string FontName)
        {
            this.Position = Position;
            this.BgTex = GeneralManager.Textures[BgTexName];
            this.Font = GeneralManager.Fonts[FontName];

            FocusedColor = Color.White;
            UnfocusedColor = Color.White;
        }
Esempio n. 2
0
 public Button(Rectangle Position, string Text, Texture2D Background, Color ButtonColor, Color ActiveColor, string Font)
 {
     this.Position = Position;
     this.Text = Text;
     this.Background = Background;
     this.ButtonColor = ButtonColor;
     this.ActiveColor = ActiveColor;
     if (Font != null)
     {
         this.Font = GeneralManager.Fonts[Font];
     }
 }
Esempio n. 3
0
        public static void LoadFont(string Name)
        {
            //Fonts.Add(Name, Content.Load<SpriteFont>(Name));
            var fontFilePath = Path.Combine(Content.RootDirectory, Name + ".fnt");
            var fontFile = FontLoader.Load(fontFilePath);
            var fontTexture = Content.Load<Texture2D>(Name + "_0");

            FontRenderer FR = new FontRenderer(fontFile, fontTexture);
            Fonts.Add(Name, FR);

            Logger.Write("Loaded " + Name + " Font");
        }
Esempio n. 4
0
 public SplashText(string FontName)
 {
     Font = GeneralManager.Fonts[FontName];
 }