[gui] Buddy list

[gui] Buddy list

Postby bonifarz » 30 Sep 2013, 11:52

buddylist.jpeg

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 291 times
servers.cfg.diff
diff -u of above file to revision 5857 of servers.cfg
(3.2 KiB) Downloaded 309 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 :lol:
  • 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.
Last edited by bonifarz on 01 Oct 2013, 16:25, edited 3 times in total.
User avatar
bonifarz
 
Posts: 379
Joined: 09 Apr 2012, 12:16
Location: switzerland

Re: [gui] Buddy list

Postby Ulukai » 30 Sep 2013, 13:49

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.
User avatar
Ulukai
 
Posts: 741
Joined: 19 Mar 2011, 10:55
Location: Mechelen, Belgium

Re: [gui] Buddy list

Postby bonifarz » 30 Sep 2013, 14:48

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.
User avatar
bonifarz
 
Posts: 379
Joined: 09 Apr 2012, 12:16
Location: switzerland

Re: [gui] Buddy list

Postby Ulukai » 30 Sep 2013, 15:06

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 :p
User avatar
Ulukai
 
Posts: 741
Joined: 19 Mar 2011, 10:55
Location: Mechelen, Belgium

Re: [gui] Buddy list

Postby bonifarz » 30 Sep 2013, 15:32

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.
User avatar
bonifarz
 
Posts: 379
Joined: 09 Apr 2012, 12:16
Location: switzerland

Re: [gui] Buddy list

Postby TheLastProject » 30 Sep 2013, 15:45

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.
Hats, Afros, wings and raptor feet. This game is showing progress indeed.
TheLastProject
 
Posts: 432
Joined: 06 Nov 2011, 17:04

Re: [gui] Buddy list

Postby Evropi » 30 Sep 2013, 16:40

Oh my god, this is a killer feature. Pleaseee put it in the game :D
You just wasted 3 seconds of your life reading this.
User avatar
Evropi
 
Posts: 385
Joined: 02 Sep 2012, 16:18

Re: [gui] Buddy list

Postby restcoser » 30 Sep 2013, 16:42

Nice that you marked me as a buddy ;)
restcoser
 
Posts: 65
Joined: 03 Jul 2012, 11:25

Re: [gui] Buddy list

Postby bonifarz » 01 Oct 2013, 16:33

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.
User avatar
bonifarz
 
Posts: 379
Joined: 09 Apr 2012, 12:16
Location: switzerland

Who is online

Users browsing this forum: No registered users and 1 guest