[Orxonox-commit 3966] r8640 - code/branches/presentation/src/modules/notifications
dafrick at orxonox.net
dafrick at orxonox.net
Sat May 28 18:14:15 CEST 2011
Author: dafrick
Date: 2011-05-28 18:14:15 +0200 (Sat, 28 May 2011)
New Revision: 8640
Modified:
code/branches/presentation/src/modules/notifications/NotificationQueueCEGUI.cc
Log:
Make nice with dedicated server.
Modified: code/branches/presentation/src/modules/notifications/NotificationQueueCEGUI.cc
===================================================================
--- code/branches/presentation/src/modules/notifications/NotificationQueueCEGUI.cc 2011-05-28 15:36:50 UTC (rev 8639)
+++ code/branches/presentation/src/modules/notifications/NotificationQueueCEGUI.cc 2011-05-28 16:14:15 UTC (rev 8640)
@@ -130,10 +130,13 @@
}
this->displaySize_ = size;
- if(size.z == 0.0 && size.w == 0.0)
- GUIManager::getInstance().getLuaState()->doString(NotificationQueueCEGUI::NOTIFICATION_LAYER + ".resizeQueue(\"" + this->getName() + "\", " + multi_cast<std::string>(this->displaySize_.x) + ", " + multi_cast<std::string>(this->displaySize_.y) + ")");
- else
- GUIManager::getInstance().getLuaState()->doString(NotificationQueueCEGUI::NOTIFICATION_LAYER + ".resizeQueue(\"" + this->getName() + "\", " + multi_cast<std::string>(this->displaySize_.x) + ", " + multi_cast<std::string>(this->displaySize_.y) + ", " + multi_cast<std::string>(this->displaySize_.z) + ", " + multi_cast<std::string>(this->displaySize_.w) + ")");
+ if(GameMode::showsGraphics())
+ {
+ if(size.z == 0.0 && size.w == 0.0)
+ GUIManager::getInstance().getLuaState()->doString(NotificationQueueCEGUI::NOTIFICATION_LAYER + ".resizeQueue(\"" + this->getName() + "\", " + multi_cast<std::string>(this->displaySize_.x) + ", " + multi_cast<std::string>(this->displaySize_.y) + ")");
+ else
+ GUIManager::getInstance().getLuaState()->doString(NotificationQueueCEGUI::NOTIFICATION_LAYER + ".resizeQueue(\"" + this->getName() + "\", " + multi_cast<std::string>(this->displaySize_.x) + ", " + multi_cast<std::string>(this->displaySize_.y) + ", " + multi_cast<std::string>(this->displaySize_.z) + ", " + multi_cast<std::string>(this->displaySize_.w) + ")");
+ }
}
/**
@@ -158,7 +161,8 @@
}
this->position_ = position;
- GUIManager::getInstance().getLuaState()->doString(NotificationQueueCEGUI::NOTIFICATION_LAYER + ".moveQueue(\"" + this->getName() + "\", " + multi_cast<std::string>(this->position_.x) + ", " + multi_cast<std::string>(this->position_.y) + ", " + multi_cast<std::string>(this->position_.z) + ", " + multi_cast<std::string>(this->position_.w) + ")");
+ if(GameMode::showsGraphics())
+ GUIManager::getInstance().getLuaState()->doString(NotificationQueueCEGUI::NOTIFICATION_LAYER + ".moveQueue(\"" + this->getName() + "\", " + multi_cast<std::string>(this->position_.x) + ", " + multi_cast<std::string>(this->position_.y) + ", " + multi_cast<std::string>(this->position_.z) + ", " + multi_cast<std::string>(this->position_.w) + ")");
}
/**
@@ -175,7 +179,8 @@
// TODO: Check whether the alignment string is correct?
this->alignment_ = alignment;
- GUIManager::getInstance().getLuaState()->doString(NotificationQueueCEGUI::NOTIFICATION_LAYER + ".changeQueueAlignment(\"" + this->getName() + "\", \"" + this->alignment_ + "\")");
+ if(GameMode::showsGraphics())
+ GUIManager::getInstance().getLuaState()->doString(NotificationQueueCEGUI::NOTIFICATION_LAYER + ".changeQueueAlignment(\"" + this->getName() + "\", \"" + this->alignment_ + "\")");
}
/**
@@ -190,7 +195,8 @@
return;
this->fontSize_ = size;
- GUIManager::getInstance().getLuaState()->doString(NotificationQueueCEGUI::NOTIFICATION_LAYER + ".changeQueueFontSize(\"" + this->getName() + "\", " + multi_cast<std::string>(this->fontSize_) + ")");
+ if(GameMode::showsGraphics())
+ GUIManager::getInstance().getLuaState()->doString(NotificationQueueCEGUI::NOTIFICATION_LAYER + ".changeQueueFontSize(\"" + this->getName() + "\", " + multi_cast<std::string>(this->fontSize_) + ")");
}
/**
@@ -210,7 +216,8 @@
for(unsigned int i = 0; i < 4; i++)
stream << std::hex << std::setw(2) << std::setfill('0') << int(this->fontColor_[(i+3)%4]*255);
this->fontColorStr_ = stream.str();
- GUIManager::getInstance().getLuaState()->doString(NotificationQueueCEGUI::NOTIFICATION_LAYER + ".changeQueueFontColor(\"" + this->getName() + "\", \"" + this->fontColorStr_ + "\")");
+ if(GameMode::showsGraphics())
+ GUIManager::getInstance().getLuaState()->doString(NotificationQueueCEGUI::NOTIFICATION_LAYER + ".changeQueueFontColor(\"" + this->getName() + "\", \"" + this->fontColorStr_ + "\")");
}
/**
More information about the Orxonox-commit
mailing list