Cleanup input.xml file (remove unused properties in some cases), add a little inline doc to make it a little easier to customize
This commit is contained in:
parent
4ef196d086
commit
ca771f6218
@ -29,9 +29,13 @@
|
||||
*/
|
||||
void Binding::save(std::ofstream& stream) const
|
||||
{
|
||||
stream << "id=\"" << m_id << "\" "
|
||||
<< "event=\"" << m_type << "\" "
|
||||
<< "character=\"" << m_character << "\" ";
|
||||
stream << "event=\"" << m_type << "\" ";
|
||||
stream << "id=\"" << m_id << "\" ";
|
||||
|
||||
if (m_type == Input::IT_KEYBOARD)
|
||||
{
|
||||
stream << "character=\"" << m_character << "\" ";
|
||||
}
|
||||
|
||||
// Only serialize the direction and the range for stick motions
|
||||
if (m_type == Input::IT_STICKMOTION)
|
||||
|
@ -643,6 +643,18 @@ void DeviceManager::save()
|
||||
|
||||
configfile << "<input version=\"" << INPUT_FILE_VERSION << "\">\n\n";
|
||||
|
||||
configfile << "<!--\n"
|
||||
<< "Event 1 : Keyboard button press\n"
|
||||
<< " 'id' indicates which button, as defined by irrlicht's EKEY_CODE enum\n"
|
||||
<< " 'character' contains the associated unicode character.\n"
|
||||
<< " Only used as fallback when displaying special characters in the UI.\n"
|
||||
<< "Event 2 : Gamepad stick motion\n"
|
||||
<< " 'id' indicates which stick, starting from 0\n"
|
||||
<< " 'direction' 0 means negative, 1 means positive\n"
|
||||
<< "Event 3 : Gamepad button press\n"
|
||||
<< " 'id' indicates which button, starting from 0\n"
|
||||
<< "-->\n\n";
|
||||
|
||||
for(unsigned int n=0; n<m_keyboard_configs.size(); n++)
|
||||
{
|
||||
m_keyboard_configs[n].save(configfile);
|
||||
|
Loading…
x
Reference in New Issue
Block a user