Jump to content

Rows and Tables


Recommended Posts

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 by raysmta
Link to comment

fQag0sq.png

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 by raysmta
Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...