FlyingSpoon Posted July 30, 2017 Share Posted July 30, 2017 (edited) function show() visible = true for k, v in ipairs(table) do dxDrawRectangle((k-1)*187, 10, 184, 73, tocolor(0, 0, 0, 148), false) dxDrawRectangle((k-1)*187, 6, 184, 18, tocolor(0, 0, 0, 255), false) dxDrawText("#"..tostring(k).." - Value", (k-1)*370, 6, 189, 24, tocolor(255, 255, 255, 255), 0.80, "default-bold", "center", "center", false, false, false, false, false) dxDrawText("Congratulations, on unlocking -\n("..k..") "..v[1]..".", (k-1)*189, 28, 179, 78, tocolor(255, 255, 255, 255), 0.80, "default-bold", "left", "top", false, false, false, false, false) end end So I am making a script, and when the rectangles reach 7, text goes a bit weird and it goes out of the screen, how do I make it after it reaches end of screen, it starts the next row, any ideas how I can fix this? Thanks. Edited July 30, 2017 by raysmta Link to comment
Mr.Loki Posted July 30, 2017 Share Posted July 30, 2017 From the wiki Quote wordBreak: if set to true, the text will wrap to a new line whenever it reaches the right side of the bounding box. If false, the text will always be completely on one line. and can u show a picture of your problem? Link to comment
FlyingSpoon Posted July 30, 2017 Author Share Posted July 30, 2017 (edited) I have rectangles, which are called from a table, in my code above. Right now I have more than 7 rectangles, but only 7 fit in my screen size, so what I want to do is, make a new line (row) for the ongoing set of rectangles, until it fills the screen up. I don't want it to go out of the screen size, but instead start a new line/row. Edited July 30, 2017 by raysmta Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now