예제 #1
0
        private static void Postfix(ref TextBox ___nameBox, ref TextBox ___farmnameBox, ref TextBox ___favThingBox)
        {
            //replace TextBox
            TextBox_ textbox_1 = new TextBox_(Game1.content.Load <Texture2D>("LooseSprites\\textBox"), null, Game1.smallFont, Game1.textColor);
            TextBox_ textbox_2 = new TextBox_(Game1.content.Load <Texture2D>("LooseSprites\\textBox"), null, Game1.smallFont, Game1.textColor);
            TextBox_ textbox_3 = new TextBox_(Game1.content.Load <Texture2D>("LooseSprites\\textBox"), null, Game1.smallFont, Game1.textColor);

            //nameBox
            textbox_1.X      = ___nameBox.X;
            textbox_1.Y      = ___nameBox.Y;
            textbox_1.Width  = ___nameBox.Width;
            textbox_1.Height = ___nameBox.Height;
            textbox_1.SetText(___nameBox.Text);
            ___nameBox = textbox_1;
            //farm name
            textbox_2.X      = ___farmnameBox.X;
            textbox_2.Y      = ___farmnameBox.Y;
            textbox_2.Width  = ___farmnameBox.Width;
            textbox_2.Height = ___farmnameBox.Height;
            textbox_2.SetText(___farmnameBox.Text);
            ___farmnameBox = textbox_2;
            //fav
            textbox_3.X      = ___favThingBox.X;
            textbox_3.Y      = ___favThingBox.Y;
            textbox_3.Width  = ___favThingBox.Width;
            textbox_3.Height = ___favThingBox.Height;
            textbox_3.SetText(___favThingBox.Text);
            ___favThingBox = textbox_3;
        }
예제 #2
0
        private static void Postfix(AnimalQueryMenu __instance, ref TextBox ___textBox)
        {
            //replace TextBox
            TextBox_ textBox_ = new TextBox_(null, null, Game1.dialogueFont, Game1.textColor);

            textBox_.X      = ___textBox.X;
            textBox_.Y      = ___textBox.Y;
            textBox_.Width  = ___textBox.Width;
            textBox_.Height = ___textBox.Height;
            textBox_.SetText(___textBox.Text);
            ___textBox = textBox_;
        }
예제 #3
0
        private static void Postfix(NamingMenu __instance, ref TextBox ___textBox)
        {
            //replace TextBox
            TextBox_ textBox_ = new TextBox_(null, null, Game1.dialogueFont, Game1.textColor);

            textBox_.OnEnterPressed += new TextBoxEvent(__instance.textBoxEnter);
            textBox_.X      = ___textBox.X;
            textBox_.Y      = ___textBox.Y;
            textBox_.Width  = ___textBox.Width;
            textBox_.Height = ___textBox.Height;
            textBox_.SetText(___textBox.Text);
            ___textBox = textBox_;
        }
예제 #4
0
        private static void Postfix(NumberSelectionMenu __instance, ref TextBox ___numberSelectedBox)
        {
            //replace TextBox
            TextBox_ textBox_ = new TextBox_(Game1.content.Load <Texture2D>("LooseSprites\\textBox"), null, Game1.smallFont, Game1.textColor);

            textBox_.X           = ___numberSelectedBox.X;
            textBox_.Y           = ___numberSelectedBox.Y;
            textBox_.Width       = ___numberSelectedBox.Width;
            textBox_.Height      = ___numberSelectedBox.Height;
            textBox_.numbersOnly = true;
            textBox_.textLimit   = ___numberSelectedBox.textLimit;
            textBox_.SetText(___numberSelectedBox.Text);
            ___numberSelectedBox = textBox_;
        }