mirror of
https://github.com/vcmi/vcmi.git
synced 2025-07-13 01:20:34 +02:00
add missing help
This commit is contained in:
@ -221,8 +221,13 @@ std::shared_ptr<CButton> CMenuEntry::createButton(CMenuScreen * parent, const Js
|
||||
std::function<void()> command = genCommand(parent, parent->menuNameToEntry, button["command"].String());
|
||||
|
||||
std::pair<std::string, std::string> help;
|
||||
if(!button["help"].isNull() && button["help"].Float() > 0)
|
||||
help = LIBRARY->generaltexth->zelp[(size_t)button["help"].Float()];
|
||||
if(!button["help"].isNull())
|
||||
{
|
||||
if(button["help"].isNumber() && button["help"].Float() > 0)
|
||||
help = LIBRARY->generaltexth->zelp[(size_t)button["help"].Float()];
|
||||
if(button["help"].isString() && !button["help"].String().empty())
|
||||
help = {"", LIBRARY->generaltexth->translate(button["help"].String())};
|
||||
}
|
||||
|
||||
int posx = static_cast<int>(button["x"].Float());
|
||||
if(posx < 0)
|
||||
|
Reference in New Issue
Block a user