コード例 #1
0
        public GenericMenu(Rect newBoundingRect)
        {
            items     = new ItemGroup();
            controlID = GUIUtility.GetControlID(items.GetHashCode(), FocusType.Keyboard, new Rect(CanvasGUI.GUItoWindowPosition(items.position.position), items.position.size));

            if (newBoundingRect != Rect.zero)
            {
                boundingRect = newBoundingRect;
            }
        }
コード例 #2
0
        public void TestHashCode()
        {
            var item = new ItemGroup {
                ID = 1, Name = "1"
            };
            var item2 = new ItemGroup {
                ID = 1, Name = "1"
            };

            Assert.Equal(item.GetHashCode(), item2.GetHashCode());
        }
コード例 #3
0
 public GenericMenu()
 {
     items     = new ItemGroup();
     controlID = GUIUtility.GetControlID(items.GetHashCode(), FocusType.Keyboard, new Rect(CanvasGUI.GUItoWindowPosition(items.position.position), items.position.size));
 }