public override void OnResponse(GameClient sender, RelayInfo info) { Mobile from = sender.Mobile; if (info.ButtonID == 0) { return; } else if (info.ButtonID == 200) // Previous page { m_Page--; from.SendGump(new MusicGump(m_Box, m_Songs, m_Page)); } else if (info.ButtonID == 300) // Next Page { m_Page++; from.SendGump(new MusicGump(m_Box, m_Songs, m_Page)); } else if (m_HasStopSongEntry && info.ButtonID == m_Songs.Count) { m_Box.TogglePlaying(false); } else { TrackInfo ti = TrackInfo.GetInfo(m_Songs[info.ButtonID - 1]); m_Box.ActualSong = ti.Name; m_Box.TogglePlaying(true); } }
protected override void OnTick() { if (DateTime.Now > m_Until) { if (m_Box != null && !m_Box.Deleted) { m_Box.TogglePlaying(false); } else { Stop(); } } else if (m_Box != null && !m_Box.Deleted) { m_Box.Animate(); } }