UI controls are cool
In Chapter 5, we added a slider to control the field of view of the renderer output. For such a task, a slider is great, as it shows visual feedback of the range and the selected value within that range. However, using a slider to select the animation clip or skeleton node has a major drawback – it lacks the visible mapping between the numerical value of the clip or node and the clip or node name itself. Selecting a specific clip or a node is a try-and-error process, resulting in you having to remember or write down the most important numbers.
By changing the slider to a list box or a combo box, the names of the animation clips and nodes will be shown instead of just the numbers of the clips and nodes. Internally, the currently selected entry of the combo box is identified by its index in the array of all elements in the combo box, resulting in an implicit mapping between a numerical value and name. So, we do not need any additional control structure...