Wie kann ich meine Eigenen textboxen machen ?
*Tzzzzzzsschhhhhhhhhhhhhhhhhhhhhhh*
Dieser Beitrag wurde bereits 4 mal editiert, zuletzt von domis4 ()
NAME: Textbox Engine V2D
CREATOR: J-Factor
DESCRIPTION: Shows how to create dialogue textboxes.
Features:
• Letter-by-Letter typing
• Automatic line wrapping which DOESN'T split words in half
• Portraits/Avatars
• Continue sprite (small prompting sprite in bottom-right corner)
• Show multiple textboxes if there is too much text!
NEW TO 2.0:
• Color tags! RED, BLUE, every color!
• Opening animation (textbox grows to true size)
• Animated portraits!
• Animated continue sprites!
• Backgrounds!
• Sound
NEW TO 2.0D:
• textbox_question returns which key was pressed: The "YES" key
or the "NO" key.
WEBSITE: j-factor.uni.cc
CREDITS: No credit is needed. At all.
_____________________________________________________________
HOW TO USE: 1. Copy the script textbox into your game.
2. Change the user variables within the script.
2.1. Open the script (textbox)
2.2. Modify the variables under the comment:
// USER VARIABLES /////////////////////////
2.3. While you are modifying, make sure you read the
comments beside each variable! It explains what the
variable does.
3. Call textbox when you want to show a textbox.
Example:
EVENT: Collision with obj_messagebox
CODE: textbox(spr_portrait,0,'Welcome to the game');
x = xprevious;
y = yprevious;
(If you use this in a collision event, be sure to move the instance
OUT OF COLLISION)
4. Done! It's that simple!
HOW TO CALL THE SCRIPT:
The format for calling the script is as follows:
textbox(sprite,subimage,text);
The arguments explain themselves.
LINE-BREAKS: Just like in other functions that visually represent strings, a # symbol
will force a line-break.
Example:
textbox(sprite,subimage,'Line 1#Line 2');
Would produce:
Line 1
Line 2
In order to include the # symbol itself, place a backslash (\) before
it.
Example:
textbox(sprite,0,'The TextBox Example is \#1!');
Would produce:
The TextBox Example is #1!
PAUSES: The vertical bar character '|' is used to add pauses to the textbox.
Use multiple to have long pauses. Also to actually get the character
use a backslash before hand ('\').
COLOR TAGS: The new color tag system allows you to change the color of the text
mid-way through a textbox. This allows you to emphasize key words
or names.
If you are familiar with forums, they also use tags. Using IPB forum
software to change the color you use a color tag:
blue
However, as the color tag is the only tag in this example, you do not
need to write "COLOR=" before the color.
To set a color you can use any valid GML color notation.
Examples:
[c_white]
[make_color_rgb(255,255,255)]
[$FFFFFF] <-- Only in GM 6.1
Each of the examples produces the color white, so you can use whatever
method suits you.
Finally, rather than closing tags (e.g. [/COLOR]) you simply change
the color to what is was previously.
Example:
textbox(sprite,0,'[c_blue]blue[c_black] black');
Would produce:
blue black
OTHER: textbox_question is a modified version of the normal textbox script
which has two keys rather than one. There is a YES key and a NO key.
The script returns true if the YES key was pressed.
RESOURCES:
spr_continue and bck_textbox were created by me. These are
public domain, so you can do whatever you like with them.
spr_font is a sprite font I made from the font - pix AW2 Font.
spr_portrait was created by teej from the GMC. Thanks!
Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von Dufner ()
Larsi schrieb:
hey husi was fällt dir ein meine textbox als deine auszugeben..... das ist echt frech
1 Besucher