Made the connect button work in the Internet/LAN menus
This commit is contained in:
parent
8ffd4bb134
commit
ff7e6b6c41
5 changed files with 18 additions and 3 deletions
|
@ -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);
|
||||
|
||||
|
|
|
@ -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.
BIN
freecs/menu.dat
BIN
freecs/menu.dat
Binary file not shown.
BIN
freecs/progs.dat
BIN
freecs/progs.dat
Binary file not shown.
Loading…
Reference in a new issue