Jump to content

strangereu

Members
  • Posts

    3
  • Joined

  • Last visited

Details

  • Gang
    -|TG|-

strangereu's Achievements

I ordered some spaghetti with marinara sauce and I got egg noodles and ketchup. I'm an average nobody.

I ordered some spaghetti with marinara sauce and I got egg noodles and ketchup. I'm an average nobody. (2/54)

0

Reputation

  1. I edited it a little... x = x + dxGetTextWidth(v)/2 + ((rWidth-10) / table.getn(columns) - 1) It is now looking like this Still not the way I want it... It should be aligned from the end exactly the same distance as ID from the beginning... Anyway, it :Os up when I add more words...
  2. Hello, it's been a long time since I attempted to script something. Now I am at it once again... And I have a question that is hard for me to answer, but might be easy for you to solve. I'm working on a scoreboard and I failed at priting data from an array. The array contains the following texts "Name", "Points", "Cash", "Country", "FPS", "Ping" and I'm using a for loop to print them next to each other, so I'm only working with the x axis. You might be asking... What do you want to do? Well, I would like to align them in one line (next to each other), but I would like them to be aligned according to total container width. So the first text would start 10pixels from the beginning of the container and the last text would end 10px before the end of the container... The container width is calculated as a half of player's screen. dxDrawRectangle(0, headerHeight, rWidth, titleRowHeight, tocolor(0, 0, 0, 200)) for i, v in ipairs(columns) do dxDrawText(v, x, math.floor(headerHeight+titleRowHeight/2-dxGetFontHeight((rWidth/titleRowHeight)*0.035/2)), 0, 0, tocolor(255, 255, 255, 255), (rWidth/titleRowHeight)*0.035, openSans) x = rWidth - dxGetTextWidth(v) / table.getn(columns) - 1 end I actually thought of calculating it this way: x = width of the container (rWidth) - total length of texts (dxGetTextWidth(v)) / amount of texts in the array - 1 as there's no need for a space after the last text. I guess I'm doing something wrong as it's not aligning the way I want it to align. It's supposed to work the same as aligning to block in Microsoft Word... Spaces between texts are calculated by the total container width and by the total length of words... So no matter how many words you have in the array, it's always looking the same, the only difference is at the sizes of spaces between texts. Could you please help me to figure this issue out?
  3. Jméno: TG://strangereu (-|TG|-strangereu) Česko Server: TG
×
×
  • Create New...