button index int cast