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 int AddQueryNew(FrontEndQuery.QueryInfoNew info)
        {
            Globals.Assert(numQueries < (int)Enum.kMaxQueries);
            if (query[numQueries] == null)
            {
                query[numQueries] = new FrontEndQuery();
            }

            (query[numQueries]).InitialiseNew(info);
            numQueries++;
            return(numQueries - 1);
        }
示例#3
0
 public void SetupAardmanTexture()
 {
     FrontEndQuery.QueryInfoNew qInfo = new FrontEndQuery.QueryInfoNew();
     qInfo.backdropTexture           = null;
     qInfo.boxDimensions             = Utilities.CGSizeMake(280.0f, 140.0f);
     qInfo.inTextScale               = 20.0f;
     qInfo.newStyleWithAtlas         = false;
     qInfo.noButton                  = null;
     qInfo.yesButton                 = null;
     qInfo.useActualText             = true;
     qInfo.queryText                 = "AARDMAN(C) AND\n TM AARDMAN ANIMATIONS\n LTD 2011";
     qInfo.position                  = Utilities.CGPointMake(160.0f, 410.0f);
     qInfo.numButtons                = 0;
     qInfo.useNSStringForAnyLanguage = true;
     aardmanCredit.InitialiseNew(qInfo);
 }