How to correctly view data from input/dropdown

I a creating a plugin with several input/dropdown fields.

When I created the view of that page, only the number of the selection was viewed instead of the value of the array.

I fixed that with a switch, but have a strong feeling I am doing something wrong here. How should I be doing that right ?

This is example code for input:

$options = array("Simple","Regular","Complex","Very complex","Requires advice");

$defaults = array(         'name' => 'complexity',         'options_values' => $options,

);

if (isset($vars['entity'])) {         $defaults['value'] = $vars['entity']->complexity;         unset($vars['entity']); }

$vars = array_merge($defaults, $vars);

echo elgg_view('input/dropdown', $vars);