示例#1
0
void dskLobby::Msg_ButtonClick(const unsigned int ctrl_id)
{
    switch(ctrl_id)
    {
        case 3: // Zurück
        {
            LOBBYCLIENT.Stop();
            WINDOWMANAGER.Switch(new dskMultiPlayer);
        } break;
        case 4: // Verbinden - Button
            ConnectToSelectedGame();
            break;
        case 5: // Ranking - Button
        {
            LOBBYCLIENT.SendRankingListRequest();
            WINDOWMANAGER.Show(new iwLobbyRanking, true);
        } break;
        case 6: // GameServer hinzufügen
        {
            if(SETTINGS.proxy.typ != 0)
                WINDOWMANAGER.Show(new iwMsgbox(_("Sorry!"), _("You can't create a game while a proxy server is active\nDisable the use of a proxy server first!"), this, MSB_OK, MSB_EXCLAMATIONGREEN, 1));
            else
            {
                servercreate = new iwDirectIPCreate(NP_LOBBY);
                servercreate->SetParent(this);
                WINDOWMANAGER.Show(servercreate, true);
            }
        } break;
    }
}
示例#2
0
void dskLAN::Msg_ButtonClick(const unsigned ctrl_id)
{
    switch(ctrl_id)
    {
        case ID_btBack: WINDOWMANAGER.Switch(std::make_unique<dskMultiPlayer>()); break;
        case ID_btConnect: ConnectToSelectedGame(); break;
        case ID_btAddServer:
            if(SETTINGS.proxy.type != PROXY_NONE)
                WINDOWMANAGER.Show(std::make_unique<iwMsgbox>(
                  _("Sorry!"), _("You can't create a game while a proxy server is active\nDisable the use of a proxy server first!"), this,
                  MSB_OK, MSB_EXCLAMATIONGREEN, 1));
            else
            {
                WINDOWMANAGER.Show(std::make_unique<iwDirectIPCreate>(ServerType::LAN), true);
            }
    }
}
示例#3
0
void dskLAN::Msg_ButtonClick(const unsigned int ctrl_id)
{
    switch(ctrl_id)
    {
    case btBackId:
        WINDOWMANAGER.Switch(new dskMultiPlayer);
        break;
    case btConnectId:
        ConnectToSelectedGame();
        break;
    case btAddServerId:
        if(SETTINGS.proxy.typ != 0)
            WINDOWMANAGER.Show(new iwMsgbox(_("Sorry!"), _("You can't create a game while a proxy server is active\nDisable the use of a proxy server first!"), this, MSB_OK, MSB_EXCLAMATIONGREEN, 1));
        else
        {
            iwDirectIPCreate* servercreate = new iwDirectIPCreate(ServerType::LAN);
            servercreate->SetParent(this);
            WINDOWMANAGER.Show(servercreate, true);
        }
    }
}
示例#4
0
void dskLobby::Msg_TableChooseItem(const unsigned ctrl_id, const unsigned short selection)
{
    if(ctrl_id == 10 && selection != 0xFFFF) // Server list
        ConnectToSelectedGame();
}
示例#5
0
void dskLAN::Msg_TableChooseItem(const unsigned ctrl_id, const unsigned selection)
{
    if(ctrl_id == tblServerId && selection != 0xFFFF) // Server list
        ConnectToSelectedGame();
}