Example #1
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            //Set the window fullscreen so that the background is drawn the correct size
            Window.AddFlags(WindowManagerFlags.KeepScreenOn);
            Window.AddFlags(WindowManagerFlags.Fullscreen);
            Window.AddFlags(WindowManagerFlags.LayoutNoLimits);

            // Set our view from the "main" layout resource
            SetContentView(Resource.Layout.activity_fullscreen);

            controlsView = FindViewById(Resource.Id.fullscreen_content_controls);
            contentView  = FindViewById(Resource.Id.fullscreen_content);

            controller_view = (ControllerView)FindViewById(Resource.Id.controller);

            for (int i = 0; i < buttons.Length; i++)
            {
                buttons [i] = 0;
            }
            for (int i = 0; i < axes.Length; i++)
            {
                axes [i] = 0.0f;
            }

            controller_view.SetButtonAxes(buttons, axes);

            //Set up a UI hider to control the UI visibility for the activity
            system_ui_hider = SystemUiHider.GetInstance(this, contentView, HIDER_FLAGS);
            system_ui_hider.Setup();
            system_ui_hider.SetOnVisibilityChangeListener(new MyOnVisibilityChangeListener(this));

            contentView.SetOnClickListener(new MyOnClickListener(this));
            input_manager = (InputManager)GetSystemService(Context.InputService);
            CheckGameControllers();
        }
		protected override void OnCreate (Bundle bundle)
		{
			base.OnCreate (bundle);

			//Set the window fullscreen so that the background is drawn the correct size
			Window.AddFlags(WindowManagerFlags.KeepScreenOn);
			Window.AddFlags (WindowManagerFlags.Fullscreen);
			Window.AddFlags (WindowManagerFlags.LayoutNoLimits);

			// Set our view from the "main" layout resource
			SetContentView (Resource.Layout.activity_fullscreen);

			controlsView = FindViewById (Resource.Id.fullscreen_content_controls);
			contentView = FindViewById (Resource.Id.fullscreen_content);

			controller_view = (ControllerView)FindViewById (Resource.Id.controller);

			for (int i = 0; i < buttons.Length; i++) 
				buttons [i] = 0;
			for (int i = 0; i < axes.Length; i++) 
				axes [i] = 0.0f;

			controller_view.SetButtonAxes (buttons, axes);

			//Set up a UI hider to control the UI visibility for the activity
			system_ui_hider = SystemUiHider.GetInstance (this, contentView, HIDER_FLAGS);
			system_ui_hider.Setup ();
			system_ui_hider.SetOnVisibilityChangeListener (new MyOnVisibilityChangeListener (this));

			contentView.SetOnClickListener (new MyOnClickListener (this));
			input_manager = (InputManager)GetSystemService (Context.InputService);
			CheckGameControllers ();

		}