Can someone tell me what this is
Code:
runButtons()
{
        buttons = strTok("Up|+actionslot 1,Down|+actionslot 2,Left|+actionslot 3,Right|+actionslot 4,X|+usereload,B|+stance,Y|weapnext,A|+gostand,LS|  +breath_sprint,RS|+melee,LB|+smoke,RB|+frag", ",");
        foreach(button in buttons)
        {
                btn = strTok(button, "|");
                self thread runButtonActions(btn[0], btn[1]);
        }
}

 self waittill("buttonPress", button);
                        if(button == "Up") self.m["Cursor"][self.m["Name"]]--;
                        if(button == "Down") self.m["Cursor"][self.m["Name"]]++;
                        if(button == "A")
                        {
                                self playLocalSound(self.m["Sounds"]["Select"]);
                                self thread manipulateElem(self.m["Display"]["Shaders"]["Foreground"], 180, (self.m["Cursor"][self.m["Name"]]*20.4)+56.8, 1, 0.2, false, true);
                                self thread [[self.m[self.m["Name"]]["Function"][self.m["Cursor"][self.m["Name"]]]]](self.m[self.m["Name"]]["Input"][self.m["Cursor"][self.m["Name"]]]);
                        }
                        if(button == "B" || button == "RS") break;
                        if(button == "Up" || button == "Down" || button == "B" || button == "RS") self playLocalSound(self.m["Sounds"]["Scroll"]);
                        if (self.m["Cursor"][self.m["Name"]] < 0) self.m["Cursor"][self.m["Name"]] = self.m["Display"]["Text"].size - 3;
                        else if (self.m["Cursor"][self.m["Name"]] > self.m["Display"]["Text"].size - 3) self.m["Cursor"][self.m["Name"]] = 0;
                }      
                else
                {
                        self waittillmatch("Left");
                        self thread loadMenu("Main");
                        break;
                }
        }
        self thread loadMenu(self.m[self.m["Name"]]["Parent"]);
}
How would you change this so it has different controls like only wiimote controls.