[gui] Buddy list

Posted:
30 Sep 2013, 11:52
by bonifarz
Here is another little experiment I would like to share here: A
buddy list integrated into the
server menu (F2).
I recommend to set a persistent list with your buddies first ...
- {l Code}: {l Select All Code}
buddies = [name1 name2 nameFragment TagOfBuddyClan]
setpersist "buddies" 1
... before adding
buddylist.cfg to your
autoexec.cfg:
buddylist.cfg
- executing this will override the server menu (F2)
- (13.99 KiB) Downloaded 481 times
servers.cfg.diff
- diff -u of above file to revision 5857 of servers.cfg
- (3.2 KiB) Downloaded 505 times
Now what does this do?
- No player names are hidden in the F2 menu ("and N more").This can be a mess with many long names on a single server

- Player info can be several lines long, so showing all names is actually not a problem
- A yellow team icon is shown near player names matching an entry of your buddy list.
- At the bottom of the F2 menu you can see your buddy list and add or remove buddies.
Re: [gui] Buddy list

Posted:
30 Sep 2013, 13:49
by Ulukai
Wow this sounds cool! It would be nice if something like this could be integrated in v1.5.
Or at the very least an option to turn off the hiding of the player names.
Re: [gui] Buddy list

Posted:
30 Sep 2013, 14:48
by bonifarz
Thanks, Ulukai.
Ulukai {l Wrote}:Or at the very least an option to turn off the hiding of the player names.
That is actually easier than i expected. In /data/config/menus/servers.cfg search for the following line:
- {l Code}: {l Select All Code}
if (> (textwidth $pname) 1500) [ pmore = (+ $pmore 1) ] [
and increase the maximum width of the line containing player names. In my buddylist, I disabled the if statement completely, which may be a bad idea. I think the best solution would be to start a second or even more lines when the list gets too long. Should not be too hard, but I don't see an elegant way to do that right now.
Re: [gui] Buddy list

Posted:
30 Sep 2013, 15:06
by Ulukai
I don't like to start messing with config files myself too much, but using something like your extension with autoexec is still pretty safe and an easy thing to turn on or off.
I understand that it's not a good idea to enable all the names on all the servers all the time, but having an option to turn this on or off in the server browser menu or an expand button per server would at least be very helpful. I have had to alt-tab out of RE to go searching on redflare for a specific friend of mine several times already because I couldn't find on which server he was on

Re: [gui] Buddy list

Posted:
30 Sep 2013, 15:32
by bonifarz
Update: Meanwhile, I found a simple solution for splitting the line of player names. I think there is no big reason to hide any player names, actually, unless it breaks the layout. So I do hope this mod is useful. Another minor modification I made: When you remove a buddy, it will be copied to the "add" field, so you can easily undo one removal. And yes, I used to switch to redflare to look for players, too, because i thought it would be difficult to change the servers.cfg. Another side note: There is another file servers.cfg in your home dir, thus the different name buddylist.cfg.
Re: [gui] Buddy list

Posted:
30 Sep 2013, 15:45
by TheLastProject
bonifarz {l Wrote}:I think there is no big reason to hide any player names, actually, unless it breaks the layout.
That's exactly what the hiding is for: to prevent it from breaking the layout. It helps to keep the server browser look "clean" to only have one line for users, and it solves issues with servers possibly having a lot of users taking way too much space in your server browser.
Re: [gui] Buddy list

Posted:
30 Sep 2013, 16:40
by Evropi
Oh my god, this is a killer feature. Pleaseee put it in the game

Re: [gui] Buddy list

Posted:
30 Sep 2013, 16:42
by restcoser
Nice that you marked me as a buddy

Re: [gui] Buddy list

Posted:
01 Oct 2013, 16:33
by bonifarz
Minor chages:
- setpersist when editing buddies in game *facepalm*
- changed texture from team to info, the visibility is much better.
- increased the line width by about the textwidth of "and N more"

TLP: Of course you are right, it looks cleaner with one line per server, but for personal use, i prefer to see all players at once.
Evropi: Thanks for the thumbs up. I would be happy if my hack serves as an inspiration for an official implementation.