Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ceddral
fahrradwurstmond
Commits
843a5198
Commit
843a5198
authored
Sep 24, 2021
by
ceddral
Browse files
gamelobby: update on unregister, clear on redraw
clear to erase names of no longer present players
parent
4905eab6
Changes
1
Hide whitespace changes
Inline
Side-by-side
gamelobby.go
View file @
843a5198
...
...
@@ -77,6 +77,7 @@ func (gl *GameLobby) unregisterUnlocked(name string) {
copy
(
gl
.
playerOrder
[
i
:
],
gl
.
playerOrder
[
i
+
1
:
])
gl
.
playerOrder
=
gl
.
playerOrder
[
:
len
(
gl
.
playerOrder
)
-
1
]
}
gl
.
Update
()
}
func
(
gl
*
GameLobby
)
Resize
(
w
,
h
int
,
glp
*
Player
)
{
...
...
@@ -136,6 +137,7 @@ func (p *GameLobbyPlayer) Redraw(gl *GameLobby) {
gl
.
Lock
()
defer
gl
.
Unlock
()
v
:=
p
.
lobbyv
v
.
Clear
()
line
:=
0
fg
:=
tg
.
ColorDefault
bg
:=
tg
.
ColorDefault
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment