Exemple #1
0
 public TextBox(string name, Texture2D textBoxTexture, Texture2D highlightedTexture
                , Texture2D caretTexture, Texture2D scrollbarBackground
                , Texture2D scrollbarTexture, SpriteFont font, RectangleF rec
                , Screen parent)
     : base(name, parent, typeof(TextBox), rec, 0.5f, 0.5f)
 {
     _textBoxTexture           = textBoxTexture;
     _HighlightedTexture       = highlightedTexture;
     _caretTexture             = caretTexture;
     _scrollbarBackground_Horz = Game1.scrollbarBackground;
     _scrollbarBackground_Vert = Game1.scrollbarBackground_vert;
     _scrollbarTexture_Horz    = Game1.scrollbar_horz;
     _scrollbarTexture_Vert    = Game1.scrollbar_vert;
     _font             = font;
     hscrollbar_width  = rec.Width;
     vscrollbar_height = rec.Height;
     this.Activable    = true;
     //Form event register
     OnClick       += new FormEventHandler(textbox_clicked);
     OnActive      += new FormEventHandler(Textbox_OnActive);
     OnDeactive    += new FormEventHandler(textbox_OnDeActive);
     OnMouseEnter  += new FormEventHandler(textbox_OnMouseEnter);
     OnMouseLeave  += new FormEventHandler(textbox_OnMouseLeave);
     OnMouseScroll += new FormEventHandler(textbox_OnMouseScroll);
     OnKeyDown     += new FormEventHandler(textbox_OnKeyDown);
 }
Exemple #2
0
        public Boot(LicenseManager licenseValidation, AddinManager addinManager, AddinLoader addinLoader,
                    EventDispatcher dispatcher, FormEventHandler formEventHandler, I18NService i18nService)
        {
            this.licenseManager   = licenseValidation;
            this.addinManager     = addinManager;
            this.dispatcher       = dispatcher;
            this.formEventHandler = formEventHandler;
            this.addinLoader      = addinLoader;

            i18nService.ConfigureThreadI18n(System.Threading.Thread.CurrentThread);
        }
Exemple #3
0
 public TextBox(string name, Texture2D textBoxTexture, Texture2D highlightedTexture
                , Texture2D caretTexture, SpriteFont font, RectangleF rec
                , Screen parent)
     : base(name, parent, typeof(TextBox), rec, 0.5f, 0.5f)
 {
     _textBoxTexture     = textBoxTexture;
     _HighlightedTexture = highlightedTexture;
     _caretTexture       = caretTexture;
     _font          = font;
     this.Activable = true;
     //Form event register
     OnClick       += new FormEventHandler(textbox_clicked);
     OnActive      += new FormEventHandler(Textbox_OnActive);
     OnDeactive    += new FormEventHandler(textbox_OnDeActive);
     OnMouseEnter  += new FormEventHandler(textbox_OnMouseEnter);
     OnMouseLeave  += new FormEventHandler(textbox_OnMouseLeave);
     OnMouseScroll += new FormEventHandler(textbox_OnMouseScroll);
     OnKeyDown     += new FormEventHandler(textbox_OnKeyDown);
 }