Ulysses
General => Developers Corner => Topic started by: Michaelmikey3 on December 30, 2014, 11:37:51 PM
-
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?
(http://i.imgur.com/BBH5deT.jpg)
If you need anything just ask!
-
Where do you want it positioning?
-
Got er fixed. Just did it lazy way and added extra spaces to the strings xD coding is fun!
-
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
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
-
If you're using the "TTTScoreboardColumns" hook (documented here: http://ttt.badking.net/guides/hooks (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).