mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-30 13:15:32 +00:00
Properly escape the keybinding labels (Bug #3281)
A certain key name ("#") was being interpreted as a MyGUI markup code.
This commit is contained in:
parent
5cda89c15d
commit
7a962fd8c5
1 changed files with 6 additions and 4 deletions
|
@ -1326,10 +1326,12 @@ namespace MWInput
|
||||||
|
|
||||||
ICS::Control* c = mInputBinder->getChannel (action)->getAttachedControls ().front().control;
|
ICS::Control* c = mInputBinder->getChannel (action)->getAttachedControls ().front().control;
|
||||||
|
|
||||||
if (mInputBinder->getKeyBinding (c, ICS::Control::INCREASE) != SDL_SCANCODE_UNKNOWN)
|
SDL_Scancode key = mInputBinder->getKeyBinding (c, ICS::Control::INCREASE);
|
||||||
return mInputBinder->scancodeToString (mInputBinder->getKeyBinding (c, ICS::Control::INCREASE));
|
unsigned int mouse = mInputBinder->getMouseButtonBinding (c, ICS::Control::INCREASE);
|
||||||
else if (mInputBinder->getMouseButtonBinding (c, ICS::Control::INCREASE) != ICS_MAX_DEVICE_BUTTONS)
|
if (key != SDL_SCANCODE_UNKNOWN)
|
||||||
return "#{sMouse} " + boost::lexical_cast<std::string>(mInputBinder->getMouseButtonBinding (c, ICS::Control::INCREASE));
|
return MyGUI::TextIterator::toTagsString(mInputBinder->scancodeToString (key));
|
||||||
|
else if (mouse != ICS_MAX_DEVICE_BUTTONS)
|
||||||
|
return "#{sMouse} " + boost::lexical_cast<std::string>(mouse);
|
||||||
else
|
else
|
||||||
return "#{sNone}";
|
return "#{sNone}";
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue