Esempio n. 1
0
        public CharSelector()
        {
            _camera = new CamHandler();

            RAGE.Game.Graphics.GetScreenResolution(ref ScreenResX, ref ScreenResY);
            RAGE.Game.Graphics.GetActiveScreenResolution(ref ScreenX, ref ScreenY);

            Events.Tick += Render;

            Events.Add(Shared.Events.ServerToClient.Character.InitCharSelector, OnInitCharSelector);
            Events.Add(Shared.Events.ServerToClient.Character.EndCharSelector, OnEndCharSelector);
            Events.Add(Shared.Events.ServerToClient.Character.RenderCharacterList, OnRenderCharacterList);

            // Temp testing events
            Events.Add("selectchar", SelectChar);
            Events.Add("playchar", SpawnChar);
        }
Esempio n. 2
0
        public Authentication()
        {
            Camera = new CamHandler();

            #region SERVER_TO_CLIENT
            Events.Add(Shared.Events.ServerToClient.Authentication.SetLoginScreen, OnSetLoginScreen);
            Events.Add(Shared.Events.ServerToClient.Authentication.DisplayError, OnDisplayError);
            Events.Add(Shared.Events.ServerToClient.Authentication.RegistrationSuccess, OnRegistrationSuccess);
            Events.Add(Shared.Events.ServerToClient.Authentication.Show2FAbyEmailAddress, OnShow2FAbyEmailAddress);
            Events.Add(Shared.Events.ServerToClient.Authentication.Show2FAbyGoogleAuth, OnShow2FAbyGoogleAuth);
            Events.Add(Shared.Events.ServerToClient.Authentication.ShowInitialEmailVerification, OnShowInitialEmailVerification);
            Events.Add(Shared.Events.ServerToClient.Authentication.ShowChangeEmailAddress, OnShowChangeEmailAddress);
            Events.Add(Shared.Events.ServerToClient.Authentication.ShowLoginPage, OnShowLoginPage);
            Events.Add(Shared.Events.ServerToClient.Authentication.ShowQRCode, OnShowQRCode);
            Events.Add(Shared.Events.ServerToClient.Authentication.ShowQRCodeEnabled, OnShowQRCodeEnabled);
            #endregion

            #region CEF_TO_CLIENT
            // From multiple pages
            Events.Add("onBackToLogin", OnBackToLogin);
            Events.Add("onResendMail", OnResendMail);
            // From register.html
            Events.Add("onSubmitRegister", OnSubmitRegister);
            // From login.html
            Events.Add("onSubmitLogin", OnSubmitLogin);
            // From forgot.html
            Events.Add("onSubmitForgetPass", OnSubmitForgetPass);
            // From verifyemail.html
            Events.Add("onSubmitEmailToken", OnSubmitEmailToken);
            // From verifygoogleauth.html
            Events.Add("onSubmitGoogleAuthCode", OnSubmitGoogleAuthCode);
            // From newpass.html
            Events.Add("onSubmitNewPass", OnSubmitNewPass);
            // From verifyemailfirst.html
            Events.Add("onSubmitFirstEmailToken", OnSubmitFirstEmailToken);
            // From changemail.html
            Events.Add("onSubmitNewEmail", OnSubmitNewEmail);
            // From enabledgoogleauth.html
            Events.Add("onCloseWindow", OnCloseWindow);
            Events.Add("onSubmitEnableGoogleAuthCode", onSubmitEnableGoogleAuthCode);
            #endregion
        }