コード例 #1
0
        public G_ObjSelect(Vector2 pos, float depth = 0f)
        {
            this.posL  = pos;
            this.depth = 0f;
            this.size  = new Vector2(16, 16);
            this.depth = depth;

            btn        = new G_B_Text(new M_Rectangle(0, 0, 16, 16), "P", PressLeft, true, ContentLoader.fonts["lato-thin-mod_10"], null, depth);
            btn.parent = this;
        }
コード例 #2
0
ファイル: G_Enum.cs プロジェクト: bytinggames/BotChallenge
        private void Initialize()
        {
            btn_Arrow = new G_B_Sprite(new M_Rectangle(new Vector2(size.X - size.Y, 0), new Vector2(size.Y)),
                                       new Sprite(Vector2.Zero, ContentLoader.textures["btn_arrowdown"])
                                       , BtnArrowPressLeft, true, depth)
            {
                parent = this
            };
            //btn_Arrow.PressRight += BtnArrowPressRight;

            btn_Text             = new G_B_Text(new M_Rectangle(Vector2.Zero, new Vector2(size.X - size.Y, size.Y)), "", BtnTextPressLeft, false, null, null, depth);
            btn_Text.PressRight += BtnTextPressRight;

            btn_Enums = new List <G_Button>();

            ValueChanged = MyValueChanged;

            //SetEnumType(typeof(MouseCatched));
            //enumValue = (Enum)Enum.GetValues(enumType).GetValue(1);
            //ValueChanged(enumValue);
        }
コード例 #3
0
        private void Initialize()
        {
            btn = new G_B_Text(new M_Rectangle(new Vector2(size.X - size.Y, 0), new Vector2(size.Y)), "", BtnPressLeft, false, null, null, depth)
            {
                parent = this
            };
            btn.PressRight += BtnPressRight;
            if (color.HasValue)
            {
                btn.colorHover = btn.colorHoverPressed = btn.colorNormal = btn.colorPressed = color.Value;
            }

            txt = new G_TextBox(new M_Rectangle(new Vector2(0, 0), new Vector2(size.X - size.Y, size.Y)), TextChanged, new KeyCollection().AddHex(), 6, depth)
            {
                parent = this
            };

            if (color.HasValue)
            {
                txt.text = MyConverter.ToString(color.Value);
            }

            ValueChanged = MyColorChanged;
        }
コード例 #4
0
ファイル: G_B_Text.cs プロジェクト: bytinggames/BotChallenge
        public new G_B_Text CloneChild(GuiElement parent)
        {
            G_B_Text clone = (G_B_Text)base.Clone(parent);

            return(clone);
        }