Example #1
0
 // Token: 0x06002ED7 RID: 11991 RVA: 0x0013209E File Offset: 0x0013049E
 private static void onPersonaStateChange(PersonaStateChange_t callback)
 {
     if (Lobbies.currentLobby == CSteamID.Nil)
     {
         return;
     }
     Lobbies.triggerLobbiesRefreshed();
 }
Example #2
0
 private static void onClickedInviteButton(SleekButton button)
 {
     if (!Lobbies.canOpenInvitations)
     {
         MenuUI.alert(MenuPlayLobbiesUI.localization.format("Overlay"));
         return;
     }
     Lobbies.openInvitations();
 }
Example #3
0
 // Token: 0x06002EDD RID: 11997 RVA: 0x00132280 File Offset: 0x00130680
 public static void joinLobby(CSteamID newLobby)
 {
     if (Lobbies.inLobby)
     {
         Lobbies.leaveLobby();
     }
     Terminal.print("Join lobby: " + newLobby, null, Provider.STEAM_IC, Provider.STEAM_DC, true);
     SteamMatchmaking.JoinLobby(newLobby);
 }
Example #4
0
 // Token: 0x06002ED9 RID: 11993 RVA: 0x00132178 File Offset: 0x00130578
 private static void onLobbyChatUpdate(LobbyChatUpdate_t callback)
 {
     Terminal.print(string.Concat(new object[]
     {
         "Lobby chat update: ",
         callback.m_ulSteamIDLobby,
         " ",
         callback.m_ulSteamIDMakingChange,
         " ",
         callback.m_ulSteamIDUserChanged,
         " ",
         callback.m_rgfChatMemberStateChange
     }), null, Provider.STEAM_IC, Provider.STEAM_DC, true);
     Lobbies.triggerLobbiesRefreshed();
 }
Example #5
0
 // Token: 0x06002ED6 RID: 11990 RVA: 0x00132030 File Offset: 0x00130430
 private static void onGameLobbyJoinRequested(GameLobbyJoinRequested_t callback)
 {
     Terminal.print(string.Concat(new object[]
     {
         "Lobby join requested: ",
         callback.m_steamIDLobby,
         " ",
         callback.m_steamIDFriend
     }), null, Provider.STEAM_IC, Provider.STEAM_DC, true);
     if (Provider.isConnected)
     {
         return;
     }
     Lobbies.joinLobby(callback.m_steamIDLobby);
 }
Example #6
0
 public static void open()
 {
     if (MenuPlayLobbiesUI.active)
     {
         return;
     }
     MenuPlayLobbiesUI.active = true;
     if (Lobbies.inLobby)
     {
         MenuPlayLobbiesUI.refresh();
     }
     else
     {
         Lobbies.createLobby();
     }
     MenuPlayLobbiesUI.container.lerpPositionScale(0f, 0f, ESleekLerp.EXPONENTIAL, 20f);
 }
Example #7
0
        private static void refresh()
        {
            MenuPlayLobbiesUI.membersBox.remove();
            int lobbyMemberCount = Lobbies.getLobbyMemberCount();

            for (int i = 0; i < lobbyMemberCount; i++)
            {
                CSteamID lobbyMemberByIndex = Lobbies.getLobbyMemberByIndex(i);
                MenuPlayLobbiesUI.SleekLobbyPlayerButton sleekLobbyPlayerButton = new MenuPlayLobbiesUI.SleekLobbyPlayerButton(lobbyMemberByIndex);
                sleekLobbyPlayerButton.positionOffset_Y = i * 50;
                sleekLobbyPlayerButton.sizeOffset_X     = -30;
                sleekLobbyPlayerButton.sizeOffset_Y     = 50;
                sleekLobbyPlayerButton.sizeScale_X      = 1f;
                MenuPlayLobbiesUI.membersBox.add(sleekLobbyPlayerButton);
            }
            MenuPlayLobbiesUI.membersBox.area = new Rect(0f, 0f, 5f, (float)(lobbyMemberCount * 50));
        }
Example #8
0
 // Token: 0x06002ED5 RID: 11989 RVA: 0x00131F88 File Offset: 0x00130388
 private static void onLobbyEnter(LobbyEnter_t callback)
 {
     Terminal.print(string.Concat(new object[]
     {
         "Lobby entered: ",
         callback.m_bLocked,
         " ",
         callback.m_ulSteamIDLobby,
         " ",
         callback.m_EChatRoomEnterResponse,
         " ",
         callback.m_rgfChatPermissions
     }), null, Provider.STEAM_IC, Provider.STEAM_DC, true);
     Lobbies.inLobby      = true;
     Lobbies.currentLobby = new CSteamID(callback.m_ulSteamIDLobby);
     Lobbies.triggerLobbiesRefreshed();
     Lobbies.triggerLobbiesEntered();
 }
Example #9
0
        public MenuPlayConnectUI()
        {
            MenuPlayConnectUI.localization = Localization.read("/Menu/Play/MenuPlayConnect.dat");
            Bundle bundle = Bundles.getBundle("/Bundles/Textures/Menu/Icons/Play/MenuPlayConnect/MenuPlayConnect.unity3d");

            MenuPlayConnectUI.container = new Sleek();
            MenuPlayConnectUI.container.positionOffset_X = 10;
            MenuPlayConnectUI.container.positionOffset_Y = 10;
            MenuPlayConnectUI.container.positionScale_Y  = 1f;
            MenuPlayConnectUI.container.sizeOffset_X     = -20;
            MenuPlayConnectUI.container.sizeOffset_Y     = -20;
            MenuPlayConnectUI.container.sizeScale_X      = 1f;
            MenuPlayConnectUI.container.sizeScale_Y      = 1f;
            MenuUI.container.add(MenuPlayConnectUI.container);
            MenuPlayConnectUI.active  = false;
            MenuPlayConnectUI.ipField = new SleekField();
            MenuPlayConnectUI.ipField.positionOffset_X = -100;
            MenuPlayConnectUI.ipField.positionOffset_Y = -75;
            MenuPlayConnectUI.ipField.positionScale_X  = 0.5f;
            MenuPlayConnectUI.ipField.positionScale_Y  = 0.5f;
            MenuPlayConnectUI.ipField.sizeOffset_X     = 200;
            MenuPlayConnectUI.ipField.sizeOffset_Y     = 30;
            MenuPlayConnectUI.ipField.maxLength        = 64;
            MenuPlayConnectUI.ipField.addLabel(MenuPlayConnectUI.localization.format("IP_Field_Label"), ESleekSide.RIGHT);
            MenuPlayConnectUI.ipField.text = PlaySettings.connectIP;
            SleekField sleekField = MenuPlayConnectUI.ipField;

            if (MenuPlayConnectUI.< > f__mg$cache0 == null)
            {
                MenuPlayConnectUI.< > f__mg$cache0 = new Typed(MenuPlayConnectUI.onTypedIPField);
            }
            sleekField.onTyped = MenuPlayConnectUI.< > f__mg$cache0;
            MenuPlayConnectUI.container.add(MenuPlayConnectUI.ipField);
            MenuPlayConnectUI.portField = new SleekUInt16Field();
            MenuPlayConnectUI.portField.positionOffset_X = -100;
            MenuPlayConnectUI.portField.positionOffset_Y = -35;
            MenuPlayConnectUI.portField.positionScale_X  = 0.5f;
            MenuPlayConnectUI.portField.positionScale_Y  = 0.5f;
            MenuPlayConnectUI.portField.sizeOffset_X     = 200;
            MenuPlayConnectUI.portField.sizeOffset_Y     = 30;
            MenuPlayConnectUI.portField.addLabel(MenuPlayConnectUI.localization.format("Port_Field_Label"), ESleekSide.RIGHT);
            MenuPlayConnectUI.portField.state = PlaySettings.connectPort;
            SleekUInt16Field sleekUInt16Field = MenuPlayConnectUI.portField;

            if (MenuPlayConnectUI.< > f__mg$cache1 == null)
            {
                MenuPlayConnectUI.< > f__mg$cache1 = new TypedUInt16(MenuPlayConnectUI.onTypedPortField);
            }
            sleekUInt16Field.onTypedUInt16 = MenuPlayConnectUI.< > f__mg$cache1;
            MenuPlayConnectUI.container.add(MenuPlayConnectUI.portField);
            MenuPlayConnectUI.passwordField = new SleekField();
            MenuPlayConnectUI.passwordField.positionOffset_X = -100;
            MenuPlayConnectUI.passwordField.positionOffset_Y = 5;
            MenuPlayConnectUI.passwordField.positionScale_X  = 0.5f;
            MenuPlayConnectUI.passwordField.positionScale_Y  = 0.5f;
            MenuPlayConnectUI.passwordField.sizeOffset_X     = 200;
            MenuPlayConnectUI.passwordField.sizeOffset_Y     = 30;
            MenuPlayConnectUI.passwordField.addLabel(MenuPlayConnectUI.localization.format("Password_Field_Label"), ESleekSide.RIGHT);
            MenuPlayConnectUI.passwordField.replace = MenuPlayConnectUI.localization.format("Password_Field_Replace").ToCharArray()[0];
            MenuPlayConnectUI.passwordField.text    = PlaySettings.connectPassword;
            SleekField sleekField2 = MenuPlayConnectUI.passwordField;

            if (MenuPlayConnectUI.< > f__mg$cache2 == null)
            {
                MenuPlayConnectUI.< > f__mg$cache2 = new Typed(MenuPlayConnectUI.onTypedPasswordField);
            }
            sleekField2.onTyped = MenuPlayConnectUI.< > f__mg$cache2;
            MenuPlayConnectUI.container.add(MenuPlayConnectUI.passwordField);
            MenuPlayConnectUI.connectButton = new SleekButtonIcon((Texture2D)bundle.load("Connect"));
            MenuPlayConnectUI.connectButton.positionOffset_X         = -100;
            MenuPlayConnectUI.connectButton.positionOffset_Y         = 45;
            MenuPlayConnectUI.connectButton.positionScale_X          = 0.5f;
            MenuPlayConnectUI.connectButton.positionScale_Y          = 0.5f;
            MenuPlayConnectUI.connectButton.sizeOffset_X             = 200;
            MenuPlayConnectUI.connectButton.sizeOffset_Y             = 30;
            MenuPlayConnectUI.connectButton.text                     = MenuPlayConnectUI.localization.format("Connect_Button");
            MenuPlayConnectUI.connectButton.tooltip                  = MenuPlayConnectUI.localization.format("Connect_Button_Tooltip");
            MenuPlayConnectUI.connectButton.iconImage.backgroundTint = ESleekTint.FOREGROUND;
            SleekButton sleekButton = MenuPlayConnectUI.connectButton;

            if (MenuPlayConnectUI.< > f__mg$cache3 == null)
            {
                MenuPlayConnectUI.< > f__mg$cache3 = new ClickedButton(MenuPlayConnectUI.onClickedConnectButton);
            }
            sleekButton.onClickedButton = MenuPlayConnectUI.< > f__mg$cache3;
            MenuPlayConnectUI.container.add(MenuPlayConnectUI.connectButton);
            TempSteamworksMatchmaking matchmakingService = Provider.provider.matchmakingService;

            if (MenuPlayConnectUI.< > f__mg$cache4 == null)
            {
                MenuPlayConnectUI.< > f__mg$cache4 = new TempSteamworksMatchmaking.AttemptUpdated(MenuPlayConnectUI.onAttemptUpdated);
            }
            matchmakingService.onAttemptUpdated = MenuPlayConnectUI.< > f__mg$cache4;
            TempSteamworksMatchmaking matchmakingService2 = Provider.provider.matchmakingService;

            if (MenuPlayConnectUI.< > f__mg$cache5 == null)
            {
                MenuPlayConnectUI.< > f__mg$cache5 = new TempSteamworksMatchmaking.TimedOut(MenuPlayConnectUI.onTimedOut);
            }
            matchmakingService2.onTimedOut = MenuPlayConnectUI.< > f__mg$cache5;
            if (!MenuPlayConnectUI.isLaunched)
            {
                MenuPlayConnectUI.isLaunched = true;
                uint   newIP;
                ushort newPort;
                string newPassword;
                ulong  num;
                if (CommandLine.tryGetConnect(Environment.CommandLine, out newIP, out newPort, out newPassword))
                {
                    SteamConnectionInfo steamConnectionInfo = new SteamConnectionInfo(newIP, newPort, newPassword);
                    Debug.Log(string.Concat(new object[]
                    {
                        steamConnectionInfo.ip,
                        " ",
                        Parser.getIPFromUInt32(steamConnectionInfo.ip),
                        " ",
                        steamConnectionInfo.port,
                        " ",
                        steamConnectionInfo.password
                    }));
                    Provider.provider.matchmakingService.connect(steamConnectionInfo);
                    MenuUI.openAlert(MenuPlayConnectUI.localization.format("Connecting"));
                }
                else if (CommandLine.tryGetLobby(Environment.CommandLine, out num))
                {
                    Debug.Log("Lobby: " + num);
                    Lobbies.joinLobby(new CSteamID(num));
                }
            }
            bundle.unload();
            MenuPlayConnectUI.backButton = new SleekButtonIcon((Texture2D)MenuDashboardUI.icons.load("Exit"));
            MenuPlayConnectUI.backButton.positionOffset_Y = -50;
            MenuPlayConnectUI.backButton.positionScale_Y  = 1f;
            MenuPlayConnectUI.backButton.sizeOffset_X     = 200;
            MenuPlayConnectUI.backButton.sizeOffset_Y     = 50;
            MenuPlayConnectUI.backButton.text             = MenuDashboardUI.localization.format("BackButtonText");
            MenuPlayConnectUI.backButton.tooltip          = MenuDashboardUI.localization.format("BackButtonTooltip");
            SleekButton sleekButton2 = MenuPlayConnectUI.backButton;

            if (MenuPlayConnectUI.< > f__mg$cache6 == null)
            {
                MenuPlayConnectUI.< > f__mg$cache6 = new ClickedButton(MenuPlayConnectUI.onClickedBackButton);
            }
            sleekButton2.onClickedButton          = MenuPlayConnectUI.< > f__mg$cache6;
            MenuPlayConnectUI.backButton.fontSize = 14;
            MenuPlayConnectUI.backButton.iconImage.backgroundTint = ESleekTint.FOREGROUND;
            MenuPlayConnectUI.container.add(MenuPlayConnectUI.backButton);
        }