Пример #1
0
        public void DoItWithQuery(UnityUIAlertInfo info)
        {
            FrontEndQuery.QueryInfoNew nqInfo = new FrontEndQuery.QueryInfoNew();

            nqInfo.newStyleWithAtlas = false;

            if (info.title == "")
            {
                nqInfo.queryText = info.message;
            }
            else
            {
                nqInfo.queryText = info.title + "\n\n" + info.message;
            }

            nqInfo.useNSStringForAnyLanguage = info.useNSStringAnyway;
            nqInfo.backdropTexture           = Globals.g_world.frontEnd.GetButtonTexture((int)FrontEnd.Enum.kButtonTexture_QueryBackdrop);
            nqInfo.position.x        = 160.0f;
            nqInfo.position.y        = 200.0f;
            nqInfo.inTextScale       = 28.0f * info.textScale;
            nqInfo.boxDimensions     = Utilities.CGSizeMake(260.0f, 100.0f);
            nqInfo.yesButton         = null;
            nqInfo.noButton          = null;
            nqInfo.backdropId        = 0;
            nqInfo.numButtons        = info.numButtons;
            nqInfo.inAtlas           = Globals.g_world.GetAtlas((int)AtlasType.kAtlas_FeelGood);
            nqInfo.dimOverlayTexture = (Globals.g_world.game).GetTexture((TextureType)TextureType.kTextureDimOverlay);
            nqInfo.scale             = 0.86f;
            for (int i = 0; i < nqInfo.numButtons; i++)
            {
                nqInfo.buttonString[i] = info.buttonString[i];
            }

            query.InitialiseNew(nqInfo);
        }
Пример #2
0
        public void Show(UnityUIAlertInfo info)
        {
            type    = info.type;
            title   = info.title;
            message = info.message;

            if (!Globals.g_world.DoesCurrentLanguageUseNSString())
            {
                Debug.Log("query.SetFontP1P2 " + Globals.g_world.font.ToString());

                query.SetFontP1P2(Globals.g_world.font, Globals.g_world.GetAtlas(AtlasType.kAtlas_FontLines), Globals.g_world.GetAtlas(
                                      AtlasType.kAtlas_FontColours));
            }


            this.DoItWithQuery(info);

            query.ShowForUIAlert();
            visible = true;
            return;

            type        = info.type;
            visible     = true;
            boxWidth    = 240.0f;
            boxHeight   = 130.0f;
            titleHeight = 30.0f;

            numButtons = info.numButtons;
            for (int i = 0; i < numButtons; i++)
            {
                buttonString [i] = info.buttonString [i];
            }
            title   = info.title;
            message = info.message;

            fadingIn  = true;
            fadeValue = 0.0f;

            if (title == "")
            {
                titleHeight = 0.0f;
            }

            titleHeight *= (Screen.height / 480.0f);
            boxHeight   *= (Screen.height / 480.0f);
            boxWidth    *= (Screen.width / 320.0f);
        }