Merge remote-tracking branch 'warmist/console-hide' into develop

Conflicts:
	library/Console-darwin.cpp
develop
lethosor 2015-02-08 09:20:05 -05:00
commit a1691b6777
4 changed files with 31 additions and 0 deletions

@ -863,3 +863,13 @@ void Console::msleep (unsigned int msec)
if (msec > 1000) sleep(msec/1000000); if (msec > 1000) sleep(msec/1000000);
usleep((msec % 1000000) * 1000); usleep((msec % 1000000) * 1000);
} }
void Console::hide()
{
//Warmist: don't know if it's possible...
}
void Console::show()
{
//Warmist: don't know if it's possible...
}

@ -589,3 +589,13 @@ void Console::msleep (unsigned int msec)
{ {
Sleep(msec); Sleep(msec);
} }
void Console::hide()
{
ShowWindow( GetConsoleWindow(), SW_HIDE );
}
void Console::show()
{
ShowWindow( GetConsoleWindow(), SW_RESTORE );
}

@ -788,6 +788,14 @@ command_result Core::runCommand(color_ostream &con, const std::string &first, ve
return CR_WRONG_USAGE; return CR_WRONG_USAGE;
} }
} }
else if(first=="hide")
{
getConsole().hide();
}
else if(first=="show")
{
getConsole().show();
}
else else
{ {
command_result res = plug_mgr->InvokeCommand(con, first, parts); command_result res = plug_mgr->InvokeCommand(con, first, parts);

@ -157,6 +157,9 @@ namespace DFHack
bool isInited (void) { return inited; }; bool isInited (void) { return inited; };
bool is_console() { return true; } bool is_console() { return true; }
void hide();
void show();
private: private:
Private * d; Private * d;
tthread::recursive_mutex * wlock; tthread::recursive_mutex * wlock;