//-----------------------------------------------------------------------
 void StringInterface::setParameterList(const NameValuePairList& paramList)
 {
     NameValuePairList::const_iterator i, iend;
     iend = paramList.end();
     for (i = paramList.begin(); i != iend; ++i)
     {
         setParameter(i->first, i->second);
     }
 }
Пример #2
0
    void CommandMapper::buildCommandMap(KeyAndMouseCommandMap& cmdMap,
        const NameValuePairList& values)
    {
        for (NameValuePairList::const_iterator it = values.begin(); it != values.end(); it++)
        {
            // Split the path at the ',' character
            StringVector keys = Ogre::StringUtil::split(it->second, ",");

            for (size_t i = 0; i < keys.size(); i++)
            {
                int keycode = getKeyCode(keys[i]);
                cmdMap[keycode] = CeGuiString(it->first);
                LOG_MESSAGE(Logger::UI,
                    Ogre::String("Key ") + keys[i] + " ("
                    + StringConverter::toString(keycode)
                    + ") is assigned to command " + it->first);
            }
        }
    }