Skip to content

Commit

Permalink
client/hud: Added keybind for HOME
Browse files Browse the repository at this point in the history
Also added the F1 keybind to the text of the button
  • Loading branch information
xescugc committed Jan 31, 2024
1 parent 359e212 commit 6e3aea3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion client/hud.go
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,9 @@ func (hs *HUDStore) Update() error {
return nil
}
}
if inpututil.IsKeyJustPressed(ebiten.KeyF1) {
actionDispatcher.GoHome()
}
if hst.TowerOpenMenuID != "" {
if hs.input.IsKeyJustPressed(ebiten.KeyEscape) {
actionDispatcher.CloseTowerMenu()
Expand Down Expand Up @@ -525,7 +528,7 @@ func (hs *HUDStore) buildUI() {
homeBtnW := widget.NewButton(
widget.ButtonOpts.Image(buttonImage),

widget.ButtonOpts.Text("HOME", smallFont, &widget.ButtonTextColor{
widget.ButtonOpts.Text("HOME(F1)", smallFont, &widget.ButtonTextColor{
Idle: color.NRGBA{0xdf, 0xf4, 0xff, 0xff},
}),

Expand Down
2 changes: 1 addition & 1 deletion server/rooms.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ func (rs *RoomsStore) Reduce(state, a interface{}) interface{} {
Players: make(map[string]PlayerConn),
Connections: make(map[string]string),

Size: 2,
Size: 6,
Countdown: 10,
}
rstate.CurrentWaitingRoom = rid.String()
Expand Down

0 comments on commit 6e3aea3

Please sign in to comment.