示例#1
0
        public void InitButtons()
        {
            Vector2 buttonPosition = new Vector2(FormSize.X - 15f, 5f) + FormPos;
            Color   buttonColor    = new Color(new Vector4(new Vector3(0.3f) + ColorBackground.ToVector3() * 0.6f, 1.0f));

            if (CanClose)
            {
                BtnClose = new ButtonSimple("btClose", buttonPosition, "button_close", FormStyle);
                BtnClose.OnMouseRelease += new EventHandler(closeButton_onMouseRelease);
            }

            if (CanMini)
            {
                BtnMini = new ButtonSimple("btMinimize", buttonPosition - new Vector2(25, 0f), "button_minimize", FormStyle);
                BtnMini.OnMouseRelease += new EventHandler(minimizeButton_onMouseRelease);
            }

            if (CanMaxi)
            {
                BtnMaxi = new ButtonSimple("btMaximize", buttonPosition - new Vector2(15, 0f), "button_maximize", FormStyle);
                BtnMaxi.OnMouseRelease += new EventHandler(maximizeButton_onMouseRelease);
            }

            BtnRestore = new ButtonSimple("btRestore", buttonPosition - new Vector2(15, 0f), "button_restore", FormStyle);
            BtnRestore.OnMouseRelease += new EventHandler(maximizeButton_onMouseRelease);
        }
示例#2
0
		public override void InitDefaults() {
			switch( ScrollBarAxis ) {
				case EScrollBarAxis.Horizontal:
					scrollUp = new ButtonSimple( "btScrollUp", Vector2.Zero, "scroll_up", WindowStyle );
					scrollDown = new ButtonSimple( "btScrollDown", Vector2.Zero, "scroll_down", WindowStyle );
					break;
				case EScrollBarAxis.Vertical:
					scrollUp = new ButtonSimple( "btScrollUp", Vector2.Zero, "scroll_left", WindowStyle );
					scrollDown = new ButtonSimple( "btScrollDown", Vector2.Zero, "scroll_right", WindowStyle );
					break;
			}
		}
示例#3
0
        public override void InitDefaults()
        {
            switch (ScrollBarAxis)
            {
            case EScrollBarAxis.Horizontal:
                scrollUp   = new ButtonSimple("btScrollUp", Vector2.Zero, "scroll_up", WindowStyle);
                scrollDown = new ButtonSimple("btScrollDown", Vector2.Zero, "scroll_down", WindowStyle);
                break;

            case EScrollBarAxis.Vertical:
                scrollUp   = new ButtonSimple("btScrollUp", Vector2.Zero, "scroll_left", WindowStyle);
                scrollDown = new ButtonSimple("btScrollDown", Vector2.Zero, "scroll_right", WindowStyle);
                break;
            }
        }
示例#4
0
文件: Form.cs 项目: GodLesZ/svn-dump
		public void InitButtons() {
			Vector2 buttonPosition = new Vector2( FormSize.X - 15f, 5f ) + FormPos;
			Color buttonColor = new Color( new Vector4( new Vector3( 0.3f ) + ColorBackground.ToVector3() * 0.6f, 1.0f ) );

			if( CanClose ) {
				BtnClose = new ButtonSimple( "btClose", buttonPosition, "button_close", FormStyle );
				BtnClose.OnMouseRelease += new EventHandler( closeButton_onMouseRelease );
			}

			if( CanMini ) {
				BtnMini = new ButtonSimple( "btMinimize", buttonPosition - new Vector2( 25, 0f ), "button_minimize", FormStyle );
				BtnMini.OnMouseRelease += new EventHandler( minimizeButton_onMouseRelease );
			}

			if( CanMaxi ) {
				BtnMaxi = new ButtonSimple( "btMaximize", buttonPosition - new Vector2( 15, 0f ), "button_maximize", FormStyle );
				BtnMaxi.OnMouseRelease += new EventHandler( maximizeButton_onMouseRelease );
			}

			BtnRestore = new ButtonSimple( "btRestore", buttonPosition - new Vector2( 15, 0f ), "button_restore", FormStyle );
			BtnRestore.OnMouseRelease += new EventHandler( maximizeButton_onMouseRelease );
		}