General > Developers Corner

Scoreboard Rank column too close to karma column

(1/1)

Michaelmikey3:
Hello, so I have this problem where my ranks such as senior admin collide into my Karma section of the scoreboard. How do I got about moving this section too the left a bit?

If you need anything just ask!

[TBR] Lt Usher:
Where do you want it positioning?

Michaelmikey3:
Got er fixed. Just did it lazy way and added extra spaces to the strings xD coding is fun!

JamminR:
That's fine until the actual group name gets longer than the spaces allow for.
If you can't figure out best way of using screen co-ordinates (or however it currently spaces them), then at least practice/teach your self string.len, .find and .gsub
Could probably use something like
PSUEDO CODE...this is mostly for the idea logic

--- Code: ---if string.len(to.string<group variable>) < <number of widest space you'd want> then --is column shorter than widest allowable?
 string.gsub or for loop to add spaces to end up to <number of widest space column you'd want> -- do something to fill in the space/widen it dynamically
else -- groupname is wider than you want
 cut it short in some way (gsub with ... at end 3/4 through group name?) -- use code to "shorten" the group name in the display (... is often used)
end -- check done

--- End code ---

Decicus:
If you're using the "TTTScoreboardColumns" hook (documented here: http://ttt.badking.net/guides/hooks), then the panel object takes a third parameter, namely a width number. I don't know why that's not documented on the page, but the default is 80 (or 60, pretty sure it's 80).

Navigation

[0] Message Index

Go to full version