// Token: 0x06002928 RID: 10536 RVA: 0x00157888 File Offset: 0x00155A88
 public static void updateUpsellScreen()
 {
     if (Upsell.anm_progress != -1)
     {
         Upsell.anm_progress += 25;
         if (Upsell.anm_progress > 255)
         {
             Upsell.anm_progress = 255;
         }
         if (Upsell.anm_progress < -1)
         {
             Upsell.anm_progress += 25;
             if (Upsell.anm_progress > -50)
             {
                 Upsell.anm_progress = -1;
             }
         }
     }
     if (Upsell.wasUpsell && !Guide.IsVisible && !XBOXLive.isTrial(true))
     {
         Upsell.disposeUpsellScreen();
         if (Upsell.buy_scr_work != null)
         {
             Upsell.buy_scr_work.result[0] = 0;
             AppMain.DmSndBgmPlayerPlayBgm(0);
             return;
         }
         AppMain.event_after_buy = true;
         AppMain.SyDecideEvtCase(1);
         AppMain.SyChangeNextEvt();
     }
 }
    // Token: 0x06002929 RID: 10537 RVA: 0x0015792C File Offset: 0x00155B2C
    public static void drawUpsellScreen()
    {
        if (!Upsell.showUpsell)
        {
            return;
        }
        SpriteBatch spriteBatch = LiveFeature.GAME.spriteBatch;

        spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend);
        spriteBatch.Draw(Upsell.bg, Vector2.Zero, Color.White);
        spriteBatch.Draw(Upsell.hl_buttons[1] ? Upsell.button2hl : Upsell.button2, Upsell.rects[1], Color.White);
        spriteBatch.Draw(Upsell.hl_buttons[0] ? Upsell.button1hl : Upsell.button1, Upsell.rects[0], Color.White);
        spriteBatch.Draw(Upsell.cursor1, Upsell.rects[2], Color.White);
        spriteBatch.Draw(Upsell.cursor1, Upsell.rects[3], default(Rectangle?), Color.White, 0f, Vector2.Zero, SpriteEffects.FlipHorizontally, 0f);
        spriteBatch.Draw(Upsell.screenshot, Upsell.rects[4], Color.White);
        int num = 5;

        num += LiveFeature._drawWrapText("Download full Game!", 335, num, 300, Color.White, true, LiveFeature.GAME.fnts[1], spriteBatch, 0.8f);
        num += LiveFeature._drawWrapText("- 17 diverse stages", 195, num, 300, Color.White, false, LiveFeature.GAME.fnts[0], spriteBatch, 0.8f);
        num += LiveFeature._drawWrapText("- Two exclusive stages!", 195, num, 300, Color.White, false, LiveFeature.GAME.fnts[0], spriteBatch, 0.8f);
        num += LiveFeature._drawWrapText("- 7 special stages with tilt control!", 195, num, 300, Color.White, false, LiveFeature.GAME.fnts[0], spriteBatch, 0.8f);
        num += LiveFeature._drawWrapText("- Collect all 7 Chaos Emeralds to Unlock Super Sonic!", 195, num, 300, Color.White, false, LiveFeature.GAME.fnts[0], spriteBatch, 0.8f);
        if (Upsell.anm_progress != -1)
        {
            int num2 = Math.Abs(Upsell.anm_progress);
            spriteBatch.Draw(Upsell.screenshot, Vector2.Zero, new Color(num2, num2, num2, num2));
        }
        LiveFeature.GAME.spriteBatch.End();
        Upsell.updateUpsellScreen();
    }
 // Token: 0x06002925 RID: 10533 RVA: 0x001573C3 File Offset: 0x001555C3
 public static void launchUpsellScreen(AppMain.DMS_BUY_SCR_WORK buy_scr)
 {
     AppMain.DmSndBgmPlayerBgmStop();
     Upsell.ss_num       = 1;
     Upsell.buy_scr_work = buy_scr;
     Upsell.loadUpsellScreen();
 }
Exemple #4
0
 protected override void Update(GameTime gameTime)
 {
     AppMain.lastGameTime = gameTime;
     if (!AppMain.g_ao_sys_global.is_show_ui)
     {
         if (Sonic4Ep1.inputDataRead)
         {
             Sonic4Ep1.inputDataRead = false;
             if (!LiveFeature.getInstance().InputOverride() && !Upsell.inputUpsellScreen() && AppMain.isForeground)
             {
                 AppMain.onTouchEvents();
                 AppMain.amIPhoneAccelerate(ref this.accel);
                 if (GamePad.GetState(PlayerIndex.One).Buttons.Back == ButtonState.Pressed)
                 {
                     AppMain.back_key_is_pressed = true;
                 }
             }
         }
     }
     base.Update(gameTime);
     //catch (GameUpdateRequiredException ex)
     //{
     //    XBOXLive.HandleGameUpdateRequired(ex);
     //}
 }
Exemple #5
0
 public static void updateUpsellScreen()
 {
     if (Upsell.anm_progress != -1)
     {
         Upsell.anm_progress += 25;
         if (Upsell.anm_progress > (int)byte.MaxValue)
         {
             Upsell.anm_progress = (int)byte.MaxValue;
         }
         if (Upsell.anm_progress < -1)
         {
             Upsell.anm_progress += 25;
             if (Upsell.anm_progress > -50)
             {
                 Upsell.anm_progress = -1;
             }
         }
     }
     if (!Upsell.wasUpsell || XBOXLive.isTrial(true))
     {
         return;
     }
     Upsell.disposeUpsellScreen();
     if (Upsell.buy_scr_work != null)
     {
         Upsell.buy_scr_work.result[0] = 0;
         AppMain.DmSndBgmPlayerPlayBgm(0);
     }
     else
     {
         AppMain.event_after_buy = true;
         AppMain.SyDecideEvtCase((short)1);
         AppMain.SyChangeNextEvt();
     }
 }
Exemple #6
0
 public void SingleEndToEnd()
 {
     QuoteEntry.GoTo();
     //YOUR POLICY DETAILS
     QuoteEntry.PolicyTypeLevelTerm();
     QuoteEntry.PolicyTerm("28");
     QuoteEntry.SumAssured("180000");
     QuoteEntry.TitleMr();
     QuoteEntry.App1FirstName("James");
     QuoteEntry.App1Surname("Test");
     QuoteEntry.App1DOBDD("01");
     QuoteEntry.App1DOBMM("January");
     QuoteEntry.App1DOBYY("1985");
     QuoteEntry.Postcode("PO19 1JG");
     QuoteEntry.Email("*****@*****.**");
     QuoteEntry.Telephone("07777777777");
     QuoteEntry.App1HeightFt("5");
     QuoteEntry.App1HeightIns("10");
     QuoteEntry.App1WeightStone("11");
     QuoteEntry.App1WeightLbs("0");
     //QUOTE+ SECTION 1
     QuoteEntry.SmokingNever();
     QuoteEntry.AlcoholUnits("0");
     QuoteEntry.ClickNextButton();
     //QUOTE+ SECTION 2
     QuoteEntry.QuotePlusMedicalTreatmentNo();
     QuoteEntry.QuotePlusMedicationNo();
     QuoteEntry.QuotePlusFamilyNo();
     QuoteEntry.ClickNextButton();
     //QUOTE+ SECTION 3
     QuoteEntry.QuotePlusChestPainNo();
     QuoteEntry.QuotePlusKidneyFailureNo();
     QuoteEntry.QuotePlusMedicalAdviceNo();
     QuoteEntry.QuotePlusHIVNo();
     QuoteEntry.ClickNextButton();
     //QUOTE+ SECTION 4
     QuoteEntry.QuotePlusActivitiesNo();
     QuoteEntry.QuotePlusOccupationNo();
     QuoteEntry.QuotePlusTravelNo();
     QuoteEntry.QuotePlusDrivingNo();
     QuoteEntry.QuotePlusDrugsNo();
     QuoteEntry.QuotePlusAlcoholNo();
     QuoteEntry.QuotePlusExistingCoverNo();
     QuoteEntry.ClickNextButton();
     QuoteEntry.ClickGetAQuoteButton();
     //RESULTS SCREEN
     Utilities.Wait();
     Results.ApplyRoyalLondon();
     //UPSELL SCREEN
     Upsell.IndexationYes();
     Upsell.ClickContinueButton();
     //CHOSENQUOTE SCREEN
     ChosenQuote.ClickProceedButton();
 }
Exemple #7
0
 protected override void Draw(GameTime gameTime)
 {
     Sonic4Ep1.inputDataRead       = true;
     OpenGL.drawPrimitives_Count   = 0;
     OpenGL.drawVertexBuffer_Count = 0;
     this.appMain.AppMainLoop();
     this.spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.Opaque);
     this.spriteBatch.End();
     LiveFeature.getInstance().ShowOverride();
     Upsell.drawUpsellScreen();
     base.Draw(gameTime);
 }
    // Token: 0x06002927 RID: 10535 RVA: 0x00157530 File Offset: 0x00155730
    public static bool inputUpsellScreen()
    {
        if (!Upsell.showUpsell)
        {
            return(false);
        }
        Upsell.pressed_button = -1;
        bool flag = GamePad.GetState(PlayerIndex.One).Buttons.Back == ButtonState.Pressed;

        if (flag)
        {
            if (Upsell.anm_progress != -1)
            {
                Upsell.anm_progress = -1;
                return(true);
            }
            Upsell.disposeUpsellScreen();
            if (Upsell.buy_scr_work != null)
            {
                Upsell.buy_scr_work.result[0] = 2;
                AppMain.DmSndBgmPlayerPlayBgm(0);
            }
            else
            {
                AppMain.SyDecideEvtCase(1);
                AppMain.SyChangeNextEvt();
            }
            return(true);
        }
        else
        {
            TouchCollection state = TouchPanel.GetState();
            if (state.Count == 0)
            {
                if (Upsell.px == 0 && Upsell.py == 0)
                {
                    return(true);
                }
                Upsell.curState = 1;
                Upsell.cx       = Upsell.px;
                Upsell.cy       = Upsell.py;
                Upsell.px       = 0;
                Upsell.py       = 0;
            }
            else
            {
                TouchLocation touchLocation = state[0];
                if (touchLocation.State == TouchLocationState.Pressed || touchLocation.State == TouchLocationState.Moved)
                {
                    Upsell.curState = 0;
                    Upsell.cx       = (int)touchLocation.Position.X;
                    Upsell.cy       = (int)touchLocation.Position.Y;
                }
                if (touchLocation.State == TouchLocationState.Released || touchLocation.State == TouchLocationState.Invalid)
                {
                    Upsell.curState = 1;
                    Upsell.cx       = Upsell.px;
                    Upsell.cy       = Upsell.py;
                    Upsell.px       = 0;
                    Upsell.py       = 0;
                }
            }
            Upsell.hl_buttons[0] = false;
            Upsell.hl_buttons[1] = false;
            if (Upsell.anm_progress > 100)
            {
                Upsell.anm_progress = -Upsell.anm_progress;
                Upsell.curState     = 1;
                Upsell.cx           = Upsell.px;
                Upsell.cy           = Upsell.py;
                Upsell.px           = 0;
                Upsell.py           = 0;
                return(true);
            }
            if (Upsell.anm_progress != -1)
            {
                return(true);
            }
            for (int i = 0; i < 5; i++)
            {
                if (Upsell.rects[i].Contains(Upsell.cx, Upsell.cy))
                {
                    Upsell.pressed_button = i;
                    break;
                }
            }
            switch (Upsell.pressed_button)
            {
            case 0:
                if (Upsell.curState == 0)
                {
                    Upsell.hl_buttons[0] = true;
                }
                else
                {
                    Upsell.disposeUpsellScreen();
                    if (Upsell.buy_scr_work != null)
                    {
                        Upsell.buy_scr_work.result[0] = 2;
                        AppMain.DmSndBgmPlayerPlayBgm(0);
                    }
                    else
                    {
                        AppMain.SyDecideEvtCase(1);
                        AppMain.SyChangeNextEvt();
                    }
                }
                break;

            case 1:
                if (Upsell.curState == 0)
                {
                    Upsell.hl_buttons[1] = true;
                }
                else
                {
                    Upsell.wasUpsell = true;
                    XBOXLive.showGuide();
                }
                break;

            case 2:
                if (Upsell.curState == 1)
                {
                    Upsell.ss_num--;
                    if (Upsell.ss_num < 1)
                    {
                        Upsell.ss_num = 5;
                    }
                    Upsell.screenshot.Dispose();
                    Upsell.screenshot = Texture2D.FromStream(LiveFeature.GAME.GraphicsDevice, TitleContainer.OpenStream("Content\\UPSELL\\s4us_ss_" + Upsell.ss_num + ".png"));
                }
                break;

            case 3:
                if (Upsell.curState == 1)
                {
                    Upsell.ss_num++;
                    if (Upsell.ss_num >= 5)
                    {
                        Upsell.ss_num = 1;
                    }
                    Upsell.screenshot.Dispose();
                    Upsell.screenshot = Texture2D.FromStream(LiveFeature.GAME.GraphicsDevice, TitleContainer.OpenStream("Content\\UPSELL\\s4us_ss_" + Upsell.ss_num + ".png"));
                }
                break;

            case 4:
                if (Upsell.curState == 0)
                {
                    Upsell.anm_progress = 0;
                }
                break;
            }
            if (Upsell.curState == 0)
            {
                Upsell.px = Upsell.cx;
                Upsell.py = Upsell.cy;
            }
            else
            {
                Upsell.curState = -1;
            }
            return(true);
        }
    }