本文整理汇总了C#中ElementCollection.GetInfo方法的典型用法代码示例。如果您正苦于以下问题:C# ElementCollection.GetInfo方法的具体用法?C# ElementCollection.GetInfo怎么用?C# ElementCollection.GetInfo使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ElementCollection
的用法示例。
在下文中一共展示了ElementCollection.GetInfo方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OnLoad
//.........这里部分代码省略.........
},
},
}
};
XML.Write.ToFile(guiElements, "Assets/Gui/elements.xml");
GridContainer mainGuiGrid = new GridContainer();
mainGuiGrid.Columns = 1;
mainGuiGrid.Rows = 3;
mainGuiGrid.CellWidths.Add(1280);
mainGuiGrid.RowHeights.Add(30);
mainGuiGrid.RowHeights.Add(0);
mainGuiGrid.RowHeights.Add(30);
mainGuiGrid.Anchor = new Anchor();
mainGuiGrid.Anchor.Directions[AnchorDirection.Top] = AnchorType.Snap;
mainGuiGrid.Anchor.Directions[AnchorDirection.Left] = AnchorType.Snap;
mainGuiGrid.Anchor.Directions[AnchorDirection.Right] = AnchorType.Snap;
mainGuiGrid.Anchor.Directions[AnchorDirection.Bottom] = AnchorType.Snap;
mainGuiGrid.Position = new Vector2(0, 0);
mainGuiGrid.Size = new Vector2(400, 200);
Panel leftPanel = new Panel();
leftPanel.Anchor = new Anchor();
leftPanel.Anchor.Directions[AnchorDirection.Left] = AnchorType.Snap;
leftPanel.Anchor.Directions[AnchorDirection.Top] = AnchorType.Snap;
leftPanel.Anchor.Directions[AnchorDirection.Bottom] = AnchorType.Snap;
leftPanel.Position = new Vector2(100, 100);
leftPanel.Size = new Vector2(300, 10);
leftPanel.Color = new Vector4(0.1f, 0.1f, 0.1f, 1f);
leftPanel.RightAnchorOffset = -10.0f;
leftPanel.TextureRegion = guiElements.GetInfo(leftPanel).Slices.ToArray();
Panel menuBar = new Panel();
menuBar.Anchor = new Anchor();
menuBar.Anchor.Directions[AnchorDirection.Top] = AnchorType.Snap;
menuBar.Anchor.Directions[AnchorDirection.Left] = AnchorType.Snap;
menuBar.Anchor.Directions[AnchorDirection.Right] = AnchorType.Snap;
menuBar.Position = new Vector2(100, 100);
menuBar.Size = new Vector2(300, 30);
menuBar.Color = new Vector4(0.1f, 0.1f, 0.1f, 1f);
menuBar.TextureRegion = guiElements.GetInfo(leftPanel).Slices.ToArray();
Panel bottomBar = new Panel();
bottomBar.Anchor = new Anchor();
bottomBar.Anchor.Directions[AnchorDirection.Left] = AnchorType.Snap;
bottomBar.Anchor.Directions[AnchorDirection.Right] = AnchorType.Snap;
bottomBar.Anchor.Directions[AnchorDirection.Bottom] = AnchorType.Snap;
bottomBar.Position = new Vector2(0, 690);
bottomBar.Size = new Vector2(0, 30);
bottomBar.Color = new Vector4(0.1f, 0.1f, 0.1f, 1f);
bottomBar.TextureRegion = guiElements.GetInfo(leftPanel).Slices.ToArray();
#region StackContainer test
StackContainer stack = new StackContainer();
{
Button btn = new Button();
Button btn2 = new Button();
Button btn3 = new Button();
Button btn4 = new Button();