word wrap cutting off words

marshmonkey

21-09-2009 20:22:02

hi, we are using a word wrap to display chat in our game. It works pretty well except for that sometimes words will get cut off on the right edge instead of wrapping to the next line. Here is a picture of what I am talking about:



here is the code for the layout:


<?xml version="1.0" encoding="UTF-8"?>
<MyGUI type="Layout">
<Widget type="Edit" skin="Edit" position="8 688 512 24" align="Left Bottom" layer="Back" name="chatinput">
<Property key="Widget_NeedKey" value="true"/>
<Property key="Text_FontName" value="ManualFont"/>
<Property key="Text_FontHeight" value="17"/>
<Property key="Widget_NeedMouse" value="false"/>
<Property key="Widget_Alpha" value="1.0"/>
</Widget>
<Widget type="Edit" skin="WordWrap" position="8 499 520 185" align="Left Bottom" layer="Back" name="chatview">
<Property key="Edit_WordWrap" value="true"/>
<Property key="Edit_VisibleVScroll" value="false"/>
<Property key="Widget_Enabled" value="false"/>
<Property key="Edit_VisibleHScroll" value="false"/>
<Property key="Edit_MaxTextLength" value="-1"/>
</Widget>
</MyGUI>



any ideas on how to fix? we are using MyGUI version 2.2.2

Altren

22-09-2009 17:23:19

There was problem with wordwrap in 2.2.2. It was fixed long time ago in svn - text was refactored. We are going to release MyGUI 2.2.3 as soon as possible with fixed text and several small fixes that was added to 2.2.2 in last months.

Altren

05-10-2009 00:25:27

Update to MyGUI 2.2.3 - it was fixed.

Murphy

05-10-2009 05:08:41

This update broke our font. We are using a manual font. The font height is being reported as 0. Did anything change in 2.2.3 related to fonts?

my.name

05-10-2009 09:42:33

look at example manual font in 2.2.3

marshmonkey

05-10-2009 19:44:21

cool, we adjusted our font settings and the word wrap appears to be working fine now. Thanks!

my.name

06-10-2009 12:30:34

=)

mprestia

25-06-2010 16:12:04

I am having the same problem in MyGUI 3.0.1. I an using a True Type font. Here is my layout:


<?xml version="1.0" encoding="UTF-8"?>
<MyGUI type="Layout">
<Widget type="StaticImage" skin="StaticImage" position_real="0 0 0.625 0.0416667" layer="Back" name="leaf.background">
<Widget type="Button" skin="ButtonSquare" position_real="0.00625 0.1875 0.0265625 0.625" name="leaf.button"/>
<Widget type="Edit" skin="WordWrap" position_real="0.0578125 0 0.928125 1" name="leaf.text">
<Property key="Text_TextAlign" value="Left VCenter"/>
<Property key="Edit_MultiLine" value="true"/>
<Property key="Edit_Static" value="true"/>
<Property key="Edit_WordWrap" value="true"/>
<Property key="Edit_OverflowToTheLeft" value="true"/>
</Widget>
</Widget>
</MyGUI>