1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-07-07 00:58:39 +02:00

Small cleanup

This commit is contained in:
Dydzio
2023-01-06 21:20:46 +01:00
parent 622e012fcf
commit 4157feb2f3
2 changed files with 1 additions and 30 deletions

View File

@ -541,36 +541,6 @@ int main(int argc, char * argv[])
return 0;
}
void printInfoAboutIntObject(const CIntObject *obj, int level)
{
std::stringstream sbuffer;
sbuffer << std::string(level, '\t');
sbuffer << typeid(*obj).name() << " *** ";
if (obj->active)
{
#define PRINT(check, text) if (obj->active & CIntObject::check) sbuffer << text
PRINT(LCLICK, 'L');
PRINT(RCLICK, 'R');
PRINT(HOVER, 'H');
PRINT(MOVE, 'M');
PRINT(KEYBOARD, 'K');
PRINT(TIME, 'T');
PRINT(GENERAL, 'A');
PRINT(WHEEL, 'W');
PRINT(DOUBLECLICK, 'D');
#undef PRINT
}
else
sbuffer << "inactive";
sbuffer << " at " << obj->pos.x <<"x"<< obj->pos.y;
sbuffer << " (" << obj->pos.w <<"x"<< obj->pos.h << ")";
logGlobal->info(sbuffer.str());
for(const CIntObject *child : obj->children)
printInfoAboutIntObject(child, level+1);
}
//plays intro, ends when intro is over or button has been pressed (handles events)
void playIntro()
{

View File

@ -1155,6 +1155,7 @@ void CInGameConsole::endEnteringText(bool processEnteredText)
LOCPLINT->cb->sendMessage(txt, LOCPLINT->getSelection());
previouslyEntered.push_back(txt);
//some commands like gosolo don't work when executed from GUI thread
boost::thread clientCommandThread(ClientCommandManager::processCommand, txt, true);
clientCommandThread.join();
}