Dialogue textbox issue

W

WolfeSpeider

Guest
Been wrestling with this issue for a while, have a working dialogue system with text properly appearing, however the textbox sprite I have set up will not fully contain the text; upon reaching the width the text will stay within the confines (sides) of the box, however it will still spill out of the bottom of the box.

Is there a way to keep the text inside and have the top line move up to make room for the new text?

This is my code for the dialogue object itself, the create event:
Code:
///Initialize the dialog object
text = noone;
draw_set_colour(dk_orange);
text_visible = "";
text_page = 0;
text_count = 0;
spd = .5;
display_scale = display_get_gui_width()/view_wview[0];
width = sprite_width*display_scale;
margin = 8;
The Draw_GUI_Event:
Code:
//Draw the Dialogue
text_count += spd;
text_visible = string_copy(text[text_page], 0, text_count);
var xx = (x-view_xview[0])*display_scale;
var yy = (y-view_yview[0])*display_scale;
draw_text_ext(xx+margin, yy+margin, text_visible, -1, width-(margin*2));
The dialogue itself is called from a separate object (Create Event):
Code:
dialog = noone;
dialog_page = 0;
xoffset = -32;
yoffset = -40;
text[0] = "This is a test line";
text[1] = "This is also a test line";
text[2] = "This is a third test line";
Any help is appreciated.
 
W

Whirlpoolio

Guest
Unfortunately I had this same problem so I just made the text smaller (sometimes this makes it look worse) or you can separate it into more textboxes. I don't see an easy way around this.
This is my method
 
Top