in 2560x1440 the text reaches the ideal position before wrapping to the next line. As the resolution goes down the wrapping largely moves to the left.
800x600 the text wraps around 1/4 of the width. This is at the extreme, but it's even noticeable at 1920x1080.
Everything else conforms to the resolution of the screen. This is the code with the "draw_text_ext_transformation" being at the bottom and the "boxpos" being the width of how far the text will travel. boxpos uses display_get_width().
I thought that resizing of the xscale and yscale of the letters were messing it up, but no matter how large or distorted I make it, it always wraps at the right position. It's only off when I start to lower the resolution. I'm only worried about the position in which the text wraps and I haven't been able to use "draw_text_ext" to my liking. Does anyone have a good solution to make the text-wrap conform to different resolutions in the same way the rest of my assets do?
800x600 the text wraps around 1/4 of the width. This is at the extreme, but it's even noticeable at 1920x1080.
Everything else conforms to the resolution of the screen. This is the code with the "draw_text_ext_transformation" being at the bottom and the "boxpos" being the width of how far the text will travel. boxpos uses display_get_width().
GML:
var size = myheight/2 * (1/20)
var sizew = mywidth/2 * (1/40)
var scaley = size / string_height("A")
var scalex = sizew / string_height("A")
var boxpos = (mywidth/2)
var might = (myheight/2)
//Draw message box x, y(-/+ 160), w, h(-/+ 160), sprite, subim
draw_nineslice(0, myheight/3, mywidth/2, myheight/6, medude, 0);
//Draw Portrait subim h(+/- Sprite H)
draw_sprite(portrait, portrait_index, boxpos/16, might/14*4);
//-----TEXT
draw_set_font(font);
//Draw Name
var c = name_text_col;
draw_text_transformed_color(boxpos/16, might/16 * 11, name, scalex, scaley, 0, c,c,c,c, 1);
//Draw Text MUST FIX THIS
draw_text_ext_transformed(boxpos/16, might/16 * 12, text[page], text_height, boxpos/16*14, scalex, scaley, 0);
Attachments
-
15.9 KB Views: 4
-
128.3 KB Views: 4