GUIControl is an abstract class that provides all basic functionality to the rest of RamGec XNA Controls

 

Usage

 

// GUIControl class cannot be created directly, but all RamGec XNA Controls extends it
GUIControl myControl = new Label(new Rectangle(50, 50, 0, 0));

// all controls support Hint property:
// if set, on right mouse click - hint tooltip will be displayed
myControl.Hint = "Tooltip text";

// some generic options
myControl.Enabled = false;
myControl.Visible = true;
myControl.Transparency = 0.5f;

// handle events
myControl.OnMouseMove += new GUIControl.MouseMoveEventHandler(myControl_OnMouseMove);

// continue adding controls and building hierarchy tree
myControl.Controls.Add(myOtherControl);

Last edited Apr 4, 2012 at 2:50 AM by qisur, version 2

Comments

No comments yet.