public static UIComponent CreateUIComponent(UIComponentFactoryData componentFactoryData, UIComponentGroup parentComponentGroup) { switch (componentFactoryData.componentEnum) { // case UIComponentEnum.BUTTON: // { // IList dataList = componentFactoryData.componentData; // UIAnchorLocation anchorLocation = (UIAnchorLocation)(dataList[0]); // UILayoutType layoutType = (UILayoutType)(dataList[1]); // string text = dataList[6] as string; // if (UILayoutType.RELATIVE_LAYOUT == layoutType) // { // float xStart = (float)(dataList[2]); // float yStart = (float)(dataList[3]); // float xWidth = (float)(dataList[4]); // float yHeight = (float)(dataList[5]); // return new UIButton(xStart, yStart, xWidth, yHeight, parentComponentGroup, layoutType, anchorLocation, text); // } // else if (UILayoutType.PIXEL_LAYOUT == layoutType) // { // int xStart = (int)(dataList[2]); // int yStart = (int)(dataList[3]); // int xWidth = (int)(dataList[4]); // int yHeight = (int)(dataList[5]); // return new UIButton(xStart, yStart, xWidth, yHeight, parentComponentGroup, layoutType, anchorLocation, text); // } // return null; // } default: return null; } }
public UI(UIComponentGroup headGroup) { m_menuDictionary = new HybridDictionary(4, true); m_menuStack = new UIMenuStack(); UIMenu menu = new UIMenu(headGroup); m_menuDictionary.Add(1, menu); }
public UIRelativeLayout(float xStart, float yStart, float xWidth, float yHeight, UIComponentGroup parentComponentGroup, UIAnchorLocation anchorLocation) : this("", xStart, yStart, xWidth, yHeight, parentComponentGroup, anchorLocation) { SetName(Id.ToString()); }
public UIRelativeLayout(string componentName, float xStart, float yStart, float xWidth, float yHeight, UIComponentGroup parentComponentGroup, UIAnchorLocation anchorLocation) : base(componentName, xStart, yStart, xWidth, yHeight, parentComponentGroup, UILayoutType.RELATIVE_LAYOUT, anchorLocation) { m_componentType = UIComponentType.LAYOUT; }
public UIGridLayout(float xStart, float yStart, float xWidth, float yHeight, UIComponentGroup parentComponentGroup, UIAnchorLocation anchorLocation, int xGridSections, int yGridSections) : this("", xStart, yStart, xWidth, yHeight, parentComponentGroup, anchorLocation, xGridSections, yGridSections) { SetName(Id.ToString()); }
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()); }
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 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; }
public UIGridLayout(string componentName, float xStart, float yStart, float xWidth, float yHeight, UIComponentGroup parentComponentGroup, UIAnchorLocation anchorLocation, int xGridSections, int yGridSections) : base(componentName, xStart, yStart, xWidth, yHeight, parentComponentGroup, anchorLocation) { m_xGridSections = xGridSections; m_yGridSections = yGridSections; m_grid = new ArrayList(xGridSections * yGridSections); }
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; }
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; }
public UIComponentGroupIterator(UIComponentGroup headComponentGroup) { m_componentIdDictionary = new HybridDictionary(); m_componentNameDictionary = new HybridDictionary(); m_componentArrayList = new ArrayList(); m_headComponentGroup = headComponentGroup; m_renderableArrayList = new ArrayList(); // m_layoutArrayList = new ArrayList(); m_buttonArrayList = new ArrayList(); PopulateComponentArrayList(); PopulateRenderableArrayList(); PopulateButtonArrayList(); CalculateRenderingOutput(); }
public void SetParentComponentGroup(UIComponentGroup newParent) { m_parentComponentGroup = newParent; }
public UIMenu(UIComponentGroup headGroup) { m_componentGroupIterator = new UIComponentGroupIterator(headGroup); }