No… that’s the exact opposite of what you should be doing. Let’s try this explanation again more thoroughly.
You really do not write control/UI code for a particular device. The Xbox One has controller as its main input type, so what you’re really wanting to do is implement your game to work with the controller input modes, and that your game will adjust the UI labels and size of the UI appropriately when it detects the last input type is controller / the player is playing on a 10-ft screen (there is API for this).
If your game works on controller, it works for Xbox One, for PC + controller, and for any future supported device with a similar controller form factor.
The end goal, if you want the biggest reach and the maximum user experience, is to have this working in your game:
- Touch support + appropriate touch UI (make sure no keybind labels are shown, make sure buttons are big enough for the lowest screen sizes on mobile, and think about portrait vs landscape modes)
- Controller support + appropriate controller UI / labels (controllers can’t click on things as easily, use shortcuts and easy to navigate grids/lists)
- Keyboard + mouse + appropriate keyboard/mouse UI (this is probably the easiest to implement, and you probably already have a lot of intuition about this)
- Your UI/controls should seamlessly, at any moment in time be able to switch between these modes when the input mode changes / when the screen size changes. Yes, even from touch to controller, and especially from controller to keyboard/mouse and vice versa.
For a good example of all of this, see Egg Hunt 2018. Everything switches based on input mode (i.e. try playing with keyboard with a controller plugged in, and then pick up your controller and play with that, and back again) and some things also change around when you change your window size / when you flip your phone/tablet to portrait mode, etc.