View Issue Details

IDProjectCategoryView StatusLast Update
0005517Multi Theft Auto : San AndreasClientpublic2011-06-20 17:50
ReporterNeonBlackAssigned Toccw 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version 
Target Version1.1Fixed in Version1.1 
Summary0005517: dxDrawText does not always display newlines (\n) (and wordwrap does not work)
Description

I found out that newlines are ignored if the vertical alignment is set to bottom. They're not ignored if the horizontal alignment is set to nil.
I didn't test all combinations but there're probably many combinations where newlines don't work.
Also word wrap does not work for me.

TagsNo tags attached.

Activities

NeonBlack

2010-07-28 21:28

viewer   ~~0011847

Wordwrap works if both horizontal and vertical alignment are set to center.

MX_Master

2011-01-25 20:46

viewer   ~~0012749

give to us a text, please

something like that "Hello\r\n\r\n\r\nPlease, read these rules...\r\n\r\n\r\nTROLOLO" will be shown as:


Hello
Please, read these rules...
TROLOLO

but if you have "Hello\r\n \r\n \r\nPlease, read these rules...\r\n \r\n \r\nTROLOLO", string will be shown as


Hello

Please, read these rules...

TROLOLO

Mike_Traceur

2011-01-28 17:03

viewer   ~~0012806

farbcodes are also impossible

MX_Master

2011-06-14 14:15

viewer   ~~0013668

Last edited: 2011-06-14 15:20

while testing createFont i saw this bug in action. And now i have right steps to reproduce this bug with word wrapping:

--- http://pastebin.com/X5BwFQCh ---

addEventHandler( 'onClientRender', root,
function()
-- to show text bounding box
dxDrawRectangle( 400, 200, 200, 200, tocolor(0,0,0,128), false )

    -- to reproduce bug with not working wordWrap when alignY = 'bottom'
    dxDrawText( 
        "11111111 2222222 3333333333 444444 5555555 666666 77777777 88888 999999",
        400, 200,
        600, 400,
        tocolor(255,255,255,255),
        1,
        'default',
        'center',
        'bottom', -- alignY * for 'top'/'center' word wrapping works fine
        true,
        true, -- wordWrap
        false
    )
end

)


screenshot - http://img820.imageshack.us/img820/1508/20110614181945.png

a test some combinations and only with alignY = 'bottom' I got this bug

confirmed on 1.1-2797

Picard

2011-06-20 17:47

updater   ~~0013735

Issue automatically marked as fixed by mantisbot ( Fixed in http://code.google.com/p/mtasa-blue/source/detail?r=2820 )

Issue History

Date Modified Username Field Change