protected override void OnScreenRotate(bool is_portrait)
 {
     if (is_portrait)
     {
         portrait.Set(rect);
     }
     else
     {
         landscape.Set(rect);
     }
 }
Exemplo n.º 2
0
        public void EntityAnchorArgument_ParseShouldFail_BecauseInvalidEntityAnchor()
        {
            // Arrange
            Anchors.Set("[\"foo\",\"bar\"]");
            EntityAnchorArgument argument = new EntityAnchorArgument();
            IStringReader        reader   = new StringReader("baz");

            // Act
            ReadResults readResults = argument.Parse(reader, out _);

            // Assert
            Assert.IsFalse(readResults.Successful);
        }
Exemplo n.º 3
0
        public void EntityAnchorArgument_ParseShouldSucceed()
        {
            // Arrange
            Anchors.Set("[\"foo\",\"bar\"]");
            EntityAnchorArgument argument = new EntityAnchorArgument();
            IStringReader        reader   = new StringReader("foo");

            // Act
            ReadResults readResults = argument.Parse(reader, out _);

            // Assert
            Assert.IsTrue(readResults.Successful);
        }