Exemplo n.º 1
0
 public GameController(Input input) : base()
 {
     this.input = input;
     if (Application.RenderingBackend == RenderingBackend.Vulkan)
     {
         if (!MetalGameView.IsMetalSupported())
         {
             throw new NotSupportedException("Metal is not supported on the device");
         }
         View = new MetalGameView(UIScreen.MainScreen.Bounds);
     }
     else
     {
         View = new GLGameView(UIScreen.MainScreen.Bounds);
     }
     View.MultipleTouchEnabled      = true;
     ((IGameView)View).UpdateFrame += (delta) => ProcessTextInput();
     softKeyboard             = new SoftKeyboard(this);
     Application.SoftKeyboard = softKeyboard;
     UIAccelerometer.SharedAccelerometer.UpdateInterval = 0.05;
     UIAccelerometer.SharedAccelerometer.Acceleration  += OnAcceleration;
     Application.SupportedDeviceOrientationsChanged    += ResetDeviceOrientation;
     Initialize3DTouchOnTheLeftSideWorkaround();
     textView                        = new CustomUITextView(this);
     textView.Delegate               = new TextViewDelegate(input);
     textView.AutocorrectionType     = UITextAutocorrectionType.No;
     textView.AutocapitalizationType = UITextAutocapitalizationType.None;
     View.Add(textView);
 }
Exemplo n.º 2
0
        private void TemporaryPage_Load(object sender, EventArgs e)
        {
            label1.Text = "";
            SoftKeyboard softKeyboard = new SoftKeyboard(btnText, '*');

            softKeyboard.BorderStyle = BorderStyle.None;
            pnlSoftKeyBoard.Controls.Add(softKeyboard);
        }
Exemplo n.º 3
0
 public GameController(Input input) : base()
 {
     this.input               = input;
     base.View                = new GameView(input);
     softKeyboard             = new SoftKeyboard(View);
     Application.SoftKeyboard = softKeyboard;
     UIAccelerometer.SharedAccelerometer.UpdateInterval = 0.05;
     UIAccelerometer.SharedAccelerometer.Acceleration  += OnAcceleration;
     Application.SupportedDeviceOrientationsChanged    += ResetDeviceOrientation;
 }