diff --git a/CMakeLists.txt b/CMakeLists.txt
index 08ce829f65..d5f0bffa8f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -186,6 +186,11 @@ endif (APPLE)
# Dependencies
+# Fix for not visible pthreads functions for linker with glibc 2.15
+if (UNIX AND NOT APPLE)
+find_package (Threads)
+endif()
+
find_package(OGRE REQUIRED)
find_package(Boost REQUIRED COMPONENTS system filesystem program_options thread)
find_package(OIS REQUIRED)
@@ -322,7 +327,7 @@ if(DPKG_PROGRAM)
SET(CPACK_DEBIAN_PACKAGE_NAME "openmw")
SET(CPACK_DEBIAN_PACKAGE_VERSION "${VERSION_STRING}")
SET(CPACK_PACKAGE_EXECUTABLES "openmw;OpenMW esmtool;Esmtool omwlauncher;OMWLauncher")
- SET(CPACK_DEBIAN_PACKAGE_DEPENDS "libogre-1.7.3 (>= 1.7.3), libbullet0 (>= 2.77), libboost-filesystem1.46.1 (>= 1.46.1), libboost-program-options1.46.1 (>= 1.46.1), libboost-system1.46.1 (>= 1.46.1), libboost-thread1.46.1 (>= 1.46.1), libc6 (>= 2.11.2), libfreetype6 (>= 2.2.1), libgcc1 (>= 1:4.1.1), libmpg123-0 (>= 1.12.1), libois-1.3.0 (>= 1.3.0), libopenal1 (>= 1:1.12.854), libsndfile1 (>= 1.0.23), libstdc++6 (>= 4.4.5), libuuid1 (>= 2.17.2), libqtgui4 (>= 4.7.0)")
+ SET(CPACK_DEBIAN_PACKAGE_DEPENDS "nvidia-cg-toolkit (>= 2.1), libboost-filesystem1.46.1 (>= 1.46.1), libboost-program-options1.46.1 (>= 1.46.1), libboost-system1.46.1 (>= 1.46.1), libboost-thread1.46.1 (>= 1.46.1), libc6 (>= 2.11.2), libfreetype6 (>= 2.2.1), libgcc1 (>= 1:4.1.1), libmpg123-0 (>= 1.12.1), libois-1.3.0 (>= 1.3.0), libopenal1 (>= 1:1.12.854), libsndfile1 (>= 1.0.23), libstdc++6 (>= 4.4.5), libuuid1 (>= 2.17.2), libqtgui4 (>= 4.7.0)")
SET(CPACK_DEBIAN_PACKAGE_SECTION "Games")
@@ -342,6 +347,7 @@ if(WIN32)
FILE(GLOB files "${OpenMW_BINARY_DIR}/Release/*.*")
INSTALL(FILES ${files} DESTINATION ".")
INSTALL(FILES "${OpenMW_BINARY_DIR}/openmw.cfg.install" DESTINATION "." RENAME "openmw.cfg")
+ INSTALL(FILES "${OpenMW_SOURCE_DIR}/readme.txt" DESTINATION ".")
INSTALL(DIRECTORY "${OpenMW_BINARY_DIR}/resources" DESTINATION ".")
SET(CPACK_GENERATOR "NSIS")
@@ -352,6 +358,7 @@ if(WIN32)
SET(CPACK_PACKAGE_VERSION_MINOR ${OPENMW_VERSION_MINO})
SET(CPACK_PACKAGE_VERSION_PATCH ${OPENMW_VERSION_RELEASE})
SET(CPACK_PACKAGE_EXECUTABLES "openmw;OpenMW;esmtool;Esmtool;omwlauncher;OpenMW Launcher")
+ set(CPACK_NSIS_CREATE_ICONS_EXTRA "CreateShortCut '\$SMPROGRAMS\\\\$STARTMENU_FOLDER\\\\Readme.lnk' '\$INSTDIR\\\\readme.txt'")
SET(CPACK_PACKAGE_DESCRIPTION_FILE "${OpenMW_SOURCE_DIR}/readme.txt")
SET(CPACK_RESOURCE_FILE_LICENSE "${OpenMW_SOURCE_DIR}/GPL3.txt")
SET(CPACK_NSIS_EXECUTABLES_DIRECTORY ".")
@@ -494,6 +501,7 @@ if (APPLE)
install(FILES "${OpenMW_BINARY_DIR}/openmw.cfg.install" RENAME "openmw.cfg" DESTINATION "${INSTALL_SUBDIR}" COMPONENT Runtime)
install(FILES "${OpenMW_BINARY_DIR}/plugins.cfg" DESTINATION "${INSTALL_SUBDIR}" COMPONENT Runtime)
+ install(FILES "${OpenMW_BINARY_DIR}/launcher.qss" DESTINATION "${INSTALL_SUBDIR}" COMPONENT Runtime)
set(CPACK_GENERATOR "DragNDrop")
set(CPACK_PACKAGE_VERSION ${OPENMW_VERSION})
diff --git a/apps/launcher/datafilespage.cpp b/apps/launcher/datafilespage.cpp
index 054cbf1414..c15274e749 100644
--- a/apps/launcher/datafilespage.cpp
+++ b/apps/launcher/datafilespage.cpp
@@ -222,10 +222,10 @@ void DataFilesPage::setupDataFiles()
QMessageBox msgBox;
msgBox.setWindowTitle("Error detecting Morrowind installation");
- msgBox.setIcon(QMessageBox::Critical);
+ msgBox.setIcon(QMessageBox::Warning);
msgBox.setStandardButtons(QMessageBox::Cancel);
msgBox.setText(tr("
Could not find the Data Files location
\
- The directory containing the Data Files was not found.
\
+ The directory containing the data files was not found.
\
Press \"Browse...\" to specify the location manually.
"));
QAbstractButton *dirSelectButton =
@@ -279,72 +279,79 @@ void DataFilesPage::setupDataFiles()
const Files::MultiDirCollection &esp = fileCollections.getCollection(".esp");
for (Files::MultiDirCollection::TIter iter(esp.begin()); iter!=esp.end(); ++iter) {
- ESMReader fileReader;
- QStringList availableMasters; // Will contain all found masters
- fileReader.setEncoding(variables["encoding"].as());
- fileReader.open(iter->second.string());
+ try {
+ ESMReader fileReader;
+ QStringList availableMasters; // Will contain all found masters
+
+ fileReader.setEncoding(variables["encoding"].as());
+ fileReader.open(iter->second.string());
- // First we fill the availableMasters and the mMastersWidget
- ESMReader::MasterList mlist = fileReader.getMasters();
+ // First we fill the availableMasters and the mMastersWidget
+ ESMReader::MasterList mlist = fileReader.getMasters();
- for (unsigned int i = 0; i < mlist.size(); ++i) {
- const QString currentMaster = QString::fromStdString(mlist[i].name);
- availableMasters.append(currentMaster);
+ for (unsigned int i = 0; i < mlist.size(); ++i) {
+ const QString currentMaster = QString::fromStdString(mlist[i].name);
+ availableMasters.append(currentMaster);
- const QList itemList = mMastersWidget->findItems(currentMaster, Qt::MatchExactly);
+ const QList itemList = mMastersWidget->findItems(currentMaster, Qt::MatchExactly);
- if (itemList.isEmpty()) { // Master is not yet in the widget
- mMastersWidget->insertRow(i);
+ if (itemList.isEmpty()) { // Master is not yet in the widget
+ mMastersWidget->insertRow(i);
- QTableWidgetItem *item = new QTableWidgetItem(currentMaster);
- item->setForeground(Qt::red);
- item->setFlags(item->flags() & ~(Qt::ItemIsSelectable));
+ QTableWidgetItem *item = new QTableWidgetItem(currentMaster);
+ item->setForeground(Qt::red);
+ item->setFlags(item->flags() & ~(Qt::ItemIsSelectable));
- mMastersWidget->setItem(i, 0, item);
+ mMastersWidget->setItem(i, 0, item);
+ }
}
- }
- availableMasters.sort(); // Sort the masters alphabetically
+ availableMasters.sort(); // Sort the masters alphabetically
- // Now we put the current plugin in the mDataFilesModel under its masters
- QStandardItem *parent = new QStandardItem(availableMasters.join(","));
+ // Now we put the current plugin in the mDataFilesModel under its masters
+ QStandardItem *parent = new QStandardItem(availableMasters.join(","));
- QString fileName = QString::fromStdString(boost::filesystem::path (iter->second.filename()).string());
- QStandardItem *child = new QStandardItem(fileName);
+ QString fileName = QString::fromStdString(boost::filesystem::path (iter->second.filename()).string());
+ QStandardItem *child = new QStandardItem(fileName);
- // Tooltip information
- QString author = QString::fromStdString(fileReader.getAuthor());
- float version = fileReader.getFVer();
- QString description = QString::fromStdString(fileReader.getDesc());
+ // Tooltip information
+ QString author = QString::fromStdString(fileReader.getAuthor());
+ float version = fileReader.getFVer();
+ QString description = QString::fromStdString(fileReader.getDesc());
- // For the date created/modified
- QFileInfo fi(QString::fromStdString(iter->second.string()));
+ // For the date created/modified
+ QFileInfo fi(QString::fromStdString(iter->second.string()));
- QString toolTip= QString("Author: %1
\
- Version: %2
\
- Description:
\
- %3
\
- Created on: %4
\
- Last modified: %5")
- .arg(author)
- .arg(version)
- .arg(description)
- .arg(fi.created().toString(Qt::TextDate))
- .arg(fi.lastModified().toString(Qt::TextDate));
+ QString toolTip= QString("Author: %1
\
+ Version: %2
\
+ Description:
\
+ %3
\
+ Created on: %4
\
+ Last modified: %5")
+ .arg(author)
+ .arg(version)
+ .arg(description)
+ .arg(fi.created().toString(Qt::TextDate))
+ .arg(fi.lastModified().toString(Qt::TextDate));
- child->setToolTip(toolTip);
+ child->setToolTip(toolTip);
- const QList masterList = mDataFilesModel->findItems(availableMasters.join(","));
+ const QList masterList = mDataFilesModel->findItems(availableMasters.join(","));
- if (masterList.isEmpty()) { // Masters node not yet in the mDataFilesModel
- parent->appendRow(child);
- mDataFilesModel->appendRow(parent);
- } else {
- // Masters node exists, append current plugin
- foreach (QStandardItem *currentItem, masterList) {
- currentItem->appendRow(child);
+ if (masterList.isEmpty()) { // Masters node not yet in the mDataFilesModel
+ parent->appendRow(child);
+ mDataFilesModel->appendRow(parent);
+ } else {
+ // Masters node exists, append current plugin
+ foreach (QStandardItem *currentItem, masterList) {
+ currentItem->appendRow(child);
+ }
}
+
+ } catch(std::runtime_error &e) {
+ // An error occurred while reading the .esp
+ continue;
}
}
@@ -1050,16 +1057,8 @@ void DataFilesPage::writeConfig(QString profile)
return;
}
- // Prepare the OpenMW config
- QString config = QString::fromStdString((mCfgMgr.getLocalPath() / "openmw.cfg").string());
- QFile file(config);
-
- if (!file.exists()) {
- config = QString::fromStdString((mCfgMgr.getUserPath() / "openmw.cfg").string());
- }
-
- // Open the config as a QFile
- file.setFileName(config);
+ // Open the OpenMW config as a QFile
+ QFile file(QString::fromStdString((mCfgMgr.getUserPath() / "openmw.cfg").string()));
if (!file.open(QIODevice::ReadWrite | QIODevice::Text)) {
// File cannot be opened or created
diff --git a/apps/openmw/CMakeLists.txt b/apps/openmw/CMakeLists.txt
index 6d33298dfe..4edc08ba6a 100644
--- a/apps/openmw/CMakeLists.txt
+++ b/apps/openmw/CMakeLists.txt
@@ -81,7 +81,7 @@ add_definitions(${SOUND_DEFINE})
target_link_libraries(openmw
${OGRE_LIBRARIES}
- ${OGRE_STATIC_PLUGINS}
+ ${OGRE_STATIC_PLUGINS}
${OIS_LIBRARIES}
${Boost_LIBRARIES}
${OPENAL_LIBRARY}
@@ -92,6 +92,11 @@ target_link_libraries(openmw
MyGUIOgrePlatform
)
+# Fix for not visible pthreads functions for linker with glibc 2.15
+if (UNIX AND NOT APPLE)
+target_link_libraries(openmw ${CMAKE_THREAD_LIBS_INIT})
+endif()
+
if(APPLE)
find_library(CARBON_FRAMEWORK Carbon)
target_link_libraries(openmw ${CARBON_FRAMEWORK})
diff --git a/apps/openmw/mwdialogue/dialoguemanager.cpp b/apps/openmw/mwdialogue/dialoguemanager.cpp
index dd57dfda07..50549f4a55 100644
--- a/apps/openmw/mwdialogue/dialoguemanager.cpp
+++ b/apps/openmw/mwdialogue/dialoguemanager.cpp
@@ -145,8 +145,6 @@ namespace MWDialogue
bool DialogueManager::functionFilter(const MWWorld::Ptr& actor, const ESM::DialInfo& info,bool choice)
{
- bool isAChoice = false;//is there any choice in the filters?
- bool isFunction = false;
for (std::vector::const_iterator iter (info.selects.begin());
iter != info.selects.end(); ++iter)
{
@@ -154,7 +152,6 @@ namespace MWDialogue
char type = select.selectRule[1];
if(type == '1')
{
- isFunction = true;
char comp = select.selectRule[4];
std::string name = select.selectRule.substr (5);
std::string function = select.selectRule.substr(2,2);
@@ -193,7 +190,7 @@ namespace MWDialogue
break;
case 50://choice
- isAChoice = true;
+
if(choice)
{
if(!selectCompare(comp,mChoice,select.i)) return false;
@@ -516,7 +513,6 @@ namespace MWDialogue
return false;
// TODO check DATAstruct
-
for (std::vector::const_iterator iter (info.selects.begin());
iter != info.selects.end(); ++iter)
if (!isMatching (actor, *iter))
@@ -680,7 +676,8 @@ namespace MWDialogue
void DialogueManager::updateTopics()
{
std::list keywordList;
-
+ int choice = mChoice;
+ mChoice = -1;
actorKnownTopics.clear();
MWGui::DialogueWindow* win = mEnvironment.mWindowManager->getDialogueWindow();
ESMS::RecListT::MapType dialogueList = mEnvironment.mWorld->getStore().dialogs.list;
@@ -692,7 +689,7 @@ namespace MWDialogue
for (std::vector::const_iterator iter (it->second.mInfo.begin());
iter!=it->second.mInfo.end(); ++iter)
{
- if (isMatching (mActor, *iter) && functionFilter(mActor,*iter,false))
+ if (isMatching (mActor, *iter) && functionFilter(mActor,*iter,true))
{
actorKnownTopics.push_back(it->first);
//does the player know the topic?
@@ -706,6 +703,7 @@ namespace MWDialogue
}
}
win->setKeywords(keywordList);
+ mChoice = choice;
}
void DialogueManager::keywordSelected(std::string keyword)
@@ -715,10 +713,9 @@ namespace MWDialogue
if(mDialogueMap.find(keyword) != mDialogueMap.end())
{
ESM::Dialogue ndialogue = mDialogueMap[keyword];
- std::vector::const_iterator iter;
if(ndialogue.type == ESM::Dialogue::Topic)
{
- for (iter = ndialogue.mInfo.begin();
+ for (std::vector::const_iterator iter = ndialogue.mInfo.begin();
iter!=ndialogue.mInfo.end(); ++iter)
{
if (isMatching (mActor, *iter) && functionFilter(mActor,*iter,true))
@@ -742,6 +739,7 @@ namespace MWDialogue
}
}
}
+
updateTopics();
}
diff --git a/apps/openmw/mwdialogue/journal.cpp b/apps/openmw/mwdialogue/journal.cpp
index ea4a5a01e2..0715214ebd 100644
--- a/apps/openmw/mwdialogue/journal.cpp
+++ b/apps/openmw/mwdialogue/journal.cpp
@@ -3,6 +3,9 @@
#include "../mwworld/environment.hpp"
+#include "../mwgui/window_manager.hpp"
+#include "../mwgui/messagebox.hpp"
+
namespace MWDialogue
{
Quest& Journal::getQuest (const std::string& id)
@@ -34,6 +37,10 @@ namespace MWDialogue
Quest& quest = getQuest (id);
quest.addEntry (entry, *mEnvironment.mWorld); // we are doing slicing on purpose here
+
+ std::vector empty;
+ std::string notification = "Your Journal has been updated.";
+ mEnvironment.mWindowManager->messageBox (notification, empty);
}
void Journal::setJournalIndex (const std::string& id, int index)
diff --git a/apps/openmw/mwgui/messagebox.cpp b/apps/openmw/mwgui/messagebox.cpp
index f0745bbbec..cd32fc40f8 100644
--- a/apps/openmw/mwgui/messagebox.cpp
+++ b/apps/openmw/mwgui/messagebox.cpp
@@ -19,7 +19,7 @@ void MessageBoxManager::onFrame (float frameDuration)
if(it->current >= it->max)
{
it->messageBox->mMarkedToDelete = true;
-
+
if(*mMessageBoxes.begin() == it->messageBox) // if this box is the last one
{
// collect all with mMarkedToDelete and delete them.
@@ -47,7 +47,7 @@ void MessageBoxManager::onFrame (float frameDuration)
it++;
}
}
-
+
if(mInterMessageBoxe != NULL && mInterMessageBoxe->mMarkedToDelete) {
delete mInterMessageBoxe;
mInterMessageBoxe = NULL;
@@ -57,20 +57,18 @@ void MessageBoxManager::onFrame (float frameDuration)
void MessageBoxManager::createMessageBox (const std::string& message)
{
- std::cout << "MessageBox: " << message << std::endl;
-
MessageBox *box = new MessageBox(*this, message);
-
+
removeMessageBox(message.length()*mMessageBoxSpeed, box);
-
+
mMessageBoxes.push_back(box);
std::vector::iterator it;
-
+
if(mMessageBoxes.size() > 3) {
delete *mMessageBoxes.begin();
mMessageBoxes.erase(mMessageBoxes.begin());
}
-
+
int height = 0;
for(it = mMessageBoxes.begin(); it != mMessageBoxes.end(); ++it)
{
@@ -88,9 +86,9 @@ bool MessageBoxManager::createInteractiveMessageBox (const std::string& message,
std::cout << "interactive MessageBox: " << message << " - ";
std::copy (buttons.begin(), buttons.end(), std::ostream_iterator (std::cout, ", "));
std::cout << std::endl;
-
+
mInterMessageBoxe = new InteractiveMessageBox(*this, message, buttons);
-
+
return true;
}
@@ -105,7 +103,7 @@ void MessageBoxManager::removeMessageBox (float time, MessageBox *msgbox)
timer.current = 0;
timer.max = time;
timer.messageBox = msgbox;
-
+
mTimers.insert(mTimers.end(), timer);
}
@@ -152,25 +150,25 @@ MessageBox::MessageBox(MessageBoxManager& parMessageBoxManager, const std::strin
mBottomPadding = 20;
mNextBoxPadding = 20;
mMarkedToDelete = false;
-
+
getWidget(mMessageWidget, "message");
-
+
mMessageWidget->setOverflowToTheLeft(true);
mMessageWidget->addText(cMessage);
-
+
MyGUI::IntSize size;
size.width = mFixedWidth;
size.height = 100; // dummy
-
+
MyGUI::IntCoord coord;
coord.left = 10; // dummy
coord.top = 10; // dummy
mMessageWidget->setSize(size);
-
+
MyGUI::IntSize textSize = mMessageWidget->_getTextSize();
size.height = mHeight = textSize.height + 20; // this is the padding between the text and the box
-
+
mMainWidget->setSize(size);
size.width -= 15; // this is to center the text (see messagebox_layout.xml, Widget type="Edit" position="-2 -3 0 0")
mMessageWidget->setSize(size);
@@ -182,11 +180,11 @@ void MessageBox::update (int height)
MyGUI::IntCoord coord;
coord.left = (gameWindowSize.width - mFixedWidth)/2;
coord.top = (gameWindowSize.height - mHeight - height - mBottomPadding);
-
+
MyGUI::IntSize size;
size.width = mFixedWidth;
size.height = mHeight;
-
+
mMainWidget->setCoord(coord);
mMainWidget->setSize(size);
mMainWidget->setVisible(true);
@@ -211,26 +209,26 @@ InteractiveMessageBox::InteractiveMessageBox(MessageBoxManager& parMessageBoxMan
int buttonTopPadding = 5; // ^-- if vertical
int buttonPadding = 5; // padding between button label and button itself
int buttonMainPadding = 10; // padding between buttons and bottom of the main widget
-
+
mMarkedToDelete = false;
-
-
+
+
getWidget(mMessageWidget, "message");
getWidget(mButtonsWidget, "buttons");
-
+
mMessageWidget->setOverflowToTheLeft(true);
mMessageWidget->addText(message);
-
+
MyGUI::IntSize textSize = mMessageWidget->_getTextSize();
-
+
MyGUI::IntSize gameWindowSize = mMessageBoxManager.mWindowManager->getGui()->getViewSize();
-
+
int biggestButtonWidth = 0;
int buttonWidth = 0;
int buttonsWidth = 0;
int buttonHeight = 0;
MyGUI::IntCoord dummyCoord(0, 0, 0, 0);
-
+
std::vector::const_iterator it;
for(it = buttons.begin(); it != buttons.end(); ++it)
{
@@ -240,28 +238,28 @@ InteractiveMessageBox::InteractiveMessageBox(MessageBoxManager& parMessageBoxMan
dummyCoord,
MyGUI::Align::Default);
button->setCaption(*it);
-
- button->eventMouseButtonClick = MyGUI::newDelegate(this, &InteractiveMessageBox::mousePressed);
-
+
+ button->eventMouseButtonClick = MyGUI::newDelegate(this, &InteractiveMessageBox::mousePressed);
+
mButtons.push_back(button);
-
+
buttonWidth = button->_getTextSize().width + 2*buttonPadding + buttonLeftPadding;
buttonsWidth += buttonWidth;
buttonHeight = button->_getTextSize().height + 2*buttonPadding + buttonTopPadding;
-
+
if(buttonWidth > biggestButtonWidth)
{
biggestButtonWidth = buttonWidth;
}
}
buttonsWidth += buttonLeftPadding;
-
+
MyGUI::IntSize mainWidgetSize;
if(buttonsWidth < fixedWidth)
{
// on one line
std::cout << "on one line" << std::endl;
-
+
if(textSize.width + 2*textPadding < buttonsWidth)
{
std::cout << "width = buttonsWidth" << std::endl;
@@ -272,48 +270,48 @@ InteractiveMessageBox::InteractiveMessageBox(MessageBoxManager& parMessageBoxMan
mainWidgetSize.width = textSize.width + 3*textPadding;
}
mainWidgetSize.height = textSize.height + textButtonPadding + buttonHeight + buttonMainPadding;
-
+
MyGUI::IntCoord absCoord;
absCoord.left = (gameWindowSize.width - mainWidgetSize.width)/2;
absCoord.top = (gameWindowSize.height - mainWidgetSize.height)/2;
-
+
std::cout << "width " << mainWidgetSize.width << " height " << mainWidgetSize.height << std::endl;
std::cout << "left " << absCoord.left << " top " << absCoord.top << std::endl;
-
+
mMainWidget->setCoord(absCoord);
mMainWidget->setSize(mainWidgetSize);
-
-
+
+
MyGUI::IntCoord messageWidgetCoord;
messageWidgetCoord.left = (mainWidgetSize.width - textSize.width)/2;
messageWidgetCoord.top = textPadding;
mMessageWidget->setCoord(messageWidgetCoord);
-
+
mMessageWidget->setSize(textSize);
-
+
MyGUI::IntCoord buttonCord;
MyGUI::IntSize buttonSize(0, buttonHeight);
int left = (mainWidgetSize.width - buttonsWidth)/2 + buttonPadding;
-
+
std::vector::const_iterator button;
for(button = mButtons.begin(); button != mButtons.end(); ++button)
{
buttonCord.left = left;
buttonCord.top = textSize.height + textButtonPadding;
-
+
buttonSize.width = (*button)->_getTextSize().width + 2*buttonPadding;
buttonSize.height = (*button)->_getTextSize().height + 2*buttonPadding;
-
+
(*button)->setCoord(buttonCord);
(*button)->setSize(buttonSize);
-
+
left += buttonSize.width + buttonLeftPadding;
}
}
else
{
// among each other
-
+
if(biggestButtonWidth > textSize.width) {
mainWidgetSize.width = biggestButtonWidth + buttonTopPadding;
}
@@ -321,46 +319,46 @@ InteractiveMessageBox::InteractiveMessageBox(MessageBoxManager& parMessageBoxMan
mainWidgetSize.width = textSize.width + 3*textPadding;
}
mainWidgetSize.height = textSize.height + 2*textPadding + textButtonPadding + buttonHeight * buttons.size() + buttonMainPadding;
-
+
std::cout << "biggestButtonWidth " << biggestButtonWidth << " textSize.width " << textSize.width << std::endl;
std::cout << "width " << mainWidgetSize.width << " height " << mainWidgetSize.height << std::endl;
mMainWidget->setSize(mainWidgetSize);
-
+
MyGUI::IntCoord absCoord;
absCoord.left = (gameWindowSize.width - mainWidgetSize.width)/2;
absCoord.top = (gameWindowSize.height - mainWidgetSize.height)/2;
-
+
mMainWidget->setCoord(absCoord);
mMainWidget->setSize(mainWidgetSize);
-
-
+
+
MyGUI::IntCoord messageWidgetCoord;
messageWidgetCoord.left = (mainWidgetSize.width - textSize.width)/2;
messageWidgetCoord.top = textPadding;
mMessageWidget->setCoord(messageWidgetCoord);
-
+
mMessageWidget->setSize(textSize);
-
+
MyGUI::IntCoord buttonCord;
MyGUI::IntSize buttonSize(0, buttonHeight);
-
+
int top = textButtonPadding + buttonTopPadding + textSize.height;
-
+
std::vector::const_iterator button;
for(button = mButtons.begin(); button != mButtons.end(); ++button)
{
buttonSize.width = (*button)->_getTextSize().width + buttonPadding*2;
buttonSize.height = (*button)->_getTextSize().height + buttonPadding*2;
-
+
buttonCord.top = top;
buttonCord.left = (mainWidgetSize.width - buttonSize.width)/2 - 5; // FIXME: -5 is not so nice :/
-
+
(*button)->setCoord(buttonCord);
(*button)->setSize(buttonSize);
-
+
top += buttonSize.height + 2*buttonTopPadding;
}
-
+
}
}
@@ -387,8 +385,3 @@ int InteractiveMessageBox::readPressedButton ()
mButtonPressed = -1;
return pressed;
}
-
-
-
-
-
diff --git a/apps/openmw/mwworld/weather.cpp b/apps/openmw/mwworld/weather.cpp
index 044d6e83a7..9a918c2fb3 100644
--- a/apps/openmw/mwworld/weather.cpp
+++ b/apps/openmw/mwworld/weather.cpp
@@ -271,7 +271,8 @@ WeatherManager::WeatherManager(MWRender::RenderingManager* rendering, Environmen
blight.mGlareView = 0;
blight.mAmbientLoopSoundID = "blight";
mWeatherSettings["blight"] = blight;
-
+
+ /*
Weather snow;
snow.mCloudTexture = "tx_bm_sky_snow.dds";
snow.mCloudsMaximumPercent = 1.0;
@@ -328,6 +329,7 @@ WeatherManager::WeatherManager(MWRender::RenderingManager* rendering, Environmen
blizzard.mGlareView = 0;
blizzard.mAmbientLoopSoundID = "BM Blizzard";
mWeatherSettings["blizzard"] = blizzard;
+ */
}
void WeatherManager::setWeather(const String& weather, bool instant)
@@ -509,32 +511,32 @@ void WeatherManager::update(float duration)
float thunder = region->data.thunder/255.f;
float ash = region->data.ash/255.f;
float blight = region->data.blight/255.f;
- float snow = region->data.a/255.f;
- float blizzard = region->data.b/255.f;
+ //float snow = region->data.a/255.f;
+ //float blizzard = region->data.b/255.f;
// re-scale to 100 percent
- const float total = clear+cloudy+foggy+overcast+rain+thunder+ash+blight+snow+blizzard;
+ const float total = clear+cloudy+foggy+overcast+rain+thunder+ash+blight;//+snow+blizzard;
srand(time(NULL));
float random = ((rand()%100)/100.f) * total;
- if (random >= snow+blight+ash+thunder+rain+overcast+foggy+cloudy+clear)
- weather = "blizzard";
- else if (random >= blight+ash+thunder+rain+overcast+foggy+cloudy+clear)
- weather = "snow";
- else if (random >= ash+thunder+rain+overcast+foggy+cloudy+clear)
+ //if (random > snow+blight+ash+thunder+rain+overcast+foggy+cloudy+clear)
+ // weather = "blizzard";
+ //else if (random > blight+ash+thunder+rain+overcast+foggy+cloudy+clear)
+ // weather = "snow";
+ /*else*/ if (random > ash+thunder+rain+overcast+foggy+cloudy+clear)
weather = "blight";
- else if (random >= thunder+rain+overcast+foggy+cloudy+clear)
+ else if (random > thunder+rain+overcast+foggy+cloudy+clear)
weather = "ashstorm";
- else if (random >= rain+overcast+foggy+cloudy+clear)
+ else if (random > rain+overcast+foggy+cloudy+clear)
weather = "thunderstorm";
- else if (random >= overcast+foggy+cloudy+clear)
+ else if (random > overcast+foggy+cloudy+clear)
weather = "rain";
- else if (random >= foggy+cloudy+clear)
+ else if (random > foggy+cloudy+clear)
weather = "overcast";
- else if (random >= cloudy+clear)
+ else if (random > cloudy+clear)
weather = "foggy";
- else if (random >= clear)
+ else if (random > clear)
weather = "cloudy";
else
weather = "clear";
diff --git a/readme.txt b/readme.txt
index 149fd4f193..4c265c4624 100644
--- a/readme.txt
+++ b/readme.txt
@@ -93,6 +93,7 @@ CREDITS
Current Developers:
Alexander “Ace” Olofsson
athile
+BrotherBrick
Cris “Mirceam” Mihalache
gugus / gus
Jacob “Yacoby” Essex
@@ -104,6 +105,7 @@ Marc “Zini” Zinnschlag
Michael “werdanith” Papageorgiou
Nikolay “corristo” Kasyanov
Pieter “pvdk” van der Kloet
+Roman "Kromgart" Melnik
Sebastian “swick” Wick
Retired Developers:
@@ -134,12 +136,15 @@ Bug #179: Pressing space in console triggers activation
Bug #186: CMake doesn't use the debug versions of Ogre libraries on Linux
Bug #189: ASCII 16 character added to console on it's activation on Mac OS X
Bug #190: Case Folding fails with music files
+Bug #192: Keypresses write Text into Console no matter which gui element is active
Bug #196: Collision shapes out of place
Bug #202: ESMTool doesn't not work with localised ESM files anymore
Bug #203: Torch lights only visible on short distance
Bug #207: Ogre.log not written
Bug #209: Sounds do not play
Bug #210: Ogre crash at Dren plantation
+Bug #214: Unsupported file format version
+Bug #222: Launcher is writing openmw.cfg file to wrong location
Feature #9: NPC Dialogue Window
Feature #16/42: New sky/weather implementation
Feature #40: Fading