Jump to content


Photo

[GM 8.1 Suggestion] justifies text


  • Please log in to reply
6 replies to this topic

#1 S_Kleer

S_Kleer

    GMC Member

  • GMC Member
  • 5 posts
  • Version:GM8.1

Posted 05 September 2012 - 04:50 PM

Hello YoYo! :laugh:
Can you made mini patch for GM 8.1 that it have a function for text "justifies text" ?
Yes, I know that it function have in Dll (gex), but i want it in GM 8.1 Lite... :unsure:
  • 0

#2 chrscool8

chrscool8

    GMC Member

  • GMC Member
  • 1645 posts
  • Version:GM:Studio

Posted 08 September 2012 - 04:46 AM

You mean like:
draw_set_halign(...)
and
draw_set_valign(...) ?
  • 0

#3 S_Kleer

S_Kleer

    GMC Member

  • GMC Member
  • 5 posts
  • Version:GM8.1

Posted 08 September 2012 - 01:03 PM

You mean like:
draw_set_halign(...)
and
draw_set_valign(...) ?

No.
I want that text will be align to horizontal.
For example look this screenshot: http://s.gamestar.ru...ngers_70330.jpg

Edited by S_Kleer, 08 September 2012 - 01:07 PM.

  • 0

#4 nickydude

nickydude

    MadLad Designs

  • GMC Member
  • 598 posts

Posted 10 September 2012 - 10:16 AM

Is this what you''re looking for?

draw_text_ext(x,y,string,sep,w) Similar to the previous routine but you can specify two more things. First of all, sep indicates the separation distance between the lines of text in a multiline text. Use -1 to get the default distance. Use w to indicate the width of the text in pixels. Lines that are longer than this width are split- up at spaces or - signs. Use -1 to not split up lines.

Edited by nickydude, 10 September 2012 - 10:22 AM.

  • 0

#5 S_Kleer

S_Kleer

    GMC Member

  • GMC Member
  • 5 posts
  • Version:GM8.1

Posted 10 September 2012 - 03:15 PM

Is this what you''re looking for?

draw_text_ext(x,y,string,sep,w) Similar to the previous routine but you can specify two more things. First of all, sep indicates the separation distance between the lines of text in a multiline text. Use -1 to get the default distance. Use w to indicate the width of the text in pixels. Lines that are longer than this width are split- up at spaces or - signs. Use -1 to not split up lines.

But this is a bad way ((text will not perfectly smooth. I need to be on the left and the right were all exactly like the picture, and with the help of this function, the text is not aligned automatically ...
  • 0

#6 Erik Leppen

Erik Leppen

    GMC Member

  • GMC Member
  • 2038 posts
  • Version:GM:Studio

Posted 10 September 2012 - 04:15 PM

This is currently not possible in GM unless you write your own script for breaking off text of the end of a line, and then repositioning every word manually. This is probably a nightmare to code, and in native GML it will simply be too slow. So I wouldn't count on it, because this is just very rare in games. The alternatives are:

  • find an existing dll
  • accept that text is not justified
  • store the text in an image, and display the image

  • 0

#7 S_Kleer

S_Kleer

    GMC Member

  • GMC Member
  • 5 posts
  • Version:GM8.1

Posted 11 September 2012 - 05:27 PM

This is currently not possible in GM unless you write your own script for breaking off text of the end of a line, and then repositioning every word manually. This is probably a nightmare to code, and in native GML it will simply be too slow. So I wouldn't count on it, because this is just very rare in games. The alternatives are:

  • find an existing dll
  • accept that text is not justified
  • store the text in an image, and display the image

Here is why I propose to add a feature that would have replaced all of the above methods. =)
Not all have GM Pro (as yet I have problems with credit card)
P.S. I hope that will listen to me, and do this at least in GM 9.
  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users