Example #1
0
        public override void OnInitialize()
        {
            base.OnInitialize();
            var width  = choices.Count * SKILL_FRAME_DISTANCE + 2 * SKILL_FRAME_DISTANCE;
            var height = 100;

            skillPanel = new SkillPanel
            {
                HAlign = 0.5f,
                VAlign = 0.5f
            };
            skillPanel.Width.Set(width, 0f);
            skillPanel.Height.Set(height, 0f);

            skillPanel.BackgroundColor = BACKGROUD_PANEL_COLOR;
            List <SkillButton> panels = choices
                                        .Select(choice => SkillButton.getSkillButton(choice, skill => onWayPicked.Invoke(skill as Way)))
                                        .ToList();

            foreach (int i in Enumerable.Range(0, panels.Count))
            {
                var currentPanel = panels[i];
                currentPanel.Left.Set((i + 1) * SKILL_FRAME_DISTANCE, 0f);
                currentPanel.VAlign = 0.5f;
                skillPanel.Append(currentPanel);
            }

            Append(skillPanel);
        }
Example #2
0
        public static SkillPanel getSkillFrame()
        {
            var skillFrame = new SkillPanel();

            skillFrame.Width.Set(SKILL_FRAME_SIZE, 0);
            skillFrame.Height.Set(SKILL_FRAME_SIZE, 0);
            return(skillFrame);
        }
Example #3
0
        public override void OnInitialize()
        {
            base.OnInitialize();
            var width  = 900f;
            var height = 700f;

            skillPanel = new SkillPanel
            {
                HAlign = 0.5f,
                VAlign = 0.5f
            };
            skillPanel.Width.Set(width, 0f);
            skillPanel.Height.Set(height, 0f);

            skillPanel.BackgroundColor = BACKGROUD_PANEL_COLOR;

            Append(skillPanel);
        }