// Update implements gruid.Model.Update and updates the menu state in response to
// user input messages. It considers mouse message coordinates to be absolute in
// its grid.
Update implements gruid.Model.Update and updates the menu state in response to
user input messages. It considers mouse message coordinates to be absolute in
its grid.
// Update implements gruid . Model . Update and updates the menu state in response to // user input messages . It considers mouse message coordinates to be absolute in // its grid .
func (m *Menu) Update(msg gruid.Msg) gruid.Effect {
	m.action = MenuPass
	switch msg := msg.(type) {
	case gruid.MsgKeyDown:
		m.updateKeyDown(msg)
	case gruid.MsgMouse:
		m.updateMouse(msg)
	}
	if m.Action() != MenuPass {
		m.dirty = true
	}
	return nil
}
func ( m * Menu ) Update ( msg gruid . Msg ) gruid . Effect { m . action = MenuPass switch msg := msg . ( type ) { case gruid . MsgKeyDown : m . updateKeyDown ( msg ) case gruid . MsgMouse : m . updateMouse ( msg ) } if m . Action ( ) != MenuPass { m . dirty = true } return nil }
Update implements gruid.Model.Update and updates the menu state in response to
user input messages.
Update implements gruid . Model . Update and updates the menu state in response to user input messages .