mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-29 22:45:34 +00:00
Merge remote-tracking branch 'scrawl/master'
This commit is contained in:
commit
af322a9f77
30 changed files with 175 additions and 117 deletions
|
@ -156,8 +156,9 @@ namespace MWBase
|
|||
virtual void setValue (const std::string& id, int value) = 0;
|
||||
|
||||
/// Set time left for the player to start drowning (update the drowning bar)
|
||||
/// @param time value from [0,20]
|
||||
virtual void setDrowningTimeLeft (float time) =0;
|
||||
/// @param time time left to start drowning
|
||||
/// @param maxTime how long we can be underwater (in total) until drowning starts
|
||||
virtual void setDrowningTimeLeft (float time, float maxTime) = 0;
|
||||
|
||||
virtual void setPlayerClass (const ESM::Class &class_) = 0;
|
||||
///< set current class of player
|
||||
|
|
|
@ -188,12 +188,13 @@ namespace MWGui
|
|||
break;
|
||||
|
||||
case GM_ClassCreate:
|
||||
MWBase::Environment::get().getWindowManager()->removeDialog(mCreateClassDialog);
|
||||
mCreateClassDialog = 0;
|
||||
mCreateClassDialog = new CreateClassDialog();
|
||||
if (!mCreateClassDialog)
|
||||
{
|
||||
mCreateClassDialog = new CreateClassDialog();
|
||||
mCreateClassDialog->eventDone += MyGUI::newDelegate(this, &CharacterCreation::onCreateClassDialogDone);
|
||||
mCreateClassDialog->eventBack += MyGUI::newDelegate(this, &CharacterCreation::onCreateClassDialogBack);
|
||||
}
|
||||
mCreateClassDialog->setNextButtonShow(mCreationStage >= CSE_ClassChosen);
|
||||
mCreateClassDialog->eventDone += MyGUI::newDelegate(this, &CharacterCreation::onCreateClassDialogDone);
|
||||
mCreateClassDialog->eventBack += MyGUI::newDelegate(this, &CharacterCreation::onCreateClassDialogBack);
|
||||
mCreateClassDialog->setVisible(true);
|
||||
if (mCreationStage < CSE_RaceChosen)
|
||||
mCreationStage = CSE_RaceChosen;
|
||||
|
@ -531,8 +532,8 @@ namespace MWGui
|
|||
mPlayerClass = klass;
|
||||
MWBase::Environment::get().getWindowManager()->setPlayerClass(klass);
|
||||
|
||||
MWBase::Environment::get().getWindowManager()->removeDialog(mCreateClassDialog);
|
||||
mCreateClassDialog = 0;
|
||||
// Do not delete dialog, so that choices are rembered in case we want to go back and adjust them later
|
||||
mCreateClassDialog->setVisible(false);
|
||||
}
|
||||
|
||||
updatePlayerHealth();
|
||||
|
@ -554,8 +555,8 @@ namespace MWGui
|
|||
|
||||
void CharacterCreation::onCreateClassDialogBack()
|
||||
{
|
||||
MWBase::Environment::get().getWindowManager()->removeDialog(mCreateClassDialog);
|
||||
mCreateClassDialog = 0;
|
||||
// Do not delete dialog, so that choices are rembered in case we want to go back and adjust them later
|
||||
mCreateClassDialog->setVisible(false);
|
||||
|
||||
MWBase::Environment::get().getWindowManager()->popGuiMode();
|
||||
MWBase::Environment::get().getWindowManager()->pushGuiMode(GM_Class);
|
||||
|
|
|
@ -10,7 +10,7 @@ namespace MWGui
|
|||
{
|
||||
}
|
||||
|
||||
void CompanionItemModel::copyItem (const ItemStack& item, size_t count)
|
||||
void CompanionItemModel::copyItem (const ItemStack& item, size_t count, bool setNewOwner=false)
|
||||
{
|
||||
if (mActor.getClass().isNpc())
|
||||
{
|
||||
|
@ -18,7 +18,7 @@ namespace MWGui
|
|||
stats.modifyProfit(MWWorld::Class::get(item.mBase).getValue(item.mBase) * count);
|
||||
}
|
||||
|
||||
InventoryItemModel::copyItem(item, count);
|
||||
InventoryItemModel::copyItem(item, count, setNewOwner);
|
||||
}
|
||||
|
||||
void CompanionItemModel::removeItem (const ItemStack& item, size_t count)
|
||||
|
|
|
@ -13,7 +13,7 @@ namespace MWGui
|
|||
public:
|
||||
CompanionItemModel (const MWWorld::Ptr& actor);
|
||||
|
||||
virtual void copyItem (const ItemStack& item, size_t count);
|
||||
virtual void copyItem (const ItemStack& item, size_t count, bool setNewOwner);
|
||||
virtual void removeItem (const ItemStack& item, size_t count);
|
||||
};
|
||||
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
#include "../mwworld/containerstore.hpp"
|
||||
|
||||
#include "../mwmechanics/pickpocket.hpp"
|
||||
#include "../mwmechanics/creaturestats.hpp"
|
||||
|
||||
#include "countdialog.hpp"
|
||||
#include "tradewindow.hpp"
|
||||
|
@ -84,8 +85,7 @@ namespace MWGui
|
|||
// otherwise, do the transfer
|
||||
if (targetModel != mSourceModel)
|
||||
{
|
||||
targetModel->copyItem(mItem, mDraggedCount);
|
||||
mSourceModel->removeItem(mItem, mDraggedCount);
|
||||
mSourceModel->moveItem(mItem, mDraggedCount, targetModel);
|
||||
}
|
||||
|
||||
mSourceModel->update();
|
||||
|
@ -292,8 +292,7 @@ namespace MWGui
|
|||
if (!onTakeItem(item, item.mCount))
|
||||
break;
|
||||
|
||||
playerModel->copyItem(item, item.mCount);
|
||||
mModel->removeItem(item, item.mCount);
|
||||
mModel->moveItem(item, item.mCount, playerModel);
|
||||
}
|
||||
|
||||
MWBase::Environment::get().getWindowManager()->removeGuiMode(GM_Container);
|
||||
|
@ -341,7 +340,11 @@ namespace MWGui
|
|||
}
|
||||
else
|
||||
{
|
||||
MWBase::Environment::get().getMechanicsManager()->itemTaken(player, item.mBase, count);
|
||||
// Looting a dead corpse is considered OK
|
||||
if (mPtr.getClass().isActor() && mPtr.getClass().getCreatureStats(mPtr).isDead())
|
||||
return true;
|
||||
else
|
||||
MWBase::Environment::get().getMechanicsManager()->itemTaken(player, item.mBase, count);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -71,7 +71,7 @@ ItemModel::ModelIndex ContainerItemModel::getIndex (ItemStack item)
|
|||
return -1;
|
||||
}
|
||||
|
||||
void ContainerItemModel::copyItem (const ItemStack& item, size_t count)
|
||||
void ContainerItemModel::copyItem (const ItemStack& item, size_t count, bool setNewOwner)
|
||||
{
|
||||
const MWWorld::Ptr& source = mItemSources[mItemSources.size()-1];
|
||||
if (item.mBase.getContainerStore() == &source.getClass().getContainerStore(source))
|
||||
|
|
|
@ -21,7 +21,7 @@ namespace MWGui
|
|||
virtual ModelIndex getIndex (ItemStack item);
|
||||
virtual size_t getItemCount();
|
||||
|
||||
virtual void copyItem (const ItemStack& item, size_t count);
|
||||
virtual void copyItem (const ItemStack& item, size_t count, bool setNewOwner=false);
|
||||
virtual void removeItem (const ItemStack& item, size_t count);
|
||||
|
||||
virtual void update();
|
||||
|
|
|
@ -203,9 +203,9 @@ namespace MWGui
|
|||
}
|
||||
}
|
||||
|
||||
void HUD::setDrowningTimeLeft(float time)
|
||||
void HUD::setDrowningTimeLeft(float time, float maxTime)
|
||||
{
|
||||
size_t progress = time/20.0*200.0;
|
||||
size_t progress = time/maxTime*200.0;
|
||||
mDrowning->setProgressPosition(progress);
|
||||
|
||||
bool isDrowning = (progress == 0);
|
||||
|
@ -625,7 +625,7 @@ namespace MWGui
|
|||
if (mIsDrowning)
|
||||
{
|
||||
float intensity = (cos(mDrowningFlashTheta) + 1.0f) / 2.0f;
|
||||
mDrowningFlash->setColour(MyGUI::Colour(intensity, intensity, intensity));
|
||||
mDrowningFlash->setColour(MyGUI::Colour(intensity, 0, 0));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -22,8 +22,9 @@ namespace MWGui
|
|||
void setBatchCount(unsigned int count);
|
||||
|
||||
/// Set time left for the player to start drowning
|
||||
/// @param time value from [0,20]
|
||||
void setDrowningTimeLeft(float time);
|
||||
/// @param time time left to start drowning
|
||||
/// @param maxTime how long we can be underwater (in total) until drowning starts
|
||||
void setDrowningTimeLeft(float time, float maxTime);
|
||||
void setDrowningBarVisible(bool visible);
|
||||
|
||||
void setHmsVisible(bool visible);
|
||||
|
|
|
@ -4,6 +4,8 @@
|
|||
#include "../mwworld/class.hpp"
|
||||
#include "../mwworld/inventorystore.hpp"
|
||||
|
||||
#include "../mwmechanics/creaturestats.hpp"
|
||||
|
||||
namespace MWGui
|
||||
{
|
||||
|
||||
|
@ -38,11 +40,11 @@ ItemModel::ModelIndex InventoryItemModel::getIndex (ItemStack item)
|
|||
return -1;
|
||||
}
|
||||
|
||||
void InventoryItemModel::copyItem (const ItemStack& item, size_t count)
|
||||
void InventoryItemModel::copyItem (const ItemStack& item, size_t count, bool setNewOwner)
|
||||
{
|
||||
if (item.mBase.getContainerStore() == &mActor.getClass().getContainerStore(mActor))
|
||||
throw std::runtime_error("Item to copy needs to be from a different container!");
|
||||
mActor.getClass().getContainerStore(mActor).add(item.mBase, count, mActor);
|
||||
mActor.getClass().getContainerStore(mActor).add(item.mBase, count, mActor, setNewOwner);
|
||||
}
|
||||
|
||||
|
||||
|
@ -57,6 +59,18 @@ void InventoryItemModel::removeItem (const ItemStack& item, size_t count)
|
|||
throw std::runtime_error("Not enough items in the stack to remove");
|
||||
}
|
||||
|
||||
void InventoryItemModel::moveItem(const ItemStack &item, size_t count, ItemModel *otherModel)
|
||||
{
|
||||
bool setNewOwner = false;
|
||||
|
||||
// Are you dead? Then you wont need that anymore
|
||||
if (mActor.getClass().isActor() && mActor.getClass().getCreatureStats(mActor).isDead())
|
||||
setNewOwner = true;
|
||||
|
||||
otherModel->copyItem(item, count, setNewOwner);
|
||||
removeItem(item, count);
|
||||
}
|
||||
|
||||
void InventoryItemModel::update()
|
||||
{
|
||||
MWWorld::ContainerStore& store = MWWorld::Class::get(mActor).getContainerStore(mActor);
|
||||
|
|
|
@ -15,9 +15,12 @@ namespace MWGui
|
|||
virtual ModelIndex getIndex (ItemStack item);
|
||||
virtual size_t getItemCount();
|
||||
|
||||
virtual void copyItem (const ItemStack& item, size_t count);
|
||||
virtual void copyItem (const ItemStack& item, size_t count, bool setNewOwner=false);
|
||||
virtual void removeItem (const ItemStack& item, size_t count);
|
||||
|
||||
/// Move items from this model to \a otherModel.
|
||||
virtual void moveItem (const ItemStack& item, size_t count, ItemModel* otherModel);
|
||||
|
||||
virtual void update();
|
||||
|
||||
protected:
|
||||
|
|
|
@ -71,16 +71,22 @@ namespace MWGui
|
|||
{
|
||||
}
|
||||
|
||||
void ItemModel::moveItem(const ItemStack &item, size_t count, ItemModel *otherModel)
|
||||
{
|
||||
otherModel->copyItem(item, count);
|
||||
removeItem(item, count);
|
||||
}
|
||||
|
||||
|
||||
ProxyItemModel::~ProxyItemModel()
|
||||
{
|
||||
delete mSourceModel;
|
||||
}
|
||||
|
||||
void ProxyItemModel::copyItem (const ItemStack& item, size_t count)
|
||||
void ProxyItemModel::copyItem (const ItemStack& item, size_t count, bool setNewOwner)
|
||||
{
|
||||
// no need to use mapToSource since itemIndex refers to an index in the sourceModel
|
||||
mSourceModel->copyItem (item, count);
|
||||
mSourceModel->copyItem (item, count, setNewOwner);
|
||||
}
|
||||
|
||||
void ProxyItemModel::removeItem (const ItemStack& item, size_t count)
|
||||
|
|
|
@ -55,7 +55,11 @@ namespace MWGui
|
|||
|
||||
virtual void update() = 0;
|
||||
|
||||
virtual void copyItem (const ItemStack& item, size_t count) = 0;
|
||||
/// Move items from this model to \a otherModel.
|
||||
virtual void moveItem (const ItemStack& item, size_t count, ItemModel* otherModel);
|
||||
|
||||
/// @param setNewOwner Set the copied item's owner to the actor we are copying to, or keep the original owner?
|
||||
virtual void copyItem (const ItemStack& item, size_t count, bool setNewOwner=false) = 0;
|
||||
virtual void removeItem (const ItemStack& item, size_t count) = 0;
|
||||
|
||||
private:
|
||||
|
@ -69,7 +73,7 @@ namespace MWGui
|
|||
{
|
||||
public:
|
||||
virtual ~ProxyItemModel();
|
||||
virtual void copyItem (const ItemStack& item, size_t count);
|
||||
virtual void copyItem (const ItemStack& item, size_t count, bool setNewOwner=false);
|
||||
virtual void removeItem (const ItemStack& item, size_t count);
|
||||
virtual ModelIndex getIndex (ItemStack item);
|
||||
|
||||
|
|
|
@ -120,14 +120,11 @@ namespace MWGui
|
|||
if (i == sourceModel->getItemCount())
|
||||
throw std::runtime_error("The borrowed item disappeared");
|
||||
|
||||
// reset owner before copying
|
||||
// reset owner while copying, but only for items bought by the player
|
||||
bool setNewOwner = (mMerchant.isEmpty());
|
||||
const ItemStack& item = sourceModel->getItem(i);
|
||||
std::string owner = item.mBase.getCellRef().mOwner;
|
||||
if (mMerchant.isEmpty()) // only for items bought by player
|
||||
item.mBase.getCellRef().mOwner = "";
|
||||
// copy the borrowed items to our model
|
||||
copyItem(item, it->mCount);
|
||||
item.mBase.getCellRef().mOwner = owner;
|
||||
copyItem(item, it->mCount, setNewOwner);
|
||||
// then remove them from the source model
|
||||
sourceModel->removeItem(item, it->mCount);
|
||||
}
|
||||
|
|
|
@ -625,9 +625,9 @@ namespace MWGui
|
|||
mStatsWindow->setValue (id, value);
|
||||
}
|
||||
|
||||
void WindowManager::setDrowningTimeLeft (float time)
|
||||
void WindowManager::setDrowningTimeLeft (float time, float maxTime)
|
||||
{
|
||||
mHud->setDrowningTimeLeft(time);
|
||||
mHud->setDrowningTimeLeft(time, maxTime);
|
||||
}
|
||||
|
||||
void WindowManager::setPlayerClass (const ESM::Class &class_)
|
||||
|
|
|
@ -166,8 +166,9 @@ namespace MWGui
|
|||
virtual void setValue (const std::string& id, int value);
|
||||
|
||||
/// Set time left for the player to start drowning (update the drowning bar)
|
||||
/// @param time value from [0,20]
|
||||
virtual void setDrowningTimeLeft (float time);
|
||||
/// @param time time left to start drowning
|
||||
/// @param maxTime how long we can be underwater (in total) until drowning starts
|
||||
virtual void setDrowningTimeLeft (float time, float maxTime);
|
||||
|
||||
virtual void setPlayerClass (const ESM::Class &class_); ///< set current class of player
|
||||
virtual void configureSkills (const SkillList& major, const SkillList& minor); ///< configure skill groups, each set contains the skill ID for that group.
|
||||
|
|
|
@ -194,21 +194,11 @@ namespace MWMechanics
|
|||
+(actorpos.pos[1] - playerpos.pos[1])*(actorpos.pos[1] - playerpos.pos[1])
|
||||
+(actorpos.pos[2] - playerpos.pos[2])*(actorpos.pos[2] - playerpos.pos[2]));
|
||||
float fight = ptr.getClass().getCreatureStats(ptr).getAiSetting(CreatureStats::AI_Fight).getModified();
|
||||
float disp = 100; //creatures don't have disposition, so set it to 100 by default
|
||||
if(ptr.getTypeName() == typeid(ESM::NPC).name())
|
||||
{
|
||||
disp = MWBase::Environment::get().getMechanicsManager()->getDerivedDisposition(ptr);
|
||||
}
|
||||
|
||||
if( (fight == 100 )
|
||||
|| (fight >= 95 && d <= 3000)
|
||||
|| (fight >= 90 && d <= 2000)
|
||||
|| (fight >= 80 && d <= 1000)
|
||||
|| (fight >= 80 && disp <= 40)
|
||||
|| (fight >= 70 && disp <= 35 && d <= 1000)
|
||||
|| (fight >= 60 && disp <= 30 && d <= 1000)
|
||||
|| (fight >= 50 && disp == 0)
|
||||
|| (fight >= 40 && disp <= 10 && d <= 500)
|
||||
)
|
||||
{
|
||||
bool LOS = MWBase::Environment::get().getWorld()->getLOS(ptr,player)
|
||||
|
|
|
@ -298,13 +298,15 @@ namespace MWMechanics
|
|||
|
||||
if(stats.getTimeToStartDrowning() != mWatchedStats.getTimeToStartDrowning())
|
||||
{
|
||||
const float fHoldBreathTime = MWBase::Environment::get().getWorld()->getStore().get<ESM::GameSetting>()
|
||||
.find("fHoldBreathTime")->getFloat();
|
||||
mWatchedStats.setTimeToStartDrowning(stats.getTimeToStartDrowning());
|
||||
if(stats.getTimeToStartDrowning() >= 20.0f)
|
||||
if(stats.getTimeToStartDrowning() >= fHoldBreathTime)
|
||||
winMgr->setDrowningBarVisibility(false);
|
||||
else
|
||||
{
|
||||
winMgr->setDrowningBarVisibility(true);
|
||||
winMgr->setDrowningTimeLeft(stats.getTimeToStartDrowning());
|
||||
winMgr->setDrowningTimeLeft(stats.getTimeToStartDrowning(), fHoldBreathTime);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -338,6 +340,8 @@ namespace MWMechanics
|
|||
MWWorld::ContainerStoreIterator enchantItem = inv.getSelectedEnchantItem();
|
||||
if (enchantItem != inv.end())
|
||||
winMgr->setSelectedEnchantItem(*enchantItem);
|
||||
else if (winMgr->getSelectedSpell() == "")
|
||||
winMgr->unsetSelectedSpell();
|
||||
}
|
||||
|
||||
if (mUpdatePlayer)
|
||||
|
|
|
@ -6,14 +6,9 @@
|
|||
#include <cstdio>
|
||||
#include <cmath>
|
||||
|
||||
#include <OgreRoot.h>
|
||||
#include <OgreHardwarePixelBuffer.h>
|
||||
#include <OgreRenderWindow.h>
|
||||
#include <OgreTextureManager.h>
|
||||
#include <OgreTechnique.h>
|
||||
#include <OgreRectangle2D.h>
|
||||
#include <OgreMaterialManager.h>
|
||||
#include <OgreSceneNode.h>
|
||||
#include <OgreStringConverter.h>
|
||||
|
||||
#include <boost/thread.hpp>
|
||||
|
||||
|
@ -21,9 +16,6 @@
|
|||
#include "../mwbase/soundmanager.hpp"
|
||||
#include "../mwsound/sound_decoder.hpp"
|
||||
#include "../mwsound/sound.hpp"
|
||||
#include "../mwbase/inputmanager.hpp"
|
||||
|
||||
#include "renderconst.hpp"
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <BaseTsd.h>
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
#include "../mwbase/environment.hpp"
|
||||
#include "../mwbase/windowmanager.hpp"
|
||||
#include "../mwbase/world.hpp"
|
||||
#include "../mwbase/world.hpp"
|
||||
|
||||
#include "../mwworld/player.hpp"
|
||||
|
||||
|
@ -24,7 +23,12 @@ namespace MWWorld
|
|||
|
||||
void ActionRead::executeImp (const MWWorld::Ptr& actor) {
|
||||
|
||||
if(MWBase::Environment::get().getWorld()->getPlayer().isInCombat()) { //Ensure we're not in combat
|
||||
//Ensure we're not in combat
|
||||
if(MWBase::Environment::get().getWorld()->getPlayer().isInCombat()
|
||||
// Reading in combat is still allowed if the scroll/book is not in the player inventory yet
|
||||
// (since otherwise, there would be no way to pick it up)
|
||||
&& getTarget().getContainerStore() == &actor.getClass().getContainerStore(actor)
|
||||
) {
|
||||
MWBase::Environment::get().getWindowManager()->messageBox("#{sInventoryMessage4}");
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -187,11 +187,38 @@ MWWorld::ContainerStoreIterator MWWorld::ContainerStore::add(const std::string &
|
|||
|
||||
MWWorld::ContainerStoreIterator MWWorld::ContainerStore::add (const Ptr& itemPtr, int count, const Ptr& actorPtr, bool setOwner)
|
||||
{
|
||||
MWWorld::ContainerStoreIterator it = addImp(itemPtr, count);
|
||||
Ptr player = MWBase::Environment::get().getWorld ()->getPlayerPtr();
|
||||
|
||||
MWWorld::ContainerStoreIterator it = end();
|
||||
|
||||
if (setOwner && actorPtr.getClass().isActor())
|
||||
{
|
||||
// HACK: Set owner on the original item, then reset it after we have copied it
|
||||
// If we set the owner on the copied item, it would not stack correctly...
|
||||
std::string oldOwner = itemPtr.getCellRef().mOwner;
|
||||
if (actorPtr == player)
|
||||
{
|
||||
// No point in setting owner to the player - NPCs will not respect this anyway
|
||||
// Additionally, setting it to "player" would make those items not stack with items that don't have an owner
|
||||
itemPtr.getCellRef().mOwner = "";
|
||||
}
|
||||
else
|
||||
itemPtr.getCellRef().mOwner = actorPtr.getCellRef().mRefID;
|
||||
|
||||
it = addImp(itemPtr, count);
|
||||
|
||||
itemPtr.getCellRef().mOwner = oldOwner;
|
||||
}
|
||||
else
|
||||
{
|
||||
it = addImp(itemPtr, count);
|
||||
}
|
||||
|
||||
// The copy of the original item we just made
|
||||
MWWorld::Ptr item = *it;
|
||||
|
||||
// we may have copied an item from the world, so reset a few things first
|
||||
item.getRefData().setBaseNode(NULL);
|
||||
item.getRefData().setBaseNode(NULL); // Especially important, otherwise scripts on the item could think that it's actually in a cell
|
||||
item.getCellRef().mPos.rot[0] = 0;
|
||||
item.getCellRef().mPos.rot[1] = 0;
|
||||
item.getCellRef().mPos.rot[2] = 0;
|
||||
|
@ -199,16 +226,11 @@ MWWorld::ContainerStoreIterator MWWorld::ContainerStore::add (const Ptr& itemPtr
|
|||
item.getCellRef().mPos.pos[1] = 0;
|
||||
item.getCellRef().mPos.pos[2] = 0;
|
||||
|
||||
if (setOwner && actorPtr.getClass().isActor())
|
||||
item.getCellRef().mOwner = actorPtr.getCellRef().mRefID;
|
||||
|
||||
std::string script = MWWorld::Class::get(item).getScript(item);
|
||||
if(script != "")
|
||||
{
|
||||
CellStore *cell;
|
||||
|
||||
Ptr player = MWBase::Environment::get().getWorld ()->getPlayerPtr();
|
||||
|
||||
if(&(MWWorld::Class::get (player).getContainerStore (player)) == this)
|
||||
{
|
||||
cell = 0; // Items in player's inventory have cell set to 0, so their scripts will never be removed
|
||||
|
|
|
@ -4,7 +4,6 @@ set(SDIR ${CMAKE_CURRENT_SOURCE_DIR})
|
|||
set(DDIR ${OpenMW_BINARY_DIR}/resources/mygui)
|
||||
|
||||
set(MYGUI_FILES
|
||||
bigbars.png
|
||||
black.png
|
||||
core.skin
|
||||
core.xml
|
||||
|
@ -81,7 +80,6 @@ set(MYGUI_FILES
|
|||
openmw_companion_window.layout
|
||||
openmw_savegame_dialog.layout
|
||||
openmw_recharge_dialog.layout
|
||||
smallbars.png
|
||||
DejaVuLGCSansMono.ttf
|
||||
markers.png
|
||||
../launcher/images/openmw.png
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 387 B |
|
@ -42,7 +42,7 @@
|
|||
<Property key="TextShadow" value="true"/>
|
||||
<Property key="TextShadowColour" value="0 0 0"/>
|
||||
</Widget>
|
||||
<Widget type="ProgressBar" skin="MW_Progress_Loading" position="12 36 196 8" align="Center Top" name="Drowning">
|
||||
<Widget type="ProgressBar" skin="MW_Progress_LightBlue" position="12 36 196 8" align="Center Top" name="Drowning">
|
||||
<Property key="NeedMouse" value="false"/>
|
||||
</Widget>
|
||||
<Widget type="Widget" skin="MW_Progress_Drowning" position="14 38 192 4" align="Center Top" name="Flash"/>
|
||||
|
|
|
@ -19,24 +19,28 @@
|
|||
</Skin>
|
||||
|
||||
<!-- Progress bar track, various colors -->
|
||||
<Skin name="MW_BarTrack_Red" size="4 8" texture="smallbars.png" >
|
||||
<BasisSkin type="MainSkin" offset="0 0 4 8" align="Stretch">
|
||||
<State name="normal" offset="0 0 4 8"/>
|
||||
<Skin name="MW_BarTrack_Red" size="4 8" texture="textures\menu_bar_gray.dds" >
|
||||
<Property key="Colour" value="0.8274 0.2431 0.129"/>
|
||||
<BasisSkin type="MainSkin" offset="0 0 16 8" align="Stretch">
|
||||
<State name="normal" offset="0 0 16 8"/>
|
||||
</BasisSkin>
|
||||
</Skin>
|
||||
<Skin name="MW_BarTrack_Green" size="4 8" texture="smallbars.png" >
|
||||
<BasisSkin type="MainSkin" offset="0 0 4 8" align="Stretch">
|
||||
<State name="normal" offset="0 16 4 8"/>
|
||||
<Skin name="MW_BarTrack_Green" size="4 8" texture="textures\menu_bar_gray.dds" >
|
||||
<Property key="Colour" value="0 0.6823 0.2745"/>
|
||||
<BasisSkin type="MainSkin" offset="0 0 16 8" align="Stretch">
|
||||
<State name="normal" offset="0 0 16 8"/>
|
||||
</BasisSkin>
|
||||
</Skin>
|
||||
<Skin name="MW_BarTrack_Blue" size="4 8" texture="smallbars.png" >
|
||||
<BasisSkin type="MainSkin" offset="0 0 4 8" align="Stretch">
|
||||
<State name="normal" offset="0 8 4 8"/>
|
||||
<Skin name="MW_BarTrack_Blue" size="4 8" texture="textures\menu_bar_gray.dds" >
|
||||
<Property key="Colour" value="0.2470 0.3176 0.7411"/>
|
||||
<BasisSkin type="MainSkin" offset="0 0 16 8" align="Stretch">
|
||||
<State name="normal" offset="0 0 16 8"/>
|
||||
</BasisSkin>
|
||||
</Skin>
|
||||
<Skin name="MW_BarTrack_Yellow" size="4 8" texture="smallbars.png" >
|
||||
<BasisSkin type="MainSkin" offset="0 0 4 8" align="Stretch">
|
||||
<State name="normal" offset="0 32 4 8"/>
|
||||
<Skin name="MW_BarTrack_Yellow" size="4 8" texture="textures\menu_bar_gray.dds" >
|
||||
<Property key="Colour" value="1 1 0"/>
|
||||
<BasisSkin type="MainSkin" offset="0 0 16 8" align="Stretch">
|
||||
<State name="normal" offset="0 0 16 8"/>
|
||||
</BasisSkin>
|
||||
</Skin>
|
||||
|
||||
|
|
|
@ -4,13 +4,13 @@
|
|||
<!-- The entire screen -->
|
||||
<Widget type="Widget" layer="LoadingScreen" position="0 0 300 300" name="_Main">
|
||||
|
||||
<Widget type="Widget" skin="HUD_Box" position="0 200 300 60" align="Bottom HCenter">
|
||||
<Widget type="Widget" skin="HUD_Box" position="0 245 300 48" align="Bottom HCenter">
|
||||
|
||||
<Widget type="TextBox" skin="SandText" position="20 12 260 20" name="LoadingText">
|
||||
<Widget type="TextBox" skin="SandText" position="20 8 260 18" name="LoadingText">
|
||||
<Property key="TextAlign" value="Center"/>
|
||||
</Widget>
|
||||
|
||||
<Widget type="ScrollBar" skin="MW_ProgressScroll_Loading" position="20 36 260 8" name="ProgressBar">
|
||||
<Widget type="ScrollBar" skin="MW_ProgressScroll_Loading" position="20 30 260 6" name="ProgressBar">
|
||||
</Widget>
|
||||
|
||||
</Widget>
|
||||
|
|
|
@ -2,35 +2,48 @@
|
|||
|
||||
<MyGUI type="Skin">
|
||||
<!-- Progress bar track, various colors -->
|
||||
<Skin name="MW_BigTrack_Red" size="2 14" texture="bigbars.png" >
|
||||
<BasisSkin type="MainSkin" offset="0 0 2 14" align="Stretch">
|
||||
<State name="normal" offset="0 0 2 14"/>
|
||||
<Skin name="MW_Track_Red" size="16 16" texture="textures\menu_bar_gray.dds" >
|
||||
<Property key="Colour" value="0.8274 0.2431 0.129"/>
|
||||
<BasisSkin type="MainSkin" offset="0 0 16 16" align="Stretch">
|
||||
<State name="normal" offset="0 0 16 16"/>
|
||||
</BasisSkin>
|
||||
</Skin>
|
||||
<Skin name="MW_BigTrack_Blue" size="2 14" texture="bigbars.png" >
|
||||
<BasisSkin type="MainSkin" offset="0 0 2 14" align="Stretch">
|
||||
<State name="normal" offset="0 14 2 14"/>
|
||||
<Skin name="MW_Track_Blue" size="2 14" texture="textures\menu_bar_gray.dds" >
|
||||
<Property key="Colour" value="0.2470 0.3176 0.7411"/>
|
||||
<BasisSkin type="MainSkin" offset="0 0 16 16" align="Stretch">
|
||||
<State name="normal" offset="0 0 16 16"/>
|
||||
</BasisSkin>
|
||||
</Skin>
|
||||
<Skin name="MW_BigTrack_Green" size="2 14" texture="bigbars.png" >
|
||||
<BasisSkin type="MainSkin" offset="0 0 2 14" align="Stretch">
|
||||
<State name="normal" offset="0 28 2 14"/>
|
||||
<Skin name="MW_Track_Green" size="2 14" texture="textures\menu_bar_gray.dds" >
|
||||
<Property key="Colour" value="0 0.6823 0.2745"/>
|
||||
<BasisSkin type="MainSkin" offset="0 0 16 16" align="Stretch">
|
||||
<State name="normal" offset="0 0 16 16"/>
|
||||
</BasisSkin>
|
||||
</Skin>
|
||||
<Skin name="MW_BigTrack_Progress_Red_Small" size="2 6" texture="smallbars.png" >
|
||||
<BasisSkin type="MainSkin" offset="0 0 2 6" align="Stretch">
|
||||
<State name="normal" offset="0 0 2 8"/>
|
||||
<!-- Lighter variants (only uses top half of the gradient) -->
|
||||
<Skin name="MW_BigTrack_Progress_Red_Small" size="16 8" texture="textures\menu_bar_gray.dds" >
|
||||
<Property key="Colour" value="1 0 0"/>
|
||||
<BasisSkin type="MainSkin" offset="0 0 16 8" align="Stretch">
|
||||
<State name="normal" offset="0 0 16 8"/>
|
||||
</BasisSkin>
|
||||
</Skin>
|
||||
<Skin name="MW_BigTrack_Progress_Blue_Small" size="2 6" texture="smallbars.png" >
|
||||
<BasisSkin type="MainSkin" offset="0 0 2 6" align="Stretch">
|
||||
<State name="normal" offset="0 26 2 6"/>
|
||||
<Skin name="MW_BigTrack_Progress_Blue_Small" size="16 8" texture="textures\menu_bar_gray.dds" >
|
||||
<Property key="Colour" value="0.3 0.3 1"/>
|
||||
<BasisSkin type="MainSkin" offset="0 0 16 8" align="Stretch">
|
||||
<State name="normal" offset="0 0 16 8"/>
|
||||
</BasisSkin>
|
||||
</Skin>
|
||||
<Skin name="MW_BigTrack_Progress_Green_Small" size="16 8" texture="textures\menu_bar_gray.dds" >
|
||||
<Property key="Colour" value="0.298 0.784 0.780"/>
|
||||
<BasisSkin type="MainSkin" offset="0 0 16 8" align="Stretch">
|
||||
<State name="normal" offset="0 0 16 8"/>
|
||||
</BasisSkin>
|
||||
</Skin>
|
||||
|
||||
|
||||
<Skin name="ProgressText" size="16 16">
|
||||
<Property key="FontName" value="Default"/>
|
||||
<Property key="TextAlign" value="Center"/>
|
||||
<Property key="TextAlign" value="Top HCenter"/>
|
||||
<Property key="TextColour" value="0.75 0.6 0.35"/>
|
||||
|
||||
<BasisSkin type="SimpleText" offset="0 0 16 16" align="Stretch"/>
|
||||
|
@ -39,7 +52,7 @@
|
|||
<!-- Main energy bar widget definitions. There's one for each color.-->
|
||||
|
||||
<Skin name="MW_Progress_Red" size="64 12">
|
||||
<Property key="TrackSkin" value="MW_BigTrack_Red"/>
|
||||
<Property key="TrackSkin" value="MW_Track_Red"/>
|
||||
<Property key="TrackWidth" value="1"/>
|
||||
|
||||
<Child type="Widget" skin="MW_Box" offset="0 0 64 12" align="Stretch"/>
|
||||
|
@ -47,7 +60,7 @@
|
|||
</Skin>
|
||||
|
||||
<Skin name="MW_Progress_Green" size="64 12">
|
||||
<Property key="TrackSkin" value="MW_BigTrack_Green"/>
|
||||
<Property key="TrackSkin" value="MW_Track_Green"/>
|
||||
<Property key="TrackWidth" value="1"/>
|
||||
|
||||
<Child type="Widget" skin="MW_Box" offset="0 0 64 12" align="Stretch"/>
|
||||
|
@ -55,15 +68,15 @@
|
|||
</Skin>
|
||||
|
||||
<Skin name="MW_Progress_Blue" size="64 12">
|
||||
<Property key="TrackSkin" value="MW_BigTrack_Blue"/>
|
||||
<Property key="TrackSkin" value="MW_Track_Blue"/>
|
||||
<Property key="TrackWidth" value="1"/>
|
||||
|
||||
<Child type="Widget" skin="MW_Box" offset="0 0 64 12" align="Stretch"/>
|
||||
<Child type="Widget" skin="BlackBG" offset="2 2 60 8" align="Stretch" name="Client"/>
|
||||
</Skin>
|
||||
|
||||
<Skin name="MW_Progress_Loading" size="64 6">
|
||||
<Property key="TrackSkin" value="MW_BigTrack_Progress_Blue_Small"/>
|
||||
<Skin name="MW_Progress_LightBlue" size="64 6">
|
||||
<Property key="TrackSkin" value="MW_BigTrack_Progress_Blue_Small"/>
|
||||
<Property key="TrackWidth" value="1"/>
|
||||
|
||||
<Child type="Widget" skin="MW_Box" offset="0 0 64 6" align="Stretch"/>
|
||||
|
@ -82,7 +95,7 @@
|
|||
<Property key="MoveToClick" value="false"/>
|
||||
|
||||
<Child type="Widget" skin="BlackBG" offset="2 2 60 2" align="Stretch" name="Client"/>
|
||||
<Child type="Button" skin="MW_BigTrack_Progress_Blue_Small" offset="0 0 1 6" align="Left VStretch" name="Track"/>
|
||||
<Child type="Button" skin="MW_BigTrack_Progress_Green_Small" offset="0 0 1 6" align="Left VStretch" name="Track"/>
|
||||
|
||||
<Child type="Widget" skin="MW_Box" offset="0 0 64 6" align="Stretch"/>
|
||||
</Skin>
|
||||
|
|
|
@ -3,10 +3,10 @@
|
|||
<MyGUI type="Layout">
|
||||
<Widget type="Window" skin="MW_Window_NoCaption" layer="Windows" position="0 0 400 426" name="_Main">
|
||||
|
||||
<Property key="MinSize" value="400 496"/>
|
||||
<Property key="MaxSize" value="400 496"/>
|
||||
<Property key="MinSize" value="400 446"/>
|
||||
<Property key="MaxSize" value="400 446"/>
|
||||
|
||||
<Widget type="TabControl" skin="TabControl" position="8 8 368 410" align="Left Top" name="SettingsTab">
|
||||
<Widget type="TabControl" skin="TabControl" position="8 8 368 360" align="Left Top" name="SettingsTab">
|
||||
<Property key="ButtonAutoWidth" value="true"/>
|
||||
|
||||
<Widget type="TabItem" skin="" position="4 28 360 312">
|
||||
|
|
|
@ -152,7 +152,7 @@
|
|||
|
||||
<Skin name="MW_ChargeBar_Blue" size="204 18">
|
||||
<Child type="ProgressBar" skin="MW_Progress_Blue" offset="0 0 204 18" align="Right Top Stretch" name="Bar"/>
|
||||
<Child type="TextBox" skin="SandTextC" offset="0 0 204 18" align="Right Top Stretch" name="BarText"/>
|
||||
<Child type="TextBox" skin="SandTextC" offset="0 2 204 18" align="Right Top Stretch" name="BarText"/>
|
||||
</Skin>
|
||||
|
||||
<Skin name="MW_DynamicStat_Red" size="204 18">
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 2.9 KiB |
Loading…
Reference in a new issue