simple playerlist widget

simple playerlist widget

Discuss Lua based Spring scripts (LuaUI widgets, mission scripts, gaia scripts, mod-rules scripts, scripted keybindings, etc...)

Moderator: Moderators

User avatar
BrainDamage
Lobby Developer
Posts: 1164
Joined: 25 Sep 2006, 13:56

simple playerlist widget

Post by BrainDamage »

since none of the existing playerlist widgets satisfied me ( bloated, lack of realtime update, not displaying ceasefires, etc ) I made a simple player list replacement which resembles a lot the default one

what it can do:
  • you can change sorting by clicking on the column headers
  • you can send a pm to a player by left clicking his name
  • mid clicking a player's status will toggle ceasefire if you're a player
  • you can spectate a player by clicking to a player's ID if you're a spectator
  • it shows both incoming, outgoing and bidirectional ceasefire status
  • mid click on a playername as player to share selected units
  • left click on a cpu prompts for sharing metal ( enter amount in the chat )
  • left click on a ping prompts for sharing energy ( enter amount in the chat )
  • mid click on a cpu to equalize metal between you and him
  • mid click on a ping to equalize energy between you and him
  • hovering a playername will show his resources
  • you can move it in tweak mode ( ctrl+f11 ) and it'll guess by itself the expand direction
  • you can change options in tweak mode
  • you can hide spectators permanently
  • you can show spectators only on mouseover
  • you can show the playerlist only on mouseover ( it'll collapse to the header )
  • you can make the playerlist to reappear automatically when a player is lagging
  • you can hide the spectating marker
  • you can optionally show the skill column
ingame alliance/ceasefire/truce legend:
< is mono-directional ceasefire alliance, you're allied with the player
> is mono-directional ceasefire alliance, the player is allied with you
= is bi-directional ceasefire alliance, you are allied with each other

pics:
Image
Image
Image

Download Here
Attachments
gui_simpleplayerlist.lua
(35.71 KiB) Downloaded 37 times
playerlist.png
playerlist.png (211.27 KiB) Viewed 5333 times
options.png
options.png (45.11 KiB) Viewed 5333 times
Last edited by BrainDamage on 01 Sep 2013, 17:23, edited 27 times in total.
User avatar
Tribulex
A.N.T.S. Developer
Posts: 1894
Joined: 26 Sep 2009, 21:26

Re: simple playerlist widget

Post by Tribulex »

Good work!
User avatar
BrainDamage
Lobby Developer
Posts: 1164
Joined: 25 Sep 2006, 13:56

Re: simple playerlist widget

Post by BrainDamage »

small update:

some bugfixes
added mid click on a playername as player to share selected units
added status column header
changed "E" symbol for ceasefire to "T" ( truce )
User avatar
BrainDamage
Lobby Developer
Posts: 1164
Joined: 25 Sep 2006, 13:56

Re: simple playerlist widget

Post by BrainDamage »

updated again, fixed font to use baseline alignment, now you can use 0 spacing and no font overlapping giving same vertical efficiency as default ( excluding column header overhead ), although I will keep 1 pixel line by default as spacing for aesthetic reasons
User avatar
Tribulex
A.N.T.S. Developer
Posts: 1894
Joined: 26 Sep 2009, 21:26

Re: simple playerlist widget

Post by Tribulex »

Since no one else is responding let me remind you to eat yourself a piece of pie.
User avatar
BrainDamage
Lobby Developer
Posts: 1164
Joined: 25 Sep 2006, 13:56

Re: simple playerlist widget

Post by BrainDamage »

last update for a while I think, some internal reactoring for less WTF code if someone wants to reuse it
User avatar
DavetheBrave
Posts: 281
Joined: 22 Jun 2005, 02:52

Re: simple playerlist widget

Post by DavetheBrave »

this is the worst widget of my life
User avatar
ginekolog
Posts: 837
Joined: 27 Feb 2006, 13:49

Re: simple playerlist widget

Post by ginekolog »

i would love you much more if u add ranks to advanced player list widget.
User avatar
manolo_
Posts: 1370
Joined: 01 Jul 2008, 00:08

Re: simple playerlist widget

Post by manolo_ »

+1
User avatar
Neddie
Community Lead
Posts: 9406
Joined: 10 Apr 2006, 05:05

Re: simple playerlist widget

Post by Neddie »

If you expand this with icons, BD, I think I have all the icons you might need.
User avatar
momfreeek
Posts: 625
Joined: 29 Apr 2008, 16:50

Re: simple playerlist widget

Post by momfreeek »

looks good.

Get rid of the (%) and (ms) for a big improvent on horizontal efficiency IMO. If you can't work it out yourself then you probably don't need to know.
User avatar
TheFatController
Balanced Annihilation Developer
Posts: 1177
Joined: 10 Dec 2006, 18:46

Re: simple playerlist widget

Post by TheFatController »

momfreeek wrote:Get rid of the (%) and (ms) for a big improvent on horizontal efficiency IMO. If you can't work it out yourself then you probably don't need to know.
Good idea imo
User avatar
hoijui
Former Engine Dev
Posts: 4344
Joined: 22 Sep 2007, 09:51

Re: simple playerlist widget

Post by hoijui »

maybe have the ms nad % on a second line. As one more row should not make a big difference in the usual games of 6vs6 + 6 specs or so. or in case this is possible, add it as a tooltip.
not that i would care for it, it is fine as it is for me :-)
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: simple playerlist widget

Post by knorke »

how about an option not to show specs
User avatar
BrainDamage
Lobby Developer
Posts: 1164
Joined: 25 Sep 2006, 13:56

Re: simple playerlist widget

Post by BrainDamage »

momfreeek wrote:Get rid of the (%) and (ms) for a big improvent on horizontal efficiency IMO. If you can't work it out yourself then you probably don't need to know.
knorke wrote:how about an option not to show specs
done & done ( change local HIDESPECTATORS = false, to true )
cleanrock
Former Engine Dev
Posts: 115
Joined: 21 Feb 2009, 07:42

Re: simple playerlist widget

Post by cleanrock »

It would be good if you can fix it so that the playerlist is moved to bottom right when window is resized, this is important for us who play spring in windowed mode on linux.
User avatar
momfreeek
Posts: 625
Joined: 29 Apr 2008, 16:50

Re: simple playerlist widget

Post by momfreeek »

downloaded it today and it works great. simple, compact and has the right features. exactly what I want :)

further suggestions:
- color ally state red/green/white instead of player color might make it easier to discern at a glance (or it might make it look messy I guess)

- tooltips describing state (ceasefire state seems kind of complex) and click functions would be handy (assuming this causes negligable overhead)
cleanrock
Former Engine Dev
Posts: 115
Joined: 21 Feb 2009, 07:42

Re: simple playerlist widget

Post by cleanrock »

cleanrock wrote:It would be good if you can fix it so that the playerlist is moved to bottom right when window is resized, this is important for us who play spring in windowed mode on linux.
this works for me :

Code: Select all

function widget:ViewResize(viewSizeX, viewSizeY)
    bottomrightx = viewSizeX
end
User avatar
Mav
Posts: 258
Joined: 12 Nov 2009, 20:06

Re: simple playerlist widget

Post by Mav »

Tried this today and I highly recommend.
User avatar
BrainDamage
Lobby Developer
Posts: 1164
Joined: 25 Sep 2006, 13:56

Re: simple playerlist widget

Post by BrainDamage »

lev-99 thread necro!
updated the midget ( yes, midget ):
added options menu and tweak mode to move, auto align
several bugfixes
no more "magic" numbers in the code
added many options
lots of speedups thanks to display lists and smart updates
handles pathfinding progress of players
Post Reply

Return to “Lua Scripts”