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); }
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; } }
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; } }
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 ); }