Chat in custom game menu is only active if network slots are open; No more screenshots and debug toggling while chatting in Internet Menu; typo fix

This commit is contained in:
Titus Tscharntke 2011-01-03 12:41:20 +00:00
parent ec77cd9eab
commit 5bb98fa261
3 changed files with 18 additions and 8 deletions

View File

@ -183,7 +183,7 @@ void stackdumper(unsigned int type, EXCEPTION_POINTERS *ep) {
class ExceptionHandler: public PlatformExceptionHandler{
public:
virtual void handle() {
string msg = "#1 An error ocurred and " + string(GameConstants::application_name) + " will close.\nPlease report this bug to "+mailString;
string msg = "#1 An error occurred and " + string(GameConstants::application_name) + " will close.\nPlease report this bug to "+mailString;
#ifdef WIN32
msg += ", attaching the generated " + getCrashDumpFileName()+ " file.";
#endif
@ -366,7 +366,7 @@ public:
}
}
else {
string err = "#2 An error ocurred and " +
string err = "#2 An error occurred and " +
string(GameConstants::application_name) +
" will close.\nError msg = [" +
errMsg +

View File

@ -1339,7 +1339,9 @@ void MenuStateCustomGame::render() {
}
}
renderer.renderChatManager(&chatManager);
if(hasNetworkGameSettings() == true) {
renderer.renderChatManager(&chatManager);
}
renderer.renderConsole(&console,showFullConsole,true);
}
catch(const std::exception &ex) {
@ -2635,7 +2637,9 @@ void MenuStateCustomGame::keyDown(char key) {
}
else {
//send key to the chat manager
chatManager.keyDown(key);
if(hasNetworkGameSettings() == true) {
chatManager.keyDown(key);
}
if(chatManager.getEditEnabled() == false) {
Config &configKeys = Config::getInstance(std::pair<ConfigType,ConfigType>(cfgMainKeys,cfgUserKeys));
@ -2692,19 +2696,24 @@ void MenuStateCustomGame::keyPress(char c) {
}
}
else {
chatManager.keyPress(c);
if(hasNetworkGameSettings() == true) {
chatManager.keyPress(c);
}
}
}
void MenuStateCustomGame::keyUp(char key) {
if(activeInputLabel==NULL) {
chatManager.keyUp(key);
if(hasNetworkGameSettings() == true) {
chatManager.keyUp(key);
}
Config &configKeys = Config::getInstance(std::pair<ConfigType,ConfigType>(cfgMainKeys,cfgUserKeys));
if(chatManager.getEditEnabled()) {
//send key to the chat manager
chatManager.keyUp(key);
if(hasNetworkGameSettings() == true) {
chatManager.keyUp(key);
}
}
else if(key == configKeys.getCharKey("ShowFullConsole")) {
showFullConsole= false;

View File

@ -120,6 +120,7 @@ public:
virtual void keyUp(char key);
virtual void simpleTask(BaseThread *callingThread);
virtual bool isInSpecialKeyCaptureEvent() { return chatManager.getEditEnabled(); }
static void setDisplayMessageFunction(DisplayMessageFunction pDisplayMessage) { pCB_DisplayMessage = pDisplayMessage; }