D4rkh0bb1T
Member
Hi! I'm trying to make my gump buttons having a sound when pressed.
This only seems to work with GumpButtonType.Reply (My quit button for exemple)
I'm trying to add sound when GumpButtonType.Page are pressed.
Is this something possible?
Thanks!
This only seems to work with GumpButtonType.Reply (My quit button for exemple)
I'm trying to add sound when GumpButtonType.Page are pressed.
Is this something possible?
Thanks!
C#:
public enum Buttons
{
GotoWebsite,
GotoWebsite2,
Quit,
GotoNews,
}
public override void OnResponse(NetState sender, RelayInfo info)
{
Mobile from = sender.Mobile;
switch (info.ButtonID)
{
case (int)Buttons.Quit: //this.AddButton(283, 449, 5200, 5201, (int)Buttons.Quit, GumpButtonType.Reply, 0);
{
from.SendMessage("Check back for Updates!");
from.PlaySound(0X04A); //This works
break;
}
case (int)Buttons.GotoWebsite://this.AddButton(418, 339, 2510, 2511, (int)Buttons.GotoWebsite, GumpButtonType.Reply, 0);
{
from.PlaySound(0X04A); //This Works
from.SendMessage("Check back for Updates!");
sender.LaunchBrowser("https://MYWEBSITE.COM");
break;
}
case (int)Buttons.GotoWebsite2: //this.AddButton(477, 367, 5609, 5610, (int)Buttons.GotoWebsite2, GumpButtonType.Reply, 0);
{
from.PlaySound(0X04A); //This works
from.SendMessage("Check back for Updates!");
sender.LaunchBrowser("https://MYWEBSITE.COM/");
break;
}
case (int)Buttons.GotoNews: //this.AddButton(67, 301, 2510, 2511, (int)Buttons.GotoNews, GumpButtonType.Page, 2);
{
from.PlaySound(0X04A); //This NOT work
from.SendMessage("DEBUG"); //This NOT work
break;
}
}
}