// Default constructor
	public UIAbstractTouchableContainer( UIToolkit manager, UILayoutType layoutType, int spacing ) : base( layoutType )
	{
		_spacing = spacing;
		_manager = manager;
		
		_manager.addToTouchables( this );
	}
示例#2
0
    /// <summary>
    /// We need the layout type set from the getgo so we can lay things out properly
    /// </summary>
    public UIAbstractContainer(UILayoutType layoutType)
    {
        _layoutType = layoutType;

        // listen to changes to our own transform so we can move the touchFrame
        this.onTransformChanged += transformChanged;
    }
	/// <summary>
	/// We need the layout type set from the getgo so we can lay things out properly
	/// </summary>
	public UIAbstractContainer( UILayoutType layoutType )
	{
        _layoutType = layoutType;

        // listen to changes to our own transform so we can move the touchFrame
        this.onTransformChanged += transformChanged;
	}
    // Default constructor
    public UIAbstractTouchableContainer(UIToolkit manager, UILayoutType layoutType, int spacing) : base(layoutType)
    {
        _spacing = spacing;
        _manager = manager;

        _manager.addToTouchables(this);
    }
	// Default constructor
	public UIAbstractTouchableContainer( UIToolkit manager, UILayoutType layoutType, int spacing ) : base( layoutType )
	{
		TOUCH_MAX_DELTA_FOR_ACTIVATION *= UI.scaleFactor;
		_spacing = spacing * UI.scaleFactor;
		_manager = manager;
		
		_manager.addToTouchables( this );
	}
    // Default constructor
    public UIAbstractTouchableContainer(UIToolkit manager, UILayoutType layoutType, int spacing) : base(layoutType)
    {
        TOUCH_MAX_DELTA_FOR_ACTIVATION *= UI.scaleFactor;
        _spacing = spacing * UI.scaleFactor;
        _manager = manager;

        _manager.addToTouchables(this);
    }
 public UIComponentRenderingInput(float xBottomLeft, float yBottomLeft, float xTopRight, float yTopRight, UILayoutType layoutType)
 {
     this.xBottomLeft = xBottomLeft;
     this.yBottomLeft = yBottomLeft;
     this.xTopRight = xTopRight;
     this.yTopRight = yTopRight;
     this.layoutType = layoutType;
 }
	// Default constructor
	public UIAbstractTouchableContainer( UIToolkit manager, UILayoutType layoutType, int spacing ) : base( layoutType )
	{
		_spacing = spacing;
		_manager = manager;
		
		_manager.addToTouchables( this );
		
		// listen to changes to our own transform so we can move the touchFrame
		this.onTransformChanged += transformChanged;
	}
        public UIStaticButton(float xStart,
		                      float yStart,
		                      float xWidth,
		                      float yHeight,
		                      UIComponentGroup parentComponentGroup,
		                      UILayoutType layoutType,
		                      UIAnchorLocation anchorLocation,
		                      IUIButtonListener buttonListener)
            : this("", xStart, yStart, xWidth, yHeight, parentComponentGroup, layoutType, anchorLocation, buttonListener)
        {
            SetName(Id.ToString());
        }
示例#10
0
        public UIRenderable(string componentName,
		                    float xStart,
		                    float yStart,
		                    float xWidth,
		                    float yHeight,
		                    UIComponentGroup parentComponentGroup,
		                    UILayoutType layoutType,
		                    UIAnchorLocation anchorLocation)
            : base(componentName, xStart, yStart, xWidth, yHeight, parentComponentGroup, layoutType, anchorLocation)
        {
            m_componentType = UIComponentType.RENDERABLE;
        }
        public UIButtonHitBox(float xStart,
		                      float yStart,
		                      float xWidth,
		                      float yHeight,
		                      UIButton parentComponentGroup,
		                      UILayoutType layoutType,
		                      UIAnchorLocation anchorLocation)
        {
            m_anchor = new UIAnchor(anchorLocation, xStart, yStart, xWidth, yHeight);

            m_parentComponentGroup = parentComponentGroup;
        }
        public UITextureLabel(float xStart,
		                      float yStart,
		                      float xWidth,
		                      float yHeight,
		                      UIComponentGroup parentComponentGroup,
		                      UILayoutType layoutType,
		                      UIAnchorLocation anchorLocation,
		                      Texture2D texture2D)
            : this("", xStart, yStart, xWidth, yHeight, parentComponentGroup, layoutType, anchorLocation, texture2D)
        {
            SetName(Id.ToString());
        }
        public UIStaticButton(string componentName,
		                      float xStart,
		                      float yStart,
		                      float xWidth,
		                      float yHeight,
		                      UIComponentGroup parentComponentGroup,
		                      UILayoutType layoutType,
		                      UIAnchorLocation anchorLocation,
		                      IUIButtonListener buttonListener)
            : base(componentName, xStart, yStart, xWidth, yHeight, parentComponentGroup, layoutType, anchorLocation, buttonListener)
        {
            m_hitBox = new UIButtonHitBox(xStart, yStart, xWidth, yHeight, this, layoutType, anchorLocation);
        }
        public UITextureLabel(string componentName,
		                      float xStart,
		                      float yStart,
		                      float xWidth,
		                      float yHeight,
		                      UIComponentGroup parentComponentGroup,
		                      UILayoutType layoutType,
		                      UIAnchorLocation anchorLocation,
		                      Texture2D texture2D)
            : base(componentName, xStart, yStart, xWidth, yHeight, parentComponentGroup, layoutType, anchorLocation)
        {
            m_texture2D = texture2D;
            m_guiStyle = new GUIStyle();
        }
        protected UIComponentGroup(string componentName,
		                           float xStart,
		                           float yStart,
		                           float xWidth,
		                           float yHeight,
		                           UIComponentGroup parentComponentGroup,
		                           UILayoutType layoutType,
		                           UIAnchorLocation anchorLocation)
            : base(componentName, xStart, yStart, xWidth, yHeight, parentComponentGroup, layoutType, anchorLocation)
        {
            m_componentIdDictionary = new HybridDictionary();
            m_componentNameDictionary = new HybridDictionary();
            m_listComponent = new LinkedList<UIComponent>();
        }
        public UIStringLabel(string componentName,
		                     float xStart,
		                     float yStart,
		                     float xWidth,
		                     float yHeight,
		                     UIComponentGroup parentComponentGroup,
		                     UILayoutType layoutType,
		                     UIAnchorLocation anchorLocation,
		                     UITextInfo textInfo,
		                     string text)
            : base(componentName, xStart, yStart, xWidth, yHeight, parentComponentGroup, layoutType, anchorLocation)
        {
            m_guiStyle = textInfo.GetGUIStyle();
            m_textInfo = textInfo;
            m_text = text;
        }
示例#17
0
        protected UIComponent(string componentName,
		                      float xStart,
		                      float yStart,
		                      float xWidth,
		                      float yHeight,
		                      UIComponentGroup parentComponentGroup,
		                      UILayoutType layoutType,
		                      UIAnchorLocation anchorLocation)
        {
            m_componentId = UI.GenerateId();
            m_componentName = componentName;

            m_anchor = new UIAnchor(anchorLocation, xStart, yStart, xWidth, yHeight);
            m_layoutType = layoutType;
            m_parentComponentGroup = parentComponentGroup;
        }
示例#18
0
        public UIButton(string componentName,
		                float xStart,
		                float yStart,
		                float xWidth,
		                float yHeight,
		                UIComponentGroup parentComponentGroup,
		                UILayoutType layoutType,
		                UIAnchorLocation anchorLocation,
		                IUIButtonListener buttonListener)
            : base(componentName, xStart, yStart, xWidth, yHeight, parentComponentGroup, layoutType, anchorLocation)
        {
            m_componentType = UIComponentType.BUTTON;
            if (null == buttonListener)
                m_buttonListener = new UIButtonListenerDoNothing();
            else
                m_buttonListener = buttonListener;
        }
示例#19
0
 public void AutoButton_Checked(object sender = null, RoutedEventArgs e = null)
 {
     m_uiLayout = UILayoutType.UILAYOUT_AUTO;
     AutoLayout(mainUIPanel.RenderSize);
 }
示例#20
0
 public void VerticalButton_Checked(object sender = null, RoutedEventArgs e = null)
 {
     m_uiLayout = UILayoutType.UILAYOUT_VERTICAL;
     MakeVertical();
 }
示例#21
0
 public void HorizontalButton_Checked(object sender = null, RoutedEventArgs e = null)
 {
     m_uiLayout = UILayoutType.UILAYOUT_HORIZONTAL;
     MakeHorizontal();
 }
示例#22
0
 /// <summary>
 /// We need the layout type set from the getgo so we can lay things out properly
 /// </summary>
 public UIAbstractContainerWrap(UILayoutType layoutType)
 {
     //_layoutType = layoutType;
     this.layoutType = layoutType;
 }
	public UIRadioButtonGroup(int spacing, UILayoutType withLayout = UILayoutType.Vertical) 
		: base (withLayout)
	{
		_spacing = spacing;
	}
 public UIAbstractTouchableContainer(UILayoutType layoutType, int spacing) : this(UI.firstToolkit, layoutType, spacing)
 {
 }
示例#25
0
    private bool _suspendUpdates; // when true, layoutChildren will do nothing

    #endregion Fields

    #region Constructors

    /// <summary>
    /// We need the layout type set from the getgo so we can lay things out properly
    /// </summary>
    public UIAbstractContainer( UILayoutType layoutType )
    {
        _layoutType = layoutType;
    }
	public UIAbstractTouchableContainer( UILayoutType layoutType, int spacing ) : this( UI.firstToolkit, layoutType, spacing )
	{}
示例#27
0
 public UIRadioButtonGroup(int spacing, UILayoutType withLayout = UILayoutType.Vertical)
     : base(withLayout)
 {
     _spacing = spacing;
 }