---
title: elements
framework: gamecontroller
role: symbol
role_heading: Instance Property
path: gamecontroller/gcvirtualcontroller/configuration/elements
---

# elements

The input elements of a virtual controller.

## Declaration

```swift
var elements: Set<String> { get set }
```

## Mentioned in

Adding virtual controls to games that support game controllers in iOS

## Discussion

Discussion The possible values you can include in this array are the names of the following constants: GCInputButtonA, GCInputButtonB, GCInputButtonX, GCInputButtonY, GCInputDirectionPad, GCInputLeftThumbstick, GCInputRightThumbstick, GCInputLeftShoulder, GCInputRightShoulder, GCInputLeftTrigger, and GCInputRightTrigger. note: If you include both GCInputDirectionPad and GCInputLeftThumbstick in the array, the virtual controller contains only the left thumb stick, not the input direction pad. For example, configure a virtual controller with a left thumb stick, right thumb stick, A button, and B button. virtualConfiguration.elements = [GCInputLeftThumbstick,GCInputRightThumbstick,GCInputButtonA,GCInputButtonB]
