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 » 04 Oct 2009, 23:19

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 31 times
playerlist.png
playerlist.png (211.27 KiB) Viewed 2470 times
options.png
options.png (45.11 KiB) Viewed 2470 times
Last edited by BrainDamage on 01 Sep 2013, 17:23, edited 27 times in total.
0 x

User avatar
Tribulex
A.N.T.S. Developer
Posts: 1894
Joined: 26 Sep 2009, 21:26

Re: simple playerlist widget

Post by Tribulex » 05 Oct 2009, 01:38

Good work!
0 x

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

Re: simple playerlist widget

Post by BrainDamage » 05 Oct 2009, 02:15

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 )
0 x

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

Re: simple playerlist widget

Post by BrainDamage » 05 Oct 2009, 11:51

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
0 x

User avatar
Tribulex
A.N.T.S. Developer
Posts: 1894
Joined: 26 Sep 2009, 21:26

Re: simple playerlist widget

Post by Tribulex » 05 Oct 2009, 17:47

Since no one else is responding let me remind you to eat yourself a piece of pie.
0 x

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

Re: simple playerlist widget

Post by BrainDamage » 05 Oct 2009, 19:17

last update for a while I think, some internal reactoring for less WTF code if someone wants to reuse it
0 x

User avatar
DavetheBrave
Posts: 281
Joined: 22 Jun 2005, 02:52

Re: simple playerlist widget

Post by DavetheBrave » 06 Oct 2009, 02:03

this is the worst widget of my life
0 x

User avatar
ginekolog
Posts: 837
Joined: 27 Feb 2006, 13:49

Re: simple playerlist widget

Post by ginekolog » 06 Oct 2009, 09:02

i would love you much more if u add ranks to advanced player list widget.
0 x

User avatar
manolo_
Posts: 1370
Joined: 01 Jul 2008, 00:08

Re: simple playerlist widget

Post by manolo_ » 06 Oct 2009, 10:23

+1
0 x

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

Re: simple playerlist widget

Post by Neddie » 06 Oct 2009, 16:14

If you expand this with icons, BD, I think I have all the icons you might need.
0 x

User avatar
momfreeek
Posts: 625
Joined: 29 Apr 2008, 16:50

Re: simple playerlist widget

Post by momfreeek » 06 Oct 2009, 17:12

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.
0 x

User avatar
TheFatController
Balanced Annihilation Developer
Posts: 1177
Joined: 10 Dec 2006, 18:46

Re: simple playerlist widget

Post by TheFatController » 06 Oct 2009, 22:18

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
0 x

User avatar
hoijui
Former Engine Dev
Posts: 4342
Joined: 22 Sep 2007, 09:51

Re: simple playerlist widget

Post by hoijui » 07 Oct 2009, 09:04

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 :-)
0 x

User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: simple playerlist widget

Post by knorke » 07 Oct 2009, 23:38

how about an option not to show specs
0 x

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

Re: simple playerlist widget

Post by BrainDamage » 08 Oct 2009, 21:41

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 )
0 x

cleanrock
Former Engine Dev
Posts: 115
Joined: 21 Feb 2009, 07:42

Re: simple playerlist widget

Post by cleanrock » 09 Oct 2009, 18:09

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.
0 x

User avatar
momfreeek
Posts: 625
Joined: 29 Apr 2008, 16:50

Re: simple playerlist widget

Post by momfreeek » 09 Oct 2009, 19:08

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)
0 x

cleanrock
Former Engine Dev
Posts: 115
Joined: 21 Feb 2009, 07:42

Re: simple playerlist widget

Post by cleanrock » 10 Oct 2009, 17:12

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
0 x

User avatar
Mav
Posts: 258
Joined: 12 Nov 2009, 20:06

Re: simple playerlist widget

Post by Mav » 04 Feb 2010, 21:32

Tried this today and I highly recommend.
0 x

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

Re: simple playerlist widget

Post by BrainDamage » 16 Feb 2013, 00:46

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
0 x

Post Reply

Return to “Lua Scripts”