Made the connect button work in the Internet/LAN menus

This commit is contained in:
Marco Cawthorne 2018-12-28 00:03:00 +01:00
parent 8ffd4bb134
commit ff7e6b6c41
5 changed files with 18 additions and 3 deletions

View file

@ -22,6 +22,14 @@ CServerList inet_lbServers;
CScrollbar inet_sbServers;
/* Button Callbacks */
void inet_btnjoin(void)
{
string addr = inet_lbServers.GetSelectedItem();
if (addr) {
localcmd(sprintf("connect %s\n", addr));
}
}
void inet_btncreate_start(void)
{
static void inet_btncreate_end(void) {
@ -80,7 +88,7 @@ void menu_internetgames_init(void)
inet_btnJoin = spawn(CMainButton);
inet_btnJoin.SetImage(BTN_JOINGAME);
//inet_btnJoin.SetExecute(btn_console);
inet_btnJoin.SetExecute(inet_btnjoin);
inet_btnJoin.SetPos(30,140);
Widget_Add(fn_inet, inet_btnJoin);

View file

@ -18,7 +18,14 @@ CServerList lan_lbServers;
CScrollbar lan_sbServers;
/* Button Callbacks */
void lan_btnjoin(void)
{
string addr = lan_lbServers.GetSelectedItem();
if (addr) {
localcmd(sprintf("connect %s\n", addr));
}
}
void lan_btncreate_start(void)
{
static void lan_btncreate_end(void) {
@ -75,7 +82,7 @@ void menu_langames_init(void)
lan_btnJoin = spawn(CMainButton);
lan_btnJoin.SetImage(BTN_JOINGAME);
//lan_btnJoin.SetExecute(btn_console);
lan_btnJoin.SetExecute(lan_btnjoin);
lan_btnJoin.SetPos(30,140);
Widget_Add(fn_lan, lan_btnJoin);

Binary file not shown.

Binary file not shown.

Binary file not shown.