Esempio n. 1
0
 public void ItemClicked(CardListPopup popup, Card card)
 {
 }
Esempio n. 2
0
 public void ButtonClicked(CardListPopup popup, ECardListButton button, List <Card> selectedCards)
 {
 }
Esempio n. 3
0
 public void ItemHovered(CardListPopup popup, Card card)
 {
 }
Esempio n. 4
0
        public override void AfterInvoke (InvocationInfo info, ref object returnValue)
        //public override bool BeforeInvoke(InvocationInfo info, out object returnValue)
        {
           
            if (info.target is ChatUI && info.targetMethod.Equals("AdjustToResolution"))//get style
            {
                this.chatLogStyle = new GUIStyle((GUIStyle)chatMsgStylefield.GetValue(info.target));

                this.chatButtonSkin = (GUISkin)chatButtonSkinfield.GetValue(info.target);

                //Console.WriteLine("AdjustToResolution");
            }

            if (info.target is Store && info.targetMethod.Equals("Start"))//update rects in store
            {
                this.menueheight = (float)Screen.width / 25.6f;
                selfsearchstring = "";
                this.store = (Store)info.target;
                this.sellFrame = (CardListPopup)typeof(Store).GetField("sellFrame", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(info.target);
                Rect sellrect = new Rect((float)Screen.width * 0.01f, (float)Screen.height * 0.18f, (float)Screen.height * 0.5f, (float)Screen.height * 0.7f);
                Rect searchFieldRect = new Rect(-10, -10, 1, 1);

                float BOTTOM_MARGIN_EXTRA = (float)Screen.height * 0.047f;
                float num = 0.005f * (float)Screen.width;
                Vector4 margins = new Vector4(0f, 0f, 0f, 0f + BOTTOM_MARGIN_EXTRA);
                float num2 = BOTTOM_MARGIN_EXTRA - 0.01f * (float)Screen.height;
                float num3 = num2 * 1.28f;



                Rect outerRect = new Rect((Rect)outerRectfield.GetValue(sellFrame));
                Rect innerBGRect = new Rect((Rect)innerBGRectfield.GetValue(sellFrame));
                Rect innerRect = new Rect((Rect)innerRectfield.GetValue(sellFrame));
                innerBGRect.height = innerBGRect.height + num3;
                innerRect.height = innerRect.height + num3;
                searchFieldRectfield.SetValue(sellFrame, searchFieldRect);
                innerBGRectfield.SetValue(sellFrame, innerBGRect);
                innerRectfield.SetValue(sellFrame, innerRect);
                this.p1cf = CardFilter.from("");
                this.p1rectsearchmenu = new Rect(outerRect.x, sellrect.y + sellrect.height + num, (float)Screen.width / 2, this.menueheight);
                this.p1searchrect = new Rect(p1rectsearchmenu.x + num+2, p1rectsearchmenu.y + num + 2, sellrect.width / 2, p1rectsearchmenu.height - 2f * num - 4);
                this.p1growthrect = new Rect(p1searchrect.x + p1searchrect.width + 3, p1rectsearchmenu.y + num + 2, p1rectsearchmenu.height - 2f * num - 4, p1rectsearchmenu.height - 2f * num - 4);
                this.p1orderrect = new Rect(p1growthrect.x + p1growthrect.width + 3, p1rectsearchmenu.y + num + 2, p1rectsearchmenu.height - 2f * num - 4, p1rectsearchmenu.height - 2f * num - 4);
                this.p1energyrect = new Rect(p1orderrect.x + p1orderrect.width + 3, p1rectsearchmenu.y + num + 2, p1rectsearchmenu.height - 2f * num - 4, p1rectsearchmenu.height - 2f * num - 4);
                this.p1decayrect = new Rect(p1energyrect.x + p1energyrect.width + 3, p1rectsearchmenu.y + num + 2, p1rectsearchmenu.height - 2f * num - 4, p1rectsearchmenu.height - 2f * num - 4);
                this.p1commonrect = new Rect(p1decayrect.x + p1decayrect.width + 3, p1rectsearchmenu.y + num + 2, p1rectsearchmenu.height - 2f * num - 4, p1rectsearchmenu.height - 2f * num - 4);
                this.p1uncommonrect = new Rect(p1commonrect.x + p1commonrect.width + 3, p1rectsearchmenu.y + num + 2, p1rectsearchmenu.height - 2f * num - 4, p1rectsearchmenu.height - 2f * num - 4);
                this.p1rarerect = new Rect(p1uncommonrect.x + p1uncommonrect.width + 3, p1rectsearchmenu.y + num + 2, p1rectsearchmenu.height - 2f * num - 4, p1rectsearchmenu.height - 2f * num - 4);
                this.p1mt3rect = new Rect(p1rarerect.x + p1rarerect.width + 3, p1rectsearchmenu.y + num + 2, p1rectsearchmenu.height - 2f * num - 4, p1rectsearchmenu.height - 2f * num - 4);
                this.p1clearrect = new Rect(p1mt3rect.x + p1mt3rect.width + 3, p1rectsearchmenu.y + num + 2, p1rectsearchmenu.height - 2f * num - 4, p1rectsearchmenu.height - 2f * num - 4);
                this.p1rectsearchmenu.width = p1clearrect.x + p1clearrect.width + num +2 - p1rectsearchmenu.x;


                this.orgicardsPlayer1.Clear();

            }

            if (info.target is Store && info.targetMethod.Equals("handleMessage"))// update orginal cards!
            {

                Message msg = (Message)info.arguments[0];
                if (msg is LibraryViewMessage)
                {
                    if (!(((LibraryViewMessage)msg).profileId==123))
                    {
                        this.selfsearchstring = "";
                        p1growthbool = true;
                        p1orderbool = true;
                        p1energybool = true;
                        p1decaybool = true;
                        p1commonbool = true;
                        p1uncommonbool = true;
                        p1rarebool = true;
                        p1mt3bool = false;
                        this.orgicardsPlayer1.Clear();
                        this.orgicardsPlayer1.AddRange(((LibraryViewMessage)msg).cards);
                        this.p1moddedlist.Clear();
                        this.p1moddedlist.AddRange(this.orgicardsPlayer1);
                    }
                }
            }

            if (info.target is Store && info.targetMethod.Equals("OnGUI"))//draw menu
            {
                float offset = 0f;
                if (sellFrame != null)
                {
                    float offX = (float)offxInfo.GetValue(sellFrame);
                    offset = offX;
                }
                if (true)
                {
                    sliderectsp1(offset);
                    //outerFrame1.Draw();
                    GUI.color = new Color(1f, 1f, 1f, 1f);
                    GUI.skin = this.chatButtonSkin;
                    GUI.Box(this.p1rectsearchmenu, string.Empty);

                    Color dblack = new Color(1f, 1f, 1f, 0.2f);
                    GUI.color = new Color(1f, 1f, 1f, 0.6f);
                    GUI.skin = this.chatButtonSkin;
                    GUI.Box(this.p1searchrect, string.Empty);
                    GUI.color = Color.white;
                    string selfcopy = this.selfsearchstring;
                    this.selfsearchstring = GUI.TextField(this.p1searchrect, this.selfsearchstring, this.chatLogStyle);
                    GUI.contentColor = Color.white;
                    GUI.color = Color.white;
                    if (!p1growthbool) { GUI.color = dblack; }
                    bool p1growthclick = GUI.Button(p1growthrect, growthres);
                    GUI.color = Color.white;
                    if (!p1orderbool) { GUI.color = dblack; }
                    bool p1orderclick = GUI.Button(p1orderrect, orderres);
                    GUI.color = Color.white;
                    if (!p1energybool) { GUI.color = dblack; }
                    bool p1energyclick = GUI.Button(p1energyrect, energyres);
                    GUI.color = Color.white;
                    if (!p1decaybool) { GUI.color = dblack; }
                    bool p1decayclick = GUI.Button(p1decayrect, decayres);
                    GUI.color = Color.white;
                    if (!p1commonbool) { GUI.color = dblack; }
                    GUI.contentColor = Color.gray;
                    bool p1commonclick = GUI.Button(p1commonrect, "C");
                    GUI.color = Color.white;
                    if (!p1uncommonbool) { GUI.color = dblack; }
                    GUI.contentColor = Color.white;
                    bool p1uncommonclick = GUI.Button(p1uncommonrect, "U");
                    GUI.color = Color.white;
                    if (!p1rarebool) { GUI.color = dblack; }
                    GUI.contentColor = Color.yellow;
                    bool p1rareclick = GUI.Button(p1rarerect, "R");
                    GUI.contentColor = Color.white;
                    GUI.color = Color.white;
                    if (!p1mt3bool) { GUI.color = dblack; }
                    bool p1mt3click = GUI.Button(p1mt3rect, ">3");
                    GUI.color = Color.white;
                    GUI.contentColor = Color.red;
                    bool p1closeclick = GUI.Button(p1clearrect, "X");

                    if (p1growthclick) { p1growthbool = !p1growthbool; };
                    if (p1orderclick) { p1orderbool = !p1orderbool; }
                    if (p1energyclick) { p1energybool = !p1energybool; };
                    if (p1decayclick) { p1decaybool = !p1decaybool; }
                    if (p1commonclick) { p1commonbool = !p1commonbool; };
                    if (p1uncommonclick) { p1uncommonbool = !p1uncommonbool; }
                    if (p1rareclick) { p1rarebool = !p1rarebool; };
                    if (p1mt3click) { p1mt3bool = !p1mt3bool; }
                    if (p1closeclick)
                    {
                        this.selfsearchstring = "";
                        this.p1cf = CardFilter.from("");
                        p1growthbool = true;
                        p1orderbool = true;
                        p1energybool = true;
                        p1decaybool = true;
                        p1commonbool = true;
                        p1uncommonbool = true;
                        p1rarebool = true;
                        p1mt3bool = false;
                    }

                    //clear p1moddedlist only if necessary
                    if (selfcopy != this.selfsearchstring || p1closeclick || (p1growthclick && p1growthbool) || (p1orderclick && p1orderbool) || (p1energyclick && p1energybool) || (p1decayclick && p1decaybool) || (p1commonclick && p1commonbool) || (p1uncommonclick && p1uncommonbool) || (p1rareclick && p1rarebool) || p1mt3click)
                    {
                        //Console.WriteLine("delete dings####");
                        this.p1moddedlist.Clear();
                        this.p1moddedlist.AddRange(this.orgicardsPlayer1);
                        string[] res = { "", "", "", "" };
                        if (p1decaybool) { res[0] = "decay"; };
                        if (p1energybool) { res[1] = "energy"; };
                        if (p1growthbool) { res[2] = "growth"; };
                        if (p1orderbool) { res[3] = "order"; };
                        int[] rare = { -1, -1, -1 };
                        if (p1rarebool) { rare[2] = 2; };
                        if (p1uncommonbool) { rare[1] = 1; };
                        if (p1commonbool) { rare[0] = 0; };
                        if (this.p1mt3bool)
                        {
                            this.searchmorethan3();
                        }
                        //this.onlytradeableself();
                        this.p1cf = CardFilter.from("");
                        if (this.selfsearchstring != "")
                        {
                            this.p1cf = CardFilter.from(this.selfsearchstring);
                            this.containsname(this.selfsearchstring);
                        }
                        this.searchforownenergy(res);
                        this.searchforownrarity(rare);
                        this.updatestoreself();

                    }
                    else
                    {

                        if (selfcopy != this.selfsearchstring)
                        {
                            this.p1cf = CardFilter.from("");
                            if (this.selfsearchstring != "")
                            {
                                this.p1cf = CardFilter.from(this.selfsearchstring);
                                this.containsname(this.selfsearchstring);
                                this.updatestoreself();
                            }


                        }
                        if (p1growthclick || p1orderclick || p1energyclick || p1decayclick)
                        {
                            string[] res = { "", "", "", "" };
                            if (p1decaybool) { res[0] = "decay"; };
                            if (p1energybool) { res[1] = "energy"; };
                            if (p1growthbool) { res[2] = "growth"; };
                            if (p1orderbool) { res[3] = "order"; };
                            this.searchforownenergy(res);
                            this.updatestoreself();

                        }
                        if (p1commonclick || p1uncommonclick || p1rareclick)
                        {

                            int[] rare = { -1, -1, -1 };
                            if (p1rarebool) { rare[2] = 2; };
                            if (p1uncommonbool) { rare[1] = 1; };
                            if (p1commonbool) { rare[0] = 0; };
                            this.searchforownrarity(rare);
                            this.updatestoreself();
                        }

                    }
                    sliderectsp1(-1*offset);
                }
                      
                    
                }
            



            if (info.target is TradeSystem && info.targetMethod.Equals("Init"))//update rects
            {
                Rect searchFieldRect= new Rect(-10,-10,1,1);
                //Console.WriteLine("INIT ");
                this.menueheight = (float)Screen.width / 25.6f;
                Rect outerArea1 = (Rect)outerArea1field.GetValue(info.target);
                Rect outerArea2 = (Rect)outerArea2field.GetValue(info.target);
                Rect innerArea = (Rect)innerAreafield.GetValue(info.target);
                Rect rectInvP1 = (Rect)rectInvP1field.GetValue(info.target);
                Rect rectOfferP1 = (Rect)rectOfferP1field.GetValue(info.target);
                Rect rectInvP2 = (Rect)rectInvP2field.GetValue(info.target);
                Rect rectOfferP2 = (Rect)rectOfferP2field.GetValue(info.target);
                outerArea1.height = outerArea1.height - this.menueheight;
                outerArea2.height = outerArea2.height - this.menueheight;
                innerArea.height = innerArea.height - this.menueheight;
                rectInvP1.height = rectInvP1.height - this.menueheight;
                rectOfferP1.height = rectOfferP1.height - this.menueheight;
                rectInvP2.height = rectInvP2.height - this.menueheight;
                rectOfferP2.height = rectOfferP2.height - this.menueheight;
                this.p1cf = CardFilter.from("");
                this.p2cf = CardFilter.from("");
                

                outerArea1field.SetValue(info.target, outerArea1);
                outerArea2field.SetValue(info.target, outerArea2);
                innerAreafield.SetValue(info.target, innerArea);
                rectInvP1field.SetValue(info.target, rectInvP1);
                rectOfferP1field.SetValue(info.target, rectOfferP1);
                rectInvP2field.SetValue(info.target, rectInvP2);
                rectOfferP2field.SetValue(info.target, rectOfferP2);


                CardListPopup clInventoryP1 = (CardListPopup)clInventoryP1field.GetValue(info.target);
                CardListPopup clOfferP1 = (CardListPopup)clOfferP1field.GetValue(info.target);
                CardListPopup clInventoryP2 = (CardListPopup)clInventoryP2field.GetValue(info.target);
                CardListPopup clOfferP2 = (CardListPopup)clOfferP2field.GetValue(info.target);
                
                
                float BOTTOM_MARGIN_EXTRA = (float)Screen.height * 0.047f;
                float num = 0.005f * (float)Screen.width;
                Vector4 margins = new Vector4(0f, 0f, 0f, 0f + BOTTOM_MARGIN_EXTRA);
                float num2 = BOTTOM_MARGIN_EXTRA - 0.01f * (float)Screen.height;

                //update clinventoryp1 (same calculation of the rect like in CardListPopup.Init(...))
                Rect outerRect = rectInvP1;
                Rect innerBGRect = new Rect(outerRect.x + margins.x, outerRect.y + margins.y, outerRect.width - (margins.x + margins.z), outerRect.height - (margins.y + margins.w));
                Rect innerRect = new Rect(innerBGRect.x + num, innerBGRect.y + num, innerBGRect.width - 2f * num, innerBGRect.height - 2f * num);
                Rect buttonLeftRect = new Rect(innerRect.x + innerRect.width * 0.03f, innerBGRect.yMax + num2 * 0.28f, innerRect.width * 0.45f, num2);
                Rect buttonRightRect = new Rect(innerRect.xMax - innerRect.width * 0.48f, innerBGRect.yMax + num2 * 0.28f, innerRect.width * 0.45f, num2);

                outerRectfield.SetValue(clInventoryP1, outerRect);
                innerBGRectfield.SetValue(clInventoryP1, innerBGRect);
                innerRectfield.SetValue(clInventoryP1, innerRect);
                buttonLeftRectfield.SetValue(clInventoryP1, buttonLeftRect);
                buttonRightRectfield.SetValue(clInventoryP1, buttonRightRect);
                searchFieldRectfield.SetValue(clInventoryP1, searchFieldRect);

                //update clinventoryp2
                outerRect = rectInvP2;
                innerBGRect = new Rect(outerRect.x + margins.x, outerRect.y + margins.y, outerRect.width - (margins.x + margins.z), outerRect.height - (margins.y + margins.w));
                innerRect = new Rect(innerBGRect.x + num, innerBGRect.y + num, innerBGRect.width - 2f * num, innerBGRect.height - 2f * num);
                buttonLeftRect = new Rect(innerRect.x + innerRect.width * 0.03f, innerBGRect.yMax + num2 * 0.28f, innerRect.width * 0.45f, num2);
                buttonRightRect = new Rect(innerRect.xMax - innerRect.width * 0.48f, innerBGRect.yMax + num2 * 0.28f, innerRect.width * 0.45f, num2);

                outerRectfield.SetValue(clInventoryP2, outerRect);
                innerBGRectfield.SetValue(clInventoryP2, innerBGRect);
                innerRectfield.SetValue(clInventoryP2, innerRect);
                buttonLeftRectfield.SetValue(clInventoryP2, buttonLeftRect);
                buttonRightRectfield.SetValue(clInventoryP2, buttonRightRect);
                searchFieldRectfield.SetValue(clInventoryP2, searchFieldRect);

                //update clOfferP1
                outerRect = rectOfferP1;
                innerBGRect = new Rect(outerRect.x + margins.x, outerRect.y + margins.y, outerRect.width - (margins.x + margins.z), outerRect.height - (margins.y + margins.w));
                innerRect = new Rect(innerBGRect.x + num, innerBGRect.y + num, innerBGRect.width - 2f * num, innerBGRect.height - 2f * num);
                buttonLeftRect = new Rect(innerRect.x + innerRect.width * 0.03f, innerBGRect.yMax + num2 * 0.28f, innerRect.width * 0.45f, num2);
                buttonRightRect = new Rect(innerRect.xMax - innerRect.width * 0.48f, innerBGRect.yMax + num2 * 0.28f, innerRect.width * 0.45f, num2);

                outerRectfield.SetValue(clOfferP1, outerRect);
                innerBGRectfield.SetValue(clOfferP1, innerBGRect);
                innerRectfield.SetValue(clOfferP1, innerRect);
                buttonLeftRectfield.SetValue(clOfferP1, buttonLeftRect);
                buttonRightRectfield.SetValue(clOfferP1, buttonRightRect);
                searchFieldRectfield.SetValue(clOfferP1, searchFieldRect);

                //update clOfferP2
                outerRect = rectOfferP2;
                innerBGRect = new Rect(outerRect.x + margins.x, outerRect.y + margins.y, outerRect.width - (margins.x + margins.z), outerRect.height - (margins.y + margins.w));
                innerRect = new Rect(innerBGRect.x + num, innerBGRect.y + num, innerBGRect.width - 2f * num, innerBGRect.height - 2f * num);
                buttonLeftRect = new Rect(innerRect.x + innerRect.width * 0.03f, innerBGRect.yMax + num2 * 0.28f, innerRect.width * 0.45f, num2);
                buttonRightRect = new Rect(innerRect.xMax - innerRect.width * 0.48f, innerBGRect.yMax + num2 * 0.28f, innerRect.width * 0.45f, num2);

                outerRectfield.SetValue(clOfferP2, outerRect);
                innerBGRectfield.SetValue(clOfferP2, innerBGRect);
                innerRectfield.SetValue(clOfferP2, innerRect);
                buttonLeftRectfield.SetValue(clOfferP2, buttonLeftRect);
                buttonRightRectfield.SetValue(clOfferP2, buttonRightRect);
                searchFieldRectfield.SetValue(clOfferP2, searchFieldRect);

                this.p1rectsearchmenu = new Rect(outerArea1.x, outerArea1.y + outerArea1.height, outerArea1.width, this.menueheight);
                this.p2rectsearchmenu = new Rect(outerArea2.x, outerArea2.y + outerArea2.height, outerArea2.width, this.menueheight);

                this.p1searchrect = new Rect(p1rectsearchmenu.x + 5*num, p1rectsearchmenu.y + num+2, outerArea1.width/3, p1rectsearchmenu.height -  2f*num-4);
                this.p2searchrect = new Rect(p2rectsearchmenu.x + 5*num, p2rectsearchmenu.y + num+2, outerArea2.width / 3, p2rectsearchmenu.height - 2f*num-4);

                this.outerFrame1 = new ScrollsFrame(this.p1rectsearchmenu).AddNinePatch(ScrollsFrame.Border.DARK_CURVED, NinePatch.Patches.TOP | NinePatch.Patches.TOP_RIGHT | NinePatch.Patches.CENTER | NinePatch.Patches.RIGHT | NinePatch.Patches.BOTTOM | NinePatch.Patches.BOTTOM_RIGHT).AddNinePatch(ScrollsFrame.Border.DARK_SHARP, NinePatch.Patches.TOP_LEFT | NinePatch.Patches.LEFT | NinePatch.Patches.CENTER | NinePatch.Patches.BOTTOM_LEFT);
                this.outerFrame2 = new ScrollsFrame(this.p2rectsearchmenu).AddNinePatch(ScrollsFrame.Border.DARK_CURVED, NinePatch.Patches.TOP_LEFT | NinePatch.Patches.TOP | NinePatch.Patches.LEFT | NinePatch.Patches.CENTER | NinePatch.Patches.BOTTOM_LEFT | NinePatch.Patches.BOTTOM).AddNinePatch(ScrollsFrame.Border.DARK_SHARP, NinePatch.Patches.TOP_RIGHT | NinePatch.Patches.CENTER | NinePatch.Patches.RIGHT | NinePatch.Patches.BOTTOM_RIGHT);


                this.p1growthrect = new Rect(p1searchrect.x + p1searchrect.width + 3, p1rectsearchmenu.y + num + 2, p1rectsearchmenu.height - 2f * num - 4, p1rectsearchmenu.height - 2f * num - 4);
                this.p1orderrect = new Rect(p1growthrect.x + p1growthrect.width + 3, p1rectsearchmenu.y + num + 2, p1rectsearchmenu.height - 2f * num - 4, p1rectsearchmenu.height - 2f * num - 4);
                this.p1energyrect = new Rect(p1orderrect.x + p1orderrect.width + 3, p1rectsearchmenu.y + num + 2, p1rectsearchmenu.height - 2f * num - 4, p1rectsearchmenu.height - 2f * num - 4);
                this.p1decayrect = new Rect(p1energyrect.x + p1energyrect.width + 3, p1rectsearchmenu.y + num + 2, p1rectsearchmenu.height - 2f * num - 4, p1rectsearchmenu.height - 2f * num - 4);
                this.p1commonrect = new Rect(p1decayrect.x + p1decayrect.width + 3, p1rectsearchmenu.y + num + 2, p1rectsearchmenu.height - 2f * num - 4, p1rectsearchmenu.height - 2f * num - 4);
                this.p1uncommonrect = new Rect(p1commonrect.x + p1commonrect.width + 3, p1rectsearchmenu.y + num + 2, p1rectsearchmenu.height - 2f * num - 4, p1rectsearchmenu.height - 2f * num - 4);
                this.p1rarerect = new Rect(p1uncommonrect.x + p1uncommonrect.width + 3, p1rectsearchmenu.y + num + 2, p1rectsearchmenu.height - 2f * num - 4, p1rectsearchmenu.height - 2f * num - 4);
                this.p1mt3rect = new Rect(p1rarerect.x + p1rarerect.width + 3, p1rectsearchmenu.y + num + 2, p1rectsearchmenu.height - 2f * num - 4, p1rectsearchmenu.height - 2f * num - 4);
                this.p1clearrect = new Rect(p1rectsearchmenu.x + p1rectsearchmenu.width - p1rectsearchmenu.height-num, p1rectsearchmenu.y + num + 2, p1rectsearchmenu.height - 2f * num - 4, p1rectsearchmenu.height - 2f * num - 4);

                this.p2growthrect = new Rect(p2searchrect.x + p2searchrect.width + 3, p2rectsearchmenu.y + num + 2, p2rectsearchmenu.height - 2f * num - 4, p2rectsearchmenu.height - 2f * num - 4);
                this.p2orderrect = new Rect(p2growthrect.x + p2growthrect.width + 3, p2rectsearchmenu.y + num + 2, p2rectsearchmenu.height - 2f * num - 4, p2rectsearchmenu.height - 2f * num - 4);
                this.p2energyrect = new Rect(p2orderrect.x + p2orderrect.width + 3, p2rectsearchmenu.y + num + 2, p2rectsearchmenu.height - 2f * num - 4, p2rectsearchmenu.height - 2f * num - 4);
                this.p2decayrect = new Rect(p2energyrect.x + p2energyrect.width + 3, p2rectsearchmenu.y + num + 2, p2rectsearchmenu.height - 2f * num - 4, p2rectsearchmenu.height - 2f * num - 4);
                this.p2commonrect = new Rect(p2decayrect.x + p2decayrect.width + 3, p2rectsearchmenu.y + num + 2, p2rectsearchmenu.height - 2f * num - 4, p2rectsearchmenu.height - 2f * num - 4);
                this.p2uncommonrect = new Rect(p2commonrect.x + p2commonrect.width + 3, p2rectsearchmenu.y + num + 2, p2rectsearchmenu.height - 2f * num - 4, p2rectsearchmenu.height - 2f * num - 4);
                this.p2rarerect = new Rect(p2uncommonrect.x + p2uncommonrect.width + 3, p2rectsearchmenu.y + num + 2, p2rectsearchmenu.height - 2f * num - 4, p2rectsearchmenu.height - 2f * num - 4);
                this.p2mt3rect = new Rect(p2rarerect.x + p2rarerect.width + 3, p2rectsearchmenu.y + num + 2, p2rectsearchmenu.height - 2f * num - 4, p2rectsearchmenu.height - 2f * num - 4);
                this.p2clearrect = new Rect(p2rectsearchmenu.x + p2rectsearchmenu.width - p2rectsearchmenu.height-num, p2rectsearchmenu.y + num + 2, p2rectsearchmenu.height - 2f * num - 4, p2rectsearchmenu.height - 2f * num - 4);
                


            }

            if (info.target is TradeSystem && info.targetMethod.Equals("OnGUI"))//draw menu
            {
                //int state = (int)typeof(TradeSystem).GetField("state", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(info.target);
                if (trading)
                {
                    outerFrame1.Draw();
                    outerFrame2.Draw();
                    Color dblack = new Color(1f, 1f, 1f, 0.2f);
                    GUI.color = new Color(1f, 1f, 1f, 0.6f);
                    GUI.skin = this.chatButtonSkin;
                    GUI.Box(this.p1searchrect, string.Empty);
                    GUI.Box(this.p2searchrect, string.Empty);
                    GUI.color = Color.white;
                    string selfcopy = this.selfsearchstring;
                    string oppocopy = this.opposearchstring;
                    this.selfsearchstring = GUI.TextField(this.p1searchrect, this.selfsearchstring, this.chatLogStyle);
                    this.opposearchstring = GUI.TextField(this.p2searchrect, this.opposearchstring, this.chatLogStyle);

                    GUI.contentColor = Color.white;
                    GUI.color = Color.white;
                    if (!p1growthbool) { GUI.color = dblack; }
                    bool p1growthclick = GUI.Button(p1growthrect, growthres);
                    GUI.color = Color.white;
                    if (!p1orderbool) { GUI.color = dblack; }
                    bool p1orderclick = GUI.Button(p1orderrect, orderres);
                    GUI.color = Color.white;
                    if (!p1energybool) { GUI.color = dblack; }
                    bool p1energyclick = GUI.Button(p1energyrect, energyres);
                    GUI.color = Color.white;
                    if (!p1decaybool) { GUI.color = dblack; }
                    bool p1decayclick = GUI.Button(p1decayrect, decayres);
                    GUI.color = Color.white;
                    if (!p1commonbool) { GUI.color = dblack; }
                    GUI.contentColor = Color.gray;
                    bool p1commonclick = GUI.Button(p1commonrect,"C");
                    GUI.color = Color.white;
                    if (!p1uncommonbool) { GUI.color = dblack; }
                    GUI.contentColor = Color.white;
                    bool p1uncommonclick = GUI.Button(p1uncommonrect, "U");
                    GUI.color = Color.white;
                    if (!p1rarebool) { GUI.color = dblack; }
                    GUI.contentColor = Color.yellow;
                    bool p1rareclick = GUI.Button(p1rarerect, "R");
                    GUI.contentColor = Color.white;
                    GUI.color = Color.white;
                    if (!p1mt3bool) { GUI.color = dblack; }
                    bool p1mt3click = GUI.Button(p1mt3rect, ">3");
                    GUI.color = Color.white;
                    GUI.contentColor = Color.red;
                    bool p1closeclick = GUI.Button(p1clearrect, "X");

                    if (p1growthclick) { p1growthbool = !p1growthbool; };
                    if (p1orderclick) { p1orderbool = !p1orderbool; }
                    if (p1energyclick) { p1energybool = !p1energybool; };
                    if (p1decayclick) { p1decaybool = !p1decaybool; }
                    if (p1commonclick) { p1commonbool = !p1commonbool; };
                    if (p1uncommonclick) { p1uncommonbool = !p1uncommonbool; }
                    if (p1rareclick) { p1rarebool = !p1rarebool; };
                    if (p1mt3click) { p1mt3bool = !p1mt3bool; }
                    if (p1closeclick) 
                    {
                        this.selfsearchstring = "";
                        this.p1cf = CardFilter.from("");
                        p1growthbool = true;
                        p1orderbool = true;
                        p1energybool = true;
                        p1decaybool = true;
                        p1commonbool = true;
                        p1uncommonbool = true;
                        p1rarebool = true;
                        p1mt3bool = false;
                    }

                    //clear p1moddedlist only if necessary
                    if (selfcopy != this.selfsearchstring || p1closeclick || (p1growthclick && p1growthbool) || (p1orderclick && p1orderbool) || (p1energyclick && p1energybool) || (p1decayclick && p1decaybool) || (p1commonclick && p1commonbool) || (p1uncommonclick && p1uncommonbool) || (p1rareclick && p1rarebool) || p1mt3click)
                    {
                        //Console.WriteLine("delete dings####");
                        this.p1moddedlist.Clear();
                        this.p1moddedlist.AddRange(this.orgicardsPlayer1);
                        string[] res = { "", "", "", "" };
                        if (p1decaybool) { res[0] = "decay"; };
                        if (p1energybool) { res[1] = "energy"; };
                        if (p1growthbool) { res[2] = "growth"; };
                        if (p1orderbool) { res[3] = "order"; };
                        int[] rare = { -1, -1, -1 };
                        if (p1rarebool) { rare[2] = 2; };
                        if (p1uncommonbool) { rare[1] = 1; };
                        if (p1commonbool) { rare[0] = 0; };
                        if (this.p1mt3bool)
                        {
                            this.searchmorethan3();
                        }
                        this.onlytradeableself();
                        this.p1cf = CardFilter.from("");
                        if (this.selfsearchstring != "")
                        {
                            this.p1cf = CardFilter.from(this.selfsearchstring);
                            this.containsname(this.selfsearchstring);
                        }
                        this.searchforownenergy(res);
                        this.searchforownrarity(rare);
                        this.updatetradeself();

                    }
                    else
                    {

                        if (selfcopy != this.selfsearchstring )
                        {
                            this.p1cf = CardFilter.from("");
                            if (this.selfsearchstring != "")
                            {
                                this.p1cf = CardFilter.from(this.selfsearchstring);
                                this.containsname(this.selfsearchstring);
                                this.updatetradeself();
                            }
                            

                        }
                        if (p1growthclick || p1orderclick || p1energyclick || p1decayclick )
                        {
                            string[] res = { "", "", "", "" };
                            if (p1decaybool) { res[0] = "decay"; };
                            if (p1energybool) { res[1] = "energy"; };
                            if (p1growthbool) { res[2] = "growth"; };
                            if (p1orderbool) { res[3] = "order"; };
                            this.searchforownenergy(res);
                            this.updatetradeself();

                        }
                        if (p1commonclick || p1uncommonclick || p1rareclick)
                        {

                            int[] rare = { -1, -1, -1 };
                            if (p1rarebool) { rare[2] = 2; };
                            if (p1uncommonbool) { rare[1] = 1; };
                            if (p1commonbool) { rare[0] = 0; };
                            this.searchforownrarity(rare);
                            this.updatetradeself();
                        }
                        
                    }

                    GUI.contentColor = Color.white;
                    GUI.color = Color.white;
                    if (!p2growthbool) { GUI.color = dblack; }
                    bool p2growthclick = GUI.Button(p2growthrect, growthres );
                    GUI.color = Color.white;
                    if (!p2orderbool) { GUI.color = dblack; }
                    bool p2orderclick = GUI.Button(p2orderrect, orderres);
                    GUI.color = Color.white;
                    if (!p2energybool) { GUI.color = dblack; }
                    bool p2energyclick = GUI.Button(p2energyrect, energyres);
                    GUI.color = Color.white;
                    if (!p2decaybool) { GUI.color = dblack; }
                    bool p2decayclick = GUI.Button(p2decayrect, decayres);
                    GUI.color = Color.white;
                    if (!p2commonbool) { GUI.color = dblack; }
                    GUI.contentColor = Color.gray;
                    bool p2commonclick = GUI.Button(p2commonrect, "C");
                    GUI.color = Color.white;
                    if (!p2uncommonbool) { GUI.color = dblack; }
                    GUI.contentColor = Color.white;
                    bool p2uncommonclick = GUI.Button(p2uncommonrect, "U");
                    GUI.color = Color.white;
                    if (!p2rarebool) { GUI.color = dblack; }
                    GUI.contentColor = Color.yellow;
                    bool p2rareclick = GUI.Button(p2rarerect, "R");
                    GUI.contentColor = Color.white;
                    GUI.color = Color.white;
                    if (!p2mt3bool) { GUI.color = dblack; }
                    bool p2mt3click = GUI.Button(p2mt3rect, ">3");
                    GUI.color = Color.white;
                    GUI.contentColor = Color.red;
                    bool p2closeclick = GUI.Button(p2clearrect, "X");

                    if (p2growthclick) { p2growthbool = !p2growthbool; };
                    if (p2orderclick) { p2orderbool = !p2orderbool; }
                    if (p2energyclick) { p2energybool = !p2energybool; };
                    if (p2decayclick) { p2decaybool = !p2decaybool; }
                    if (p2commonclick) { p2commonbool = !p2commonbool; };
                    if (p2uncommonclick) { p2uncommonbool = !p2uncommonbool; }
                    if (p2rareclick) { p2rarebool = !p2rarebool; };
                    if (p2mt3click) { p2mt3bool = !p2mt3bool; }
                    if (p2closeclick)
                    {
                        this.opposearchstring = "";
                        this.p2cf = CardFilter.from("");
                        p2growthbool = true;
                        p2orderbool = true;
                        p2energybool = true;
                        p2decaybool = true;
                        p2commonbool = true;
                        p2uncommonbool = true;
                        p2rarebool = true;
                        p2mt3bool = false;
                    }

                    //clear p1moddedlist only if necessary
                    if (oppocopy != this.opposearchstring || p2closeclick || (p2growthclick && p2growthbool) || (p2orderclick && p2orderbool) || (p2energyclick && p2energybool) || (p2decayclick && p2decaybool) || (p2commonclick && p2commonbool) || (p2uncommonclick && p2uncommonbool) || (p2rareclick && p2rarebool) || p2mt3click)
                    {
                        //Console.WriteLine("delete dings####");
                        this.p2moddedlist.Clear();
                        this.p2moddedlist.AddRange(this.orgicardsPlayer2);

                        string[] res = { "", "", "", "" };
                        if (p2decaybool) { res[0] = "decay"; };
                        if (p2energybool) { res[1] = "energy"; };
                        if (p2growthbool) { res[2] = "growth"; };
                        if (p2orderbool) { res[3] = "order"; };
                        int[] rare = { -1, -1, -1 };
                        if (p2rarebool) { rare[2] = 2; };
                        if (p2uncommonbool) { rare[1] = 1; };
                        if (p2commonbool) { rare[0] = 0; };

                        this.onlytradeableoppo();
                        this.p2cf = CardFilter.from("");
                        if (this.opposearchstring != "")
                        {
                            this.p2cf = CardFilter.from(this.opposearchstring);
                            this.containsopponentname(this.opposearchstring);
                        }
                        this.searchforoppoenergy(res);
                        this.searchforopporarity(rare);
                        if (this.p2mt3bool)
                        {
                            this.searchmorethan3oppo();
                        }

                        this.updatetradeoppo();

                    }
                    else
                    {

                        if (oppocopy != this.opposearchstring)
                        {
                            this.p2cf = CardFilter.from("");
                            if (this.opposearchstring != "")
                            {
                                this.p2cf = CardFilter.from(this.opposearchstring);
                                this.containsopponentname(this.opposearchstring);
                                this.updatetradeoppo();
                            }


                        }
                        if (p2growthclick || p2orderclick || p2energyclick || p2decayclick)
                        {
                            string[] res = { "", "", "", "" };
                            if (p2decaybool) { res[0] = "decay"; };
                            if (p2energybool) { res[1] = "energy"; };
                            if (p2growthbool) { res[2] = "growth"; };
                            if (p2orderbool) { res[3] = "order"; };
                            this.searchforoppoenergy(res);
                            this.updatetradeoppo();

                        }
                        if (p2commonclick || p2uncommonclick || p2rareclick)
                        {

                            int[] rare = { -1, -1, -1 };
                            if (p2rarebool) { rare[2] = 2; };
                            if (p2uncommonbool) { rare[1] = 1; };
                            if (p2commonbool) { rare[0] = 0; };
                            this.searchforopporarity(rare);
                            this.updatetradeoppo();
                        }

                    }

                    /*
                    if (oppocopy != this.opposearchstring || p2growthclick || p2orderclick || p2energyclick || p2decayclick || p2commonclick || p2uncommonclick || p2rareclick || p2mt3click || p2closeclick)
                    {
                        this.p2moddedlist.Clear();
                        this.p2moddedlist.AddRange(this.orgicardsPlayer2);

                        string[] res = { "", "", "", "" };
                        if (p2decaybool) { res[0] = "decay"; };
                        if (p2energybool) { res[1] = "energy"; };
                        if (p2growthbool) { res[2] = "growth"; };
                        if (p2orderbool) { res[3] = "order"; };
                        int[] rare = { -1, -1, -1 };
                        if (p2rarebool) { rare[2] = 2; };
                        if (p2uncommonbool) { rare[1] = 1; };
                        if (p2commonbool) { rare[0] = 0; };

                        this.onlytradeableoppo();
                        if (this.opposearchstring != "")
                        {
                            this.containsopponentname(this.opposearchstring);
                        }
                        this.searchforoppoenergy(res);
                        this.searchforopporarity(rare);
                        if (this.p2mt3bool)
                        {
                            this.searchmorethan3oppo();
                        }

                        this.updatetrade();

                    }*/
                }
            }

            if (info.target is Lobby && info.targetMethod.Equals("Start"))
            {
                //Console.WriteLine("startlobby");
                if (lby == null)
                {
                    lby = (Lobby)info.target;
                    lbyinfo = info;
                    this.p1cards = (List<Card>)cardsPlayer1field.GetValue(lbyinfo.target);
                    this.p2cards = (List<Card>)cardsPlayer2field.GetValue(lbyinfo.target);
                    anzupdates = 0;
                    this.searchedself = false;
                    this.searchedoppo = false;

                }


            }

            if (info.target is TradeSystem && info.targetMethod.Equals("SetTradeRoomName"))
            {
                this.traderoomname = (string)info.arguments[0];


            }


            if (info.target is TradeSystem && info.targetMethod.Equals("StartTrade"))
            {
                //Console.WriteLine("STARTTRAD2E");
                if (ts == null)
                {
                    trading = true;
                    ts = (TradeSystem)info.target;
                    this.p1moddedlist.Clear();
                    this.p2moddedlist.Clear();
                    this.orginalp1name = (string)info.arguments[2];
                    this.orginalp2name = (string)info.arguments[3];
                    this.orginalint = (int)info.arguments[4];
                    this.selfsearchstring = "";
                    this.opposearchstring = "";
                    

                }


            }

            if (info.target is TradeSystem && info.targetMethod.Equals("UpdateView"))
            {
                //Console.WriteLine("updateview"+anzupdates.ToString());
                if ((Boolean)info.arguments[0] == false && this.anzupdates<=1)
                {
                    

                    this.orgicardsPlayer1.Clear();
                    this.orgicardsPlayer2.Clear();
                    this.orgicardsPlayer1.AddRange(p1cards);
                    this.orgicardsPlayer2.AddRange(p2cards);
                    this.p1moddedlist.Clear();
                    this.p2moddedlist.Clear();
                    this.p1moddedlist.AddRange(this.orgicardsPlayer1);
                    this.p2moddedlist.AddRange(this.orgicardsPlayer2);
                    
                    //Console.WriteLine("cards");
                    //foreach (Card c in this.orgicardsPlayer1) { Console.WriteLine(c.getName()); };
                    //foreach (Card c in this.orgicardsPlayer2) { Console.WriteLine(c.getName()); };


                    //Rect outerArea1 = (Rect)typeof(Lobby).GetField("outerArea1", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(lbyinfo.target);

                    //Console.WriteLine("outer area" + outerArea1.height);


                    if (anzupdates == 1) // only show at the second time (first time you get own cards, second time you get opponent cards)
                    {
                        this.onlytradeable();
                        this.updatetrade();
                    }
                    
                }
                anzupdates++;
                //collect tradeview changes:
                if ((Boolean)info.arguments[0] == true)
                {
                    this.player1 = (TradeInfo)info.arguments[1];
                    this.player2 = (TradeInfo)info.arguments[2];
                    this.updatetrade();
                }
            }

            if (info.target is TradeSystem && info.targetMethod.Equals("CloseTrade"))
            {
                ts = null;
                lby = null;
                player1 = new TradeInfo();
                player2 = new TradeInfo();
                trading = false;
                this.traderoomname = "";

            }




            return;
        }
Esempio n. 5
0
        //icardlistcallback

        public void ButtonClicked(CardListPopup popup, ECardListButton button)
        {
        }
Esempio n. 6
0
 public void ItemClicked(CardListPopup popup, Card card)
 {
 }
Esempio n. 7
0
 public void ItemHovered(CardListPopup popup, Card card)
 {
 }
Esempio n. 8
0
        public void ButtonClicked(CardListPopup popup, ECardListButton button, List<Card> selectedCards)
        {

        }
Esempio n. 9
0
        //icardlistcallback

        public void ButtonClicked(CardListPopup popup, ECardListButton button)
        {

        }
Esempio n. 10
0
        private void addall(CardListPopup infotarget)
        {
            classdata dis = cardlists[infotarget];
            // (CardListPopup)typeof(TradeSystem).GetField("clInventoryP1", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(infotarget);
            
            dis.lobbySkin = (GUISkin)Resources.Load("_GUISkins/Lobby");

            
            dis.cardListPopupSkin = (GUISkin)Resources.Load("_GUISkins/CardListPopup");
            dis.cardListPopupGradientSkin = (GUISkin)Resources.Load("_GUISkins/CardListPopupGradient");
            dis.cardListPopupBigLabelSkin = (GUISkin)Resources.Load("_GUISkins/CardListPopupBigLabel");
            dis.cardListPopupLeftButtonSkin = (GUISkin)Resources.Load("_GUISkins/CardListPopupLeftButton");
            dis.outerRect = (Rect)typeof(CardListPopup).GetField("outerRect", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(infotarget);
            dis.innerBGRect = (Rect)typeof(CardListPopup).GetField("innerBGRect", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(infotarget);
            dis.innerRect = (Rect)typeof(CardListPopup).GetField("innerRect", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(infotarget);
            dis.buttonLeftRect = (Rect)typeof(CardListPopup).GetField("buttonLeftRect", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(infotarget);
            dis.buttonRightRect = (Rect)typeof(CardListPopup).GetField("buttonRightRect", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(infotarget);
            dis.selectable = (bool)typeof(CardListPopup).GetField("selectable", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(infotarget);
	        dis.BOTTOM_MARGIN_EXTRA=(float)Screen.height * 0.047f;
            dis.margins = (Vector4)typeof(CardListPopup).GetField("margins", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(infotarget);
            dis.bottomMargin= 0.08f;

            dis.cards = (List<Card>)typeof(CardListPopup).GetField("cards", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(infotarget);
            dis.selectedCards = (List<Card>)typeof(CardListPopup).GetField("selectedCards", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(infotarget);
            dis.callback = (ICardListCallback)typeof(CardListPopup).GetField("callback", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(infotarget);
            dis.buttonLeftContent = (GUIContent)typeof(CardListPopup).GetField("buttonLeftContent", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(infotarget);
            dis.buttonRightContent = (GUIContent)typeof(CardListPopup).GetField("buttonRightContent", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(infotarget);
            dis.itemButtonTexture = (Texture)typeof(CardListPopup).GetField("itemButtonTexture", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(infotarget);
            dis.leftButtonEnabled = (bool)typeof(CardListPopup).GetField("leftButtonEnabled", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(infotarget);
            dis.rightButtonEnabled = (bool)typeof(CardListPopup).GetField("rightButtonEnabled", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(infotarget);
            dis.showFrame = (bool)typeof(CardListPopup).GetField("showFrame", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(infotarget);
            dis.scrollBarSize= 20f;

            dis.leftButtonHighlighted = (bool)typeof(CardListPopup).GetField("leftButtonHighlighted", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(infotarget);
            dis.rightButtonHighlighted = (bool)typeof(CardListPopup).GetField("rightButtonHighlighted", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(infotarget);
            dis.leftHighlightable = (bool)typeof(CardListPopup).GetField("leftHighlightable", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(infotarget);
            dis.rightHighlightable = (bool)typeof(CardListPopup).GetField("rightHighlightable", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(infotarget);
            dis.bgBar = (Texture2D)typeof(CardListPopup).GetField("bgBar", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(infotarget);
            dis.fieldHeight = (float)typeof(CardListPopup).GetField("fieldHeight", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(infotarget);
            dis.costIconSize = (float)typeof(CardListPopup).GetField("costIconSize", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(infotarget);
            dis.costIconWidth = (float)typeof(CardListPopup).GetField("costIconWidth", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(infotarget);
            dis.costIconHeight = (float)typeof(CardListPopup).GetField("costIconHeight", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(infotarget);
            dis.cardHeight = (float)typeof(CardListPopup).GetField("cardHeight", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(infotarget);
            dis.cardWidth = (float)typeof(CardListPopup).GetField("cardWidth", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(infotarget);
            dis.labelX = (float)typeof(CardListPopup).GetField("labelX", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(infotarget);
            dis.labelsWidth = (float)typeof(CardListPopup).GetField("labelsWidth", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(infotarget);
            dis.maxCharsName = (int)typeof(CardListPopup).GetField("maxCharsName", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(infotarget);
            dis.maxCharsRK = (int)typeof(CardListPopup).GetField("maxCharsRK", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(infotarget);
            dis.offX = (float)typeof(CardListPopup).GetField("offX", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(infotarget);
            dis.opacity = (float)typeof(CardListPopup).GetField("opacity", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(infotarget);
            dis.clickableItems = (bool)typeof(CardListPopup).GetField("clickableItems", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(infotarget);
        }