mirror of
https://github.com/vcmi/vcmi.git
synced 2025-07-07 00:58:39 +02:00
Small cleanup
This commit is contained in:
@ -541,36 +541,6 @@ int main(int argc, char * argv[])
|
|||||||
return 0;
|
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)
|
//plays intro, ends when intro is over or button has been pressed (handles events)
|
||||||
void playIntro()
|
void playIntro()
|
||||||
{
|
{
|
||||||
|
@ -1155,6 +1155,7 @@ void CInGameConsole::endEnteringText(bool processEnteredText)
|
|||||||
LOCPLINT->cb->sendMessage(txt, LOCPLINT->getSelection());
|
LOCPLINT->cb->sendMessage(txt, LOCPLINT->getSelection());
|
||||||
previouslyEntered.push_back(txt);
|
previouslyEntered.push_back(txt);
|
||||||
|
|
||||||
|
//some commands like gosolo don't work when executed from GUI thread
|
||||||
boost::thread clientCommandThread(ClientCommandManager::processCommand, txt, true);
|
boost::thread clientCommandThread(ClientCommandManager::processCommand, txt, true);
|
||||||
clientCommandThread.join();
|
clientCommandThread.join();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user