예제 #1
0
            public TradeChoice(List<Resource> _choices, Vector2 position)
            {
                choices = new Dictionary<Resource, Visual>();
                spliters = new List<Visual>();

                int i = 0;
                foreach (Resource r in _choices)
                {
                    if (i > 0)
                    {
                        Visual v = new Visual(position + new Vector2((RSIZE * 2 + MARGIN) * i - RSIZE, 0), RSIZE, RSIZE, "rsplit");
                        v.LoadContent();
                        spliters.Add(v);
                    }
                    choices.Add(r, new Visual(position + new Vector2((RSIZE * 2 + MARGIN) * i, 0), RSIZE, RSIZE, r.ToString()));
                    choices[r].LoadContent();
                    i++;
                }
                glow = new Visual(position, RSIZE, RSIZE, "rglow");
                glow.LoadContent();
                glow.setVisible(false);
            }