Author Topic: Scoreboard Rank column too close to karma column  (Read 1812 times)

0 Members and 1 Guest are viewing this topic.

Offline Michaelmikey3

  • Newbie
  • *
  • Posts: 2
  • Karma: 0
Scoreboard Rank column too close to karma column
« 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?

If you need anything just ask!
« Last Edit: December 30, 2014, 11:41:51 PM by Michaelmikey3 »

Offline [TBR] Lt Usher

  • Newbie
  • *
  • Posts: 12
  • Karma: 0
    • http://www.itwasntme.co.uk
Re: Scoreboard Rank column too close to karma column
« Reply #1 on: December 31, 2014, 11:13:40 PM »
Where do you want it positioning?

Offline Michaelmikey3

  • Newbie
  • *
  • Posts: 2
  • Karma: 0
Re: Scoreboard Rank column too close to karma column
« Reply #2 on: January 03, 2015, 11:20:41 AM »
Got er fixed. Just did it lazy way and added extra spaces to the strings xD coding is fun!

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: Scoreboard Rank column too close to karma column
« Reply #3 on: January 03, 2015, 07:39:19 PM »
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: [Select]
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
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline Decicus

  • Hero Member
  • *****
  • Posts: 552
  • Karma: 81
    • Alex Thomassen
Re: Scoreboard Rank column too close to karma column
« Reply #4 on: January 04, 2015, 10:46:34 AM »
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).
Contact information:
E-mail: alex@thomassen.xyz.
You can also send a PM.