forked from teamnwah/openmw-tes3coop
added texture column to birthsign table
This commit is contained in:
parent
60cc95305d
commit
baf8eaecb8
2 changed files with 26 additions and 0 deletions
|
@ -650,6 +650,31 @@ namespace CSMWorld
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
template<typename ESXRecordT>
|
||||||
|
struct TextureColumn : public Column<ESXRecordT>
|
||||||
|
{
|
||||||
|
TextureColumn() : Column<ESXRecordT> ("Texture", ColumnBase::Display_String) {}
|
||||||
|
|
||||||
|
virtual QVariant get (const Record<ESXRecordT>& record) const
|
||||||
|
{
|
||||||
|
return QString::fromUtf8 (record.get().mTexture.c_str());
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual void set (Record<ESXRecordT>& record, const QVariant& data)
|
||||||
|
{
|
||||||
|
ESXRecordT record2 = record.get();
|
||||||
|
|
||||||
|
record2.mTexture = data.toString().toUtf8().constData();
|
||||||
|
|
||||||
|
record.setModified (record2);
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual bool isEditable() const
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
|
@ -96,6 +96,7 @@ CSMWorld::Data::Data()
|
||||||
mBirthsigns.addColumn (new StringIdColumn<ESM::BirthSign>);
|
mBirthsigns.addColumn (new StringIdColumn<ESM::BirthSign>);
|
||||||
mBirthsigns.addColumn (new RecordStateColumn<ESM::BirthSign>);
|
mBirthsigns.addColumn (new RecordStateColumn<ESM::BirthSign>);
|
||||||
mBirthsigns.addColumn (new NameColumn<ESM::BirthSign>);
|
mBirthsigns.addColumn (new NameColumn<ESM::BirthSign>);
|
||||||
|
mBirthsigns.addColumn (new TextureColumn<ESM::BirthSign>);
|
||||||
mBirthsigns.addColumn (new DescriptionColumn<ESM::BirthSign>);
|
mBirthsigns.addColumn (new DescriptionColumn<ESM::BirthSign>);
|
||||||
|
|
||||||
addModel (new IdTable (&mGlobals), UniversalId::Type_Globals, UniversalId::Type_Global);
|
addModel (new IdTable (&mGlobals), UniversalId::Type_Globals, UniversalId::Type_Global);
|
||||||
|
|
Loading…
Reference in a new issue