Merge remote-tracking branch 'zini/master' into nif-fixes

actorid
Chris Robinson 12 years ago
commit ae5c0663f5

@ -6,6 +6,8 @@
#include <OgreTextureManager.h>
#include <OgreSceneNode.h>
#include <MyGUI_Gui.h>
#include "../mwbase/windowmanager.hpp"
#include "../mwbase/world.hpp"
#include "../mwbase/environment.hpp"
@ -13,6 +15,8 @@
#include "../mwrender/globalmap.hpp"
#include "widgets.hpp"
using namespace MWGui;
LocalMapBase::LocalMapBase()
@ -96,6 +100,7 @@ void LocalMapBase::applyFogOfWar()
: "");
}
}
notifyMapChanged ();
}
void LocalMapBase::onMarkerFocused (MyGUI::Widget* w1, MyGUI::Widget* w2)
@ -425,3 +430,17 @@ void MapWindow::notifyPlayerUpdate ()
{
globalMapUpdatePlayer ();
}
void MapWindow::notifyMapChanged ()
{
// workaround to prevent the map from drawing on top of the button
MyGUI::IntCoord oldCoord = mButton->getCoord ();
MyGUI::Gui::getInstance().destroyWidget (mButton);
mButton = mMainWidget->createWidget<MWGui::Widgets::AutoSizedButton>("MW_Button",
oldCoord, MyGUI::Align::Bottom | MyGUI::Align::Right);
mButton->setProperty ("ExpandDirection", "Left");
mButton->eventMouseButtonClick += MyGUI::newDelegate(this, &MapWindow::onWorldButtonClicked);
mButton->setCaptionWithReplacing( mGlobal ? "#{sLocal}" :
"#{sWorld}");
}

@ -50,6 +50,7 @@ namespace MWGui
void onMarkerUnfocused(MyGUI::Widget* w1, MyGUI::Widget* w2);
virtual void notifyPlayerUpdate() {}
virtual void notifyMapChanged() {}
OEngine::GUI::Layout* mLayout;
@ -99,6 +100,8 @@ namespace MWGui
virtual void onPinToggled();
virtual void notifyPlayerUpdate();
virtual void notifyMapChanged();
};
}
#endif

@ -37,14 +37,14 @@ public:
*************************************************************************/
int getVer() const { return mCtx.header.version; }
float getFVer() { if(mCtx.header.version == VER_12) return 1.2; else return 1.3; }
int getSpecial() { return mSpf; }
int getType() { return mCtx.header.type; }
const std::string getAuthor() { return mCtx.header.author.toString(); }
const std::string getDesc() { return mCtx.header.desc.toString(); }
float getFVer() const { if(mCtx.header.version == VER_12) return 1.2; else return 1.3; }
int getSpecial() const { return mSpf; }
int getType() const { return mCtx.header.type; }
const std::string getAuthor() const { return mCtx.header.author.toString(); }
const std::string getDesc() const { return mCtx.header.desc.toString(); }
const SaveData &getSaveData() const { return mSaveData; }
const MasterList &getMasters() { return mMasters; }
const NAME &retSubName() { return mCtx.subName; }
const MasterList &getMasters() const { return mMasters; }
const NAME &retSubName() const { return mCtx.subName; }
uint32_t getSubSize() const { return mCtx.leftSub; }
/*************************************************************************
@ -85,7 +85,7 @@ public:
int mIdx;
void setIndex(const int index) {mIdx = index; mCtx.index = index;}
const int getIndex() {return mIdx;}
void setGlobalReaderList(std::vector<ESMReader> *list) {mGlobalReaderList = list;}
std::vector<ESMReader> *getGlobalReaderList() {return mGlobalReaderList;}

@ -7,12 +7,27 @@ namespace ESM
{
void Apparatus::load(ESMReader &esm)
{
mModel = esm.getHNString("MODL");
mName = esm.getHNString("FNAM");
esm.getHNT(mData, "AADT", 16);
mScript = esm.getHNOString("SCRI");
mIcon = esm.getHNString("ITEX");
// we will not treat duplicated subrecords as errors here
while (esm.hasMoreSubs())
{
esm.getSubName();
NAME subName = esm.retSubName();
if (subName == "MODL")
mModel = esm.getHString();
else if (subName == "FNAM")
mName = esm.getHString();
else if (subName == "AADT")
esm.getHT(mData);
else if (subName == "SCRI")
mScript = esm.getHString();
else if (subName == "ITEX")
mIcon = esm.getHString();
else
esm.fail("wrong subrecord type " + subName.toString() + " for APPA record");
}
}
void Apparatus::save(ESMWriter &esm)
{
esm.writeHNCString("MODL", mModel);

Loading…
Cancel
Save